mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
bcachefs: improve behaviour of btree_cache_scan()
Appending new nodes to the end of the list means we're more likely to evict old entries when btree_cache_scan() is started. Signed-off-by: Daniel Hill <daniel@gluo.nz> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
bd954215ca
commit
b5ac23c465
|
|
@ -173,7 +173,7 @@ int bch2_btree_node_hash_insert(struct btree_cache *bc, struct btree *b,
|
|||
mutex_lock(&bc->lock);
|
||||
ret = __bch2_btree_node_hash_insert(bc, b);
|
||||
if (!ret)
|
||||
list_add(&b->list, &bc->live);
|
||||
list_add_tail(&b->list, &bc->live);
|
||||
mutex_unlock(&bc->lock);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user