diff options
author | Qu Wenruo <wqu@suse.com> | 2024-01-05 16:05:55 +1030 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-03-04 16:24:45 +0100 |
commit | 84cda1a6087d522548b7c8baac886c8e476be152 (patch) | |
tree | e3ea77811e956c32568d549eeaadbf60ac1b09cb /tools/perf/scripts/python/stackcollapse.py | |
parent | 4d02b543903f258bec4c8cdcb85ecbbb2a935cb4 (diff) |
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 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions