Re: [PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-11 Thread Hugh Dickins
On Tue, 10 Jul 2012, Johannes Weiner wrote: > > I couldn't see anything wrong with shmem_replace_page(), either, but > maybe the comment in its error path could be updated as the callsite > does not rely on page_private alone anymore to confirm correct swap. I went in to make an incremental fix

Re: [PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-11 Thread Hugh Dickins
On Tue, 10 Jul 2012, Johannes Weiner wrote: I couldn't see anything wrong with shmem_replace_page(), either, but maybe the comment in its error path could be updated as the callsite does not rely on page_private alone anymore to confirm correct swap. I went in to make an incremental fix to

Re: [PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-10 Thread Johannes Weiner
On Mon, Jul 09, 2012 at 03:44:24PM -0700, Hugh Dickins wrote: > When adding the page_private checks before calling shmem_replace_page(), > I did realize that there is a further race, but thought it too unlikely > to need a hurried fix. > > But independently I've been chasing why a mem cgroup's

Re: [PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-10 Thread Johannes Weiner
On Mon, Jul 09, 2012 at 03:44:24PM -0700, Hugh Dickins wrote: When adding the page_private checks before calling shmem_replace_page(), I did realize that there is a further race, but thought it too unlikely to need a hurried fix. But independently I've been chasing why a mem cgroup's

[PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-09 Thread Hugh Dickins
When adding the page_private checks before calling shmem_replace_page(), I did realize that there is a further race, but thought it too unlikely to need a hurried fix. But independently I've been chasing why a mem cgroup's memory.stat sometimes shows negative rss after all tasks have gone: I

[PATCH 2/3] shmem: fix negative rss in memcg memory.stat

2012-07-09 Thread Hugh Dickins
When adding the page_private checks before calling shmem_replace_page(), I did realize that there is a further race, but thought it too unlikely to need a hurried fix. But independently I've been chasing why a mem cgroup's memory.stat sometimes shows negative rss after all tasks have gone: I