Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-20 Thread Michal Hocko
On Mon 19-01-15 23:35:50, Paul E. McKenney wrote: > On Thu, Jan 15, 2015 at 03:48:38PM +0100, Michal Hocko wrote: > > On Thu 15-01-15 16:25:16, Vladimir Davydov wrote: [...] > > > Does RCU free objects from irq or soft irq context? > > > > and this is another part which I didn't consider at all. R

Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-19 Thread Paul E. McKenney
On Thu, Jan 15, 2015 at 03:48:38PM +0100, Michal Hocko wrote: > On Thu 15-01-15 16:25:16, Vladimir Davydov wrote: > > On Thu, Jan 15, 2015 at 01:58:20PM +0100, Michal Hocko wrote: > > > On Thu 15-01-15 11:37:53, Vladimir Davydov wrote: > > > > current->reclaim_state is only used to count the number

Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-15 Thread Vladimir Davydov
On Thu, Jan 15, 2015 at 03:48:38PM +0100, Michal Hocko wrote: > On Thu 15-01-15 16:25:16, Vladimir Davydov wrote: > > memcg = mem_cgroup_iter(root, NULL, &reclaim); > > do { > > [...] > > if (memcg && is_classzone) > >

Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-15 Thread Michal Hocko
On Thu 15-01-15 16:25:16, Vladimir Davydov wrote: > On Thu, Jan 15, 2015 at 01:58:20PM +0100, Michal Hocko wrote: > > On Thu 15-01-15 11:37:53, Vladimir Davydov wrote: > > > current->reclaim_state is only used to count the number of slab pages > > > reclaimed by shrink_slab(). So instead of initial

Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-15 Thread Vladimir Davydov
On Thu, Jan 15, 2015 at 01:58:20PM +0100, Michal Hocko wrote: > On Thu 15-01-15 11:37:53, Vladimir Davydov wrote: > > current->reclaim_state is only used to count the number of slab pages > > reclaimed by shrink_slab(). So instead of initializing it before we are > > > > Note that after this patch

Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-15 Thread Michal Hocko
On Thu 15-01-15 11:37:53, Vladimir Davydov wrote: > current->reclaim_state is only used to count the number of slab pages > reclaimed by shrink_slab(). So instead of initializing it before we are > > Note that after this patch try_to_free_mem_cgroup_pages() will count not > only reclaimed user pag

Re: [PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-15 Thread Hillf Danton
> current->reclaim_state is only used to count the number of slab pages > reclaimed by shrink_slab(). So instead of initializing it before we are > going to call try_to_free_pages() or shrink_zone(), let's set in > directly in shrink_slab(). > > Note that after this patch try_to_free_mem_cgroup_pa

[PATCH -mm v2] vmscan: move reclaim_state handling to shrink_slab

2015-01-15 Thread Vladimir Davydov
current->reclaim_state is only used to count the number of slab pages reclaimed by shrink_slab(). So instead of initializing it before we are going to call try_to_free_pages() or shrink_zone(), let's set in directly in shrink_slab(). Note that after this patch try_to_free_mem_cgroup_pages() will c