lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 22 Mar 2012 17:30:00 -0700 From: Andrew Morton <akpm@...ux-foundation.org> To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> Cc: "linux-mm@...ck.org" <linux-mm@...ck.org>, Linux Kernel <linux-kernel@...r.kernel.org>, "cgroups@...r.kernel.org" <cgroups@...r.kernel.org>, Hugh Dickins <hughd@...gle.com>, "n-horiguchi@...jp.nec.com" <n-horiguchi@...jp.nec.com>, Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...e.cz>, Glauber Costa <glommer@...allels.com> Subject: Re: [PATCH] memcg: change behavior of moving charges at task move On Fri, 23 Mar 2012 09:18:46 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote: > >> +#ifdef CONFIG_SWAP > >> + /* > >> + * Avoid lookup_swap_cache() not to update statistics. > >> + */ > > > > I don't understand this comment - what is it trying to tell us? > > > > > High Dickins advised me to use find_get_page() rather than lookup_swap_cache() > because lookup_swap_cache() has some statistics with swap. ah. --- a/mm/memcontrol.c~memcg-change-behavior-of-moving-charges-at-task-move-fix +++ a/mm/memcontrol.c @@ -5137,7 +5137,8 @@ static struct page *mc_handle_swap_pte(s return NULL; #ifdef CONFIG_SWAP /* - * Avoid lookup_swap_cache() not to update statistics. + * Use find_get_page() rather than lookup_swap_cache() because the + * latter alters statistics. */ page = find_get_page(&swapper_space, ent.val); #endif > >> + page = find_get_page(&swapper_space, ent.val); > > > > The code won't even compile if CONFIG_SWAP=n? > > > > mm/built-in.o: In function `mc_handle_swap_pte': > /home/kamezawa/Kernel/next/linux/mm/memcontrol.c:5172: undefined reference to `swapper_space' > make: *** [.tmp_vmlinux1] Error 1 > > Ah...but I think this function (mc_handle_swap_pte) itself should be under CONFIG_SWAP. > I'll post v2. Confused. The new reference to swapper_space is already inside #ifdef CONFIG_SWAP. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists