aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2025-05-09 07:25:09 +0000
committerAndrew Morton <[email protected]>2025-05-21 17:48:23 +0000
commit8e02b1b7fcffcde7cc7d7749513ac1b0fbbfcf0a (patch)
tree75f4b1af703493afe4e30962e3c408d71bea7609 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parentfork: check charging success before zeroing stack (diff)
downloadkernel-8e02b1b7fcffcde7cc7d7749513ac1b0fbbfcf0a.tar.gz
kernel-8e02b1b7fcffcde7cc7d7749513ac1b0fbbfcf0a.zip
fork: define a local GFP_VMAP_STACK
The current allocation of VMAP stack memory is using (THREADINFO_GFP & ~__GFP_ACCOUNT) which is a complicated way of saying (GFP_KERNEL | __GFP_ZERO): <linux/thread_info.h>: define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_ZERO) <linux/gfp_types.h>: define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) This is an unfortunate side-effect of independent changes blurring the picture: commit 19809c2da28aee5860ad9a2eff760730a0710df0 changed (THREADINFO_GFP | __GFP_HIGHMEM) to just THREADINFO_GFP since highmem became implicit. commit 9b6f7e163cd0f468d1b9696b785659d3c27c8667 then added stack caching and rewrote the allocation to (THREADINFO_GFP & ~__GFP_ACCOUNT) as cached stacks need to be accounted separately. However that code, when it eventually accounts the memory does this: ret = memcg_kmem_charge(vm->pages[i], GFP_KERNEL, 0) so the memory is charged as a GFP_KERNEL allocation. Define a unique GFP_VMAP_STACK to use GFP_KERNEL | __GFP_ZERO and move the comment there. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]> Reported-by: Mateusz Guzik <[email protected]> Cc: Pasha Tatashin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
0 files changed, 0 insertions, 0 deletions