Re: [patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-12 Thread Michal Hocko
On Wed 12-03-14 10:56:11, Johannes Weiner wrote: > On Wed, Mar 12, 2014 at 02:11:52PM +0100, Michal Hocko wrote: > > On Tue 11-03-14 21:28:30, Johannes Weiner wrote: > > [...] > > > @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, > > > struct mm_struct *mm, > > >

Re: [patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-12 Thread Johannes Weiner
On Wed, Mar 12, 2014 at 02:11:52PM +0100, Michal Hocko wrote: > On Tue 11-03-14 21:28:30, Johannes Weiner wrote: > [...] > > @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, > > struct mm_struct *mm, > > return 0; > > > > if (!PageSwapCache(page)) { > > +

Re: [patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-12 Thread Michal Hocko
On Tue 11-03-14 21:28:30, Johannes Weiner wrote: [...] > @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, struct > mm_struct *mm, > return 0; > > if (!PageSwapCache(page)) { > + /* > + * Page cache insertions can happen without

Re: [patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-12 Thread Johannes Weiner
On Wed, Mar 12, 2014 at 02:11:52PM +0100, Michal Hocko wrote: On Tue 11-03-14 21:28:30, Johannes Weiner wrote: [...] @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, return 0; if (!PageSwapCache(page)) { + /* +

Re: [patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-12 Thread Michal Hocko
On Wed 12-03-14 10:56:11, Johannes Weiner wrote: On Wed, Mar 12, 2014 at 02:11:52PM +0100, Michal Hocko wrote: On Tue 11-03-14 21:28:30, Johannes Weiner wrote: [...] @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, return 0;

Re: [patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-12 Thread Michal Hocko
On Tue 11-03-14 21:28:30, Johannes Weiner wrote: [...] @@ -4070,6 +4061,12 @@ int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, return 0; if (!PageSwapCache(page)) { + /* + * Page cache insertions can happen without an

[patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-11 Thread Johannes Weiner
Only page cache charges can happen without an mm context, so push this special case out of the inner core and into the cache charge function. An ancient comment explains that the mm can also be NULL in case the task is currently being migrated, but that is not actually true with the current case,

[patch 4/8] mm: memcg: push !mm handling out to page cache charge function

2014-03-11 Thread Johannes Weiner
Only page cache charges can happen without an mm context, so push this special case out of the inner core and into the cache charge function. An ancient comment explains that the mm can also be NULL in case the task is currently being migrated, but that is not actually true with the current case,