diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-08-23 04:49:55 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:39 +0300 |
commit | 616928c30f594775953ca75eb7ccc312a8abeb73 (patch) | |
tree | 0fe31e512c6f2b543b3dcf77a0e18c9f4bc32f3e /fs/bcachefs/btree_types.h | |
parent | e3738c6909d69e980d8b56d33df2e438a2c1c798 (diff) | |
download | linux-616928c30f594775953ca75eb7ccc312a8abeb73.tar.xz |
bcachefs: Track maximum transaction memory
This patch
- tracks maximum bch2_trans_kmalloc() memory used in btree_transaction_stats
- makes it available in debugfs
- switches bch2_trans_init() to using that for the amount of memory to
preallocate, instead of the parameter passed in
This drastically reduces transaction restarts, and means we no longer
need to track this in the source code.
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 ce148c21fd3b..42459a5bf035 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -420,6 +420,7 @@ struct btree_trans { u64 paths_allocated; unsigned mem_top; + unsigned mem_max; unsigned mem_bytes; void *mem; |