diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-11-12 22:49:10 +0100 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-01-08 22:05:14 +0100 |
commit | e0a985a4b1b533311ec88c85177c45d036313f75 (patch) | |
tree | 0433591d9d9124ef559fc54f2f71eb7027f0a56c /drivers/md/bcache/bcache.h | |
parent | bcache: Add bch_bkey_equal_header() (diff) | |
download | linux-e0a985a4b1b533311ec88c85177c45d036313f75.tar.xz linux-e0a985a4b1b533311ec88c85177c45d036313f75.zip |
bcache: Improve bucket_prio() calculation
When deciding what order to reuse buckets we take into account both the bucket's
priority (which indicates lru order) and also the amount of live data in that
bucket. The way they were scaled together wasn't as correct as it could be...
this patch improves and documents it.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/bcache.h')
-rw-r--r-- | drivers/md/bcache/bcache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index 93b848419665..0c707e4f4eaf 100644 --- a/drivers/md/bcache/bcache.h +++ b/drivers/md/bcache/bcache.h @@ -704,7 +704,7 @@ struct bbio { }; #define BTREE_PRIO USHRT_MAX -#define INITIAL_PRIO 32768 +#define INITIAL_PRIO 32768U #define btree_bytes(c) ((c)->btree_pages * PAGE_SIZE) #define btree_blocks(b) \ |