Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618323
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch] mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() |
| Date | 2017-04-06 22:20 +0200 |
| Message-ID | <ttm2R-5DN-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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> --- 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); }
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[patch] mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() David Rientjes <rientjes@google.com> - 2017-04-06 22:20 +0200 Re: [patch] mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() Michal Hocko <mhocko@kernel.org> - 2017-04-07 10:10 +0200 Re: [patch] mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() Johannes Weiner <hannes@cmpxchg.org> - 2017-04-10 16:20 +0200
csiph-web