bcachefs: optimize __bch2_trans_get(), kill DEBUG_TRANSACTIONS
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 16:11:22 +0000 (11:11 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:44 +0000 (11:47 -0500)
commit31403dca5bb1e55ea0ea6ad1264b81fa8c9a3768
tree91a8417b8242fa3702100c718a829cfc17d1aa2c
parentfea153a84557c982542527143950dbef434731c2
bcachefs: optimize __bch2_trans_get(), kill DEBUG_TRANSACTIONS

 - Some tweaks to greatly reduce locking overhead for the list of btree
   transactions, so that it can always be enabled: leave btree_trans
   objects on the list when they're on the percpu single item freelist,
   and only check for duplicates in the same process when
   CONFIG_BCACHEFS_DEBUG is enabled

 - don't zero out the full btree_trans() unless we allocated it from
   the mempool

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/Kconfig
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_locking.c
fs/bcachefs/btree_types.h
fs/bcachefs/debug.c