Re: [PATCH] swap: cond_resched in swap_cgroup_prepare()

2017-06-04 Thread Yu Zhao
On Fri, Jun 02, 2017 at 10:18:57AM +0200, Michal Hocko wrote: > On Thu 01-06-17 12:56:35, Yu Zhao wrote: > > Saw need_resched() warnings when swapping on large swapfile (TBs) > > because page allocation in swap_cgroup_prepare() took too long. > > Hmm, but the page allocator makes sure to cond_resc

Re: [PATCH] swap: cond_resched in swap_cgroup_prepare()

2017-06-03 Thread Vladimir Davydov
On Thu, Jun 01, 2017 at 12:56:35PM -0700, Yu Zhao wrote: > Saw need_resched() warnings when swapping on large swapfile (TBs) > because page allocation in swap_cgroup_prepare() took too long. > > We already cond_resched when freeing page in swap_cgroup_swapoff(). > Do the same for the page allocati

Re: [PATCH] swap: cond_resched in swap_cgroup_prepare()

2017-06-02 Thread Michal Hocko
On Thu 01-06-17 12:56:35, Yu Zhao wrote: > Saw need_resched() warnings when swapping on large swapfile (TBs) > because page allocation in swap_cgroup_prepare() took too long. Hmm, but the page allocator makes sure to cond_resched for sleeping allocations. I guess what you mean is something differe

[PATCH] swap: cond_resched in swap_cgroup_prepare()

2017-06-01 Thread Yu Zhao
Saw need_resched() warnings when swapping on large swapfile (TBs) because page allocation in swap_cgroup_prepare() took too long. We already cond_resched when freeing page in swap_cgroup_swapoff(). Do the same for the page allocation. Signed-off-by: Yu Zhao --- mm/swap_cgroup.c | 3 +++ 1 file