diff options
author | Ye Bin <yebin10@huawei.com> | 2025-03-01 16:37:20 +0800 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2025-03-05 10:03:31 +0100 |
commit | 939c5de3c70d145d7388db1b04d75cda79297c23 (patch) | |
tree | ccbb0f2aa0af9dd1b6d6a4fb8e782af5828dffdd /tools/perf/scripts/python/syscall-counts.py | |
parent | a6687c8ff613fc13a71ce1390593ba8d27c52db9 (diff) |
mm/slab: call kmalloc_noprof() unconditionally in kmalloc_array_noprof()
If 'n' or 'size' isn't builtin constant, we used to call __kmalloc()
before commit 7bd230a26648 ("mm/slab: enable slab allocation tagging for
kmalloc and friends"), which inadvertedly changed both paths to
kmalloc_noprof().
As Harry Yoo points out we can just call kmalloc_noprof()
unconditionally. If the compiler knows n and size are constants it
doesn't guarantee that bytes will be also seen as constant, and that is
the important test in kmalloc_noprof() anyway, so we can just defer to
it always.
[ vbabka@suse.cz: change as Harry suggested and adjust commit log ]
Fixes: 7bd230a26648 ("mm/slab: enable slab allocation tagging for kmalloc and friends")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions