summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2026-09-08 16:45:40 +0930
committerDavid Sterba <dsterba@suse.com>2026-10-12 19:16:20 +0200
commit883a1a260cf84c954bc6295dc052425d51dff923 (patch)
tree7922863f1231c28cf08d51150e77050c2fa52621 /tools/perf/scripts/python
parent0d8c05fe050ab243489c0b5998e31d7d30003791 (diff)
downloadlinux-883a1a260cf84c954bc6295dc052425d51dff923.tar.gz
linux-883a1a260cf84c954bc6295dc052425d51dff923.zip
btrfs: use kvmalloc() for uncompress_inline()
Although btrfs doesn't support inlined extents larger than PAGE_SIZE for bs > ps cases, it's still possible for the experimental bs > ps support to mount a btrfs created on a system with a much larger page size, thus can still hit an inlined extent that is way larger than the current page size. E.g. a compressed inline extent which has 32K compressed size, is created on 64K page sized ARM64 with 64K sectorsize, then mounted on x86_64 with the experimental bs > ps support. In that case, when reading the compressed inline extent, we need to allocate a buffer that is the same size as the compressed inline extent (32K). That kmalloc() call will request physically contiguous memory for that 32K allocation, and if the system has a very fragmented memory space, such allocation can fail. But there is really no reason that we require such buffer to be physically contiguous, so change it to kvmalloc() to reduce the chance of allocation failure for bs > ps cases. And for all bs <= ps cases, the kvmalloc() call will just be fulfilled by kmalloc() so this will not bring any change to the most common cases. Only bs > ps will get the benefit of less memory allocation failure. Reviewed-by: Daniel Vacek <neelx@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> 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')
0 files changed, 0 insertions, 0 deletions