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]
Date:	Mon, 30 Jun 2008 20:19:36 +0100 (BST)
From:	Hugh Dickins <hugh@...itas.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	Balbir Singh <balbir@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] splitlru: memcg swapbacked pages active

On Mon, 30 Jun 2008, KAMEZAWA Hiroyuki wrote:
> On Sun, 29 Jun 2008 01:22:22 +0100 (BST)
> Hugh Dickins <hugh@...itas.com> wrote:
> > 
> > --- mmotm/mm/memcontrol.c	2008-06-27 13:39:20.000000000 +0100
> > +++ linux/mm/memcontrol.c	2008-06-27 17:32:29.000000000 +0100
> > @@ -560,6 +560,8 @@ static int mem_cgroup_charge_common(stru
> >  		pc->flags = PAGE_CGROUP_FLAG_CACHE;
> >  		if (page_is_file_cache(page))
> >  			pc->flags |= PAGE_CGROUP_FLAG_FILE;
> > +		else
> > +			pc->flags |= PAGE_CGROUP_FLAG_ACTIVE;
> >  	} else
> >  		pc->flags = PAGE_CGROUP_FLAG_ACTIVE;
> >  
>
> Hmm, maybe no trouble but we'll have to care shmem's page is not marked as
> PAGE_CGROUP_FLAG_CACHE but charged by mem_cgroup_charge_cache_page(). 
> (I think why shmem is charged as cache is because shmem is used for tmpfs)
> 
> pc->flags |= PAGE_CGROUP_FLAG_FILE |  PAGE_CGROUP_FLAG_ACTIVE;
> 
> is bad ? (or not work ? I can't catch yet.)

Sorry, I've tried several times to understand you here, but still don't.

I thought shmem's page is marked as PAGE_CGROUP_FLAG_CACHE, and is
charged by mem_cgroup_charge_cache_page(), and that's what memcg wants?

It is a bit weird that PAGE_CGROUP_FLAG_CACHE and PAGE_CGROUP_FLAG_FILE
diverge, I'm not thrilled with that: that's an aspect of splitlru
treating shmem/tmpfs pages as not-file pages, which I'm unhappy with.

Hugh
--
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