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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080917154511.683691d1.nishimura@mxp.nes.nec.co.jp>
Date:	Wed, 17 Sep 2008 15:45:11 +0900
From:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	nishimura@....nes.nec.co.jp, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, akpm@...ux-foundation.org,
	balbir@...ux.vnet.ibm.com, xemul@...nvz.org
Subject: Re: [PATCH -mm] memcg: fix handling of shmem migration

On Wed, 17 Sep 2008 15:38:26 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> On Wed, 17 Sep 2008 15:19:51 +0900
> Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:
> 
> > Hmm, something like this?
> > 
> > ---
> > @@ -734,6 +734,9 @@ int mem_cgroup_prepare_migration(struct page *page, struct page *newpa
> >         if (mem_cgroup_subsys.disabled)
> >                 return 0;
> > 
> > +       if (PageSwapBacked(page))
> > +               SetPageSwapBacked(newpage);
> > +
> >         lock_page_cgroup(page);
> >         pc = page_get_page_cgroup(page);
> >         if (pc) {
> > ---
> > 
> > Or, adding MEM_CGROUP_CHARGE_TYPE_SHMEM and
> > 
> > ---
> > @@ -740,7 +740,10 @@ int mem_cgroup_prepare_migration(struct page *page, struct page *newp
> >                 mem = pc->mem_cgroup;
> >                 css_get(&mem->css);
> >                 if (pc->flags & PAGE_CGROUP_FLAG_CACHE)
> > -                       ctype = MEM_CGROUP_CHARGE_TYPE_CACHE;
> > +                       if (page_is_file_cache(page))
> > +                               ctype = MEM_CGROUP_CHARGE_TYPE_CACHE;
> > +                       else
> > +                               ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM;
> >         }
> >         unlock_page_cgroup(page);
> >         if (mem) {
> > ---
> > (Of course, mem_cgroup_charge_common should be modified too.)
> > 
> like this :) I don't want to change logic in migration.c
> (and this is special case handling for memcg.)
> 
OK.
I'll rewrite and resend it later.

Thanks,
Daisuke Nishimura.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ