Thread (13 messages) 13 messages, 6 authors, 2011-05-22

Re: [PATCH mmotm] add the pagefault count into memcg stats: shmem fix

From: Minchan Kim <hidden>
Date: 2011-05-22 23:31:39

On Wed, May 18, 2011 at 3:24 AM, Hugh Dickins [off-list ref] wrote:
mem_cgroup_count_vm_event() should update the PGMAJFAULT count for the
target mm, not for current mm (but of course they're usually the same).

We don't know the target mm in shmem_getpage(), so do it at the outer
level in shmem_fault(); and it's easier to follow if we move the
count_vm_event(PGMAJFAULT) there too.

Hah, it was using __count_vm_event() before, sneaking that update into
the unpreemptible section under info->lock: well, it comes to the same
on x86 at least, and I still think it's best to keep these together.

Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Minchan Kim <redacted>

I am okay if memcg maintainer knew behavior change of shmem fault accounting.
What I want was let memcg maintainer know slight behavior change.

Thanks, Hugh.
-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help