diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-01-04 04:34:16 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:24 -0400 |
commit | 8322a9376eb21c47829128684fd900016a0e0169 (patch) | |
tree | e3c6bf103176d359a67aa03c3ac5171697e63ff9 /fs/bcachefs/btree_types.h | |
parent | bcachefs: Add tabstops to printbufs (diff) | |
download | linux-8322a9376eb21c47829128684fd900016a0e0169.tar.gz linux-8322a9376eb21c47829128684fd900016a0e0169.tar.bz2 linux-8322a9376eb21c47829128684fd900016a0e0169.zip |
bcachefs: Btree key cache optimization
This helps with lock contention in the journalling code: instead of
updating our journal pin on every write, only get a journal pin if we
don't have one.
This means we can avoid hammering on journal locks nearly so much, at
the cost of carrying around a journal pin for an older entry than the
one we actually need. To handle that, if needed we update our journal
pin to the correct one when flushed by journal reclaim.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_types.h')
-rw-r--r-- | fs/bcachefs/btree_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h index 89c0d2272d91..d5c2a776ee1b 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -332,6 +332,7 @@ struct bkey_cached { struct journal_preres res; struct journal_entry_pin journal; + u64 seq; struct bkey_i *k; }; |