aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/btrfs/defrag.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2024-01-05 16:05:55 +1030
committerDavid Sterba <dsterba@suse.com>2024-03-04 16:24:45 +0100
commit84cda1a6087d522548b7c8baac886c8e476be152 (patch)
treee3ea77811e956c32568d549eeaadbf60ac1b09cb /fs/btrfs/defrag.c
parentbtrfs: remove unused variable bio_offset from end_bbio_data_read() (diff)
downloadwireguard-linux-84cda1a6087d522548b7c8baac886c8e476be152.tar.xz
wireguard-linux-84cda1a6087d522548b7c8baac886c8e476be152.zip
btrfs: cache folio size and shift in extent_buffer
After the conversion to folio interfaces (but without the patch to enable larger folio allocation), there is an LTP report about observable performance drop on metadata heavy operations. https://lore.kernel.org/linux-btrfs/202312221750.571925bd-oliver.sang@intel.com/ This drop is caused by the extra code of calculating the folio_size()/folio_shift(), instead of the old hard coded PAGE_SIZE/PAGE_SHIFT. To slightly reduce the overhead, just cache both folio_size and folio_shift in extent_buffer. The two new members (u32 folio_size and u8 folio_shift) are stored inside the holes of extent_buffer. folio_size is shared with len, which is reduced to u32. The size of eb does not change. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/defrag.c')
0 files changed, 0 insertions, 0 deletions