lkml.org 
[lkml]   [2017]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()
On Thu 06-04-17 13:16:24, David Rientjes wrote:
> We got need_resched() warnings in swap_cgroup_swapoff() because
> swap_cgroup_ctrl[type].length is particularly large.
>
> Reschedule when needed.
>
> Signed-off-by: David Rientjes <rientjes@google.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> mm/swap_cgroup.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/swap_cgroup.c b/mm/swap_cgroup.c
> --- a/mm/swap_cgroup.c
> +++ b/mm/swap_cgroup.c
> @@ -201,6 +201,8 @@ void swap_cgroup_swapoff(int type)
> struct page *page = map[i];
> if (page)
> __free_page(page);
> + if (!(i % SWAP_CLUSTER_MAX))
> + cond_resched();
> }
> vfree(map);
> }
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-04-07 10:01    [W:1.484 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site