diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-04 07:06:56 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 19:47:41 +0300 |
commit | 38ced43bb04ac59b1417f520f4d5a5c3bc3d1e57 (patch) | |
tree | ca82b048b407eabf2396690cff42f8848a68171e /fs/bcachefs/btree_write_buffer_types.h | |
parent | 09caeabe1a5daa3b667b797c401d43206d583f23 (diff) | |
download | linux-38ced43bb04ac59b1417f520f4d5a5c3bc3d1e57.tar.xz |
bcachefs: Inline btree write buffer sort
The sort in the btree write buffer flush path is a very hot path, and
it's particularly performance sensitive since it's single threaded and
can block every other thread on a multithreaded write workload.
It's well worth doing a sort with inlined cmp and swap functions.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_write_buffer_types.h')
-rw-r--r-- | fs/bcachefs/btree_write_buffer_types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_write_buffer_types.h b/fs/bcachefs/btree_write_buffer_types.h index 8758d6adabf4..9b9433de9c36 100644 --- a/fs/bcachefs/btree_write_buffer_types.h +++ b/fs/bcachefs/btree_write_buffer_types.h @@ -13,11 +13,11 @@ union { struct { #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ unsigned idx:24; - struct bpos pos; + u8 pos[sizeof(struct bpos)]; enum btree_id btree:8; #else enum btree_id btree:8; - struct bpos pos; + u8 pos[sizeof(struct bpos)]; unsigned idx:24; #endif } __packed; |