summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChen Wandun <chenwandun@lixiang.com>2026-05-07 13:54:34 +0300
committerTejun Heo <tj@kernel.org>2026-05-08 00:57:31 +0300
commitdde2f938d02f2c740d49bb5113dea941f941026a (patch)
tree91c81508a1d7bd89e2a83200138d5965a188d218 /include
parentd8769544bde51b0ac980d10f8fe9f9fed6c95995 (diff)
downloadlinux-dde2f938d02f2c740d49bb5113dea941f941026a.tar.xz
cgroup/cpuset: move PF_EXITING check before __GFP_HARDWALL in cpuset_current_node_allowed()
Since prepare_alloc_pages() unconditionally adds __GFP_HARDWALL for the fast path when cpusets are enabled, the __GFP_HARDWALL check in cpuset_current_node_allowed() causes the PF_EXITING escape path to be skipped on the first allocation attempt. This makes it unreachable in the common case, so dying tasks can get stuck in direct reclaim or even trigger OOM while trying to exit, despite being allowed to allocate from any node. Move the PF_EXITING check before __GFP_HARDWALL so that dying tasks can allocate memory from any node to exit quickly, even when cpusets are enabled. Also update the function comment to reflect the actual behavior of prepare_alloc_pages() and the corrected check ordering. Signed-off-by: Chen Wandun <chenwandun@lixiang.com> Acked-by: Michal Koutný <mkoutny@suse.com> Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions