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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120216172409.5fa18608.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Thu, 16 Feb 2012 17:24:09 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Hugh Dickins <hughd@...gle.com>,
	"hannes@...xchg.org" <hannes@...xchg.org>
Subject: Re: [PATCH RFC 00/15] mm: memory book keeping and lru_lock
 splitting

On Thu, 16 Feb 2012 09:43:52 +0400
Konstantin Khlebnikov <khlebnikov@...nvz.org> wrote:

> KAMEZAWA Hiroyuki wrote:
> > On Thu, 16 Feb 2012 02:57:04 +0400
> > Konstantin Khlebnikov<khlebnikov@...nvz.org>  wrote:

> >> * optimize page to book translations, move it upper in the call stack,
> >>    replace some struct zone arguments with struct book pointer.
> >>
> >
> > a page->book transrater from patch 2/15
> >
> > +struct book *page_book(struct page *page)
> > +{
> > +	struct mem_cgroup_per_zone *mz;
> > +	struct page_cgroup *pc;
> > +
> > +	if (mem_cgroup_disabled())
> > +		return&page_zone(page)->book;
> > +
> > +	pc = lookup_page_cgroup(page);
> > +	if (!PageCgroupUsed(pc))
> > +		return&page_zone(page)->book;
> > +	/* Ensure pc->mem_cgroup is visible after reading PCG_USED. */
> > +	smp_rmb();
> > +	mz = mem_cgroup_zoneinfo(pc->mem_cgroup,
> > +			page_to_nid(page), page_zonenum(page));
> > +	return&mz->book;
> > +}
> >
> > What happens when pc->mem_cgroup is rewritten by move_account() ?
> > Where is the guard for lockless access of this ?
> 
> Initially this suppose to be protected with lru_lock, in final patch they are protected with rcu.

Hmm, VM_BUG_ON(!PageLRU(page)) ?

move_account() overwrites pc->mem_cgroup with isolating page from LRU.
but it doesn't take lru_lock.

BTW, what amount of perfomance benefit ?

Thanks,
-Kame

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