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: <20090723110655.f08cdcdc.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Thu, 23 Jul 2009 11:06:55 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Hugh Dickins <hugh.dickins@...cali.co.uk>
Cc:	Rik van Riel <riel@...hat.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Izik Eidus <ieidus@...hat.com>, akpm@...ux-foundation.org,
	chrisw@...hat.com, avi@...hat.com, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, nickpiggin@...oo.com.au,
	Wu Fengguang <fengguang.wu@...el.com>
Subject: Re: [PATCH 06/10] ksm: identify PageKsm pages

On Wed, 22 Jul 2009 13:54:06 +0100 (BST)
Hugh Dickins <hugh.dickins@...cali.co.uk> wrote:

> On Tue, 21 Jul 2009, Rik van Riel wrote:
> > Andrea Arcangeli wrote:
> > > > -	if (PageAnon(old_page)) {
> > > > +	if (PageAnon(old_page) && !PageKsm(old_page)) {
> > > >    if (!trylock_page(old_page)) {
> > > >     page_cache_get(old_page);
> > > >     pte_unmap_unlock(page_table, ptl);
> > > 
> > > What exactly does it buy to have PageAnon return 1 on ksm pages,
> > > besides requiring the above additional check (that if we stick to the
> > > above code, I would find safer to move inside reuse_swap_page).
> > 
> > I guess that if they are to remain unswappable, they
> > should go onto the unevictable list.
> 
> The KSM pages are not put on any LRU, so wouldn't be slowing vmscan
> down with futile scans: isn't the unevictable list for pages which
> belong to another LRU once they become evictable again?
> 
> (At this instant I've forgotten why there's an unevictable list at
> all - somewhere in vmscan.c which is accustomed to dealing with
> pages on lists, so easier to have them on a list than not?)
> 
I forget, too. But in short thinking, Unevictable pages should be
on LRU (marked as PG_lru) for isolating page (from LRU) called by
page migration etc.

isolate_lru_page()
	-> put page on private list
	-> do some work
	-> putback_lru_page()

sequence is useful at handling pages in a list.
Because mlock/munclock can be called arbitrarily, unevicatable lru
works enough good for making above kinds of code simpler.

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