Commit 460bcec8 authored by David Rientjes's avatar David Rientjes Committed by Linus Torvalds
Browse files

mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()

We got need_resched() warnings in swap_cgroup_swapoff() because
swap_cgroup_ctrl[type].length is particularly large.

Reschedule when needed.


Signed-off-by: default avatarDavid Rientjes <>
Acked-by: default avatarMichal Hocko <>
Cc: Johannes Weiner <>
Cc: Vladimir Davydov <>
Cc: KAMEZAWA Hiroyuki <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent e11f8b7b
......@@ -201,6 +201,8 @@ void swap_cgroup_swapoff(int type)
struct page *page = map[i];
if (page)
if (!(i % SWAP_CLUSTER_MAX))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment