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] [day] [month] [year] [list]
Message-Id: <20090528104448.17c4b37c.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Thu, 28 May 2009 10:44:48 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
	"hugh.dickins@...cali.co.uk" <hugh.dickins@...cali.co.uk>,
	"hannes@...xchg.org" <hannes@...xchg.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH 2/5] add SWAP_HAS_CACHE flag to swap_map

On Thu, 28 May 2009 10:40:13 +0900
Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:

> > > So I think it should be like:
> > > 
> > > 	read_swap_cache_async()
> > > 		:
> > > 		valid = swapcache_prepare(entry);
> > > 		if (!valid)
> > > 			break;
> > > 		if (valid == -EAGAIN);
> > > 			continue;
> > > 
> > > to let the context that succeeded in swapcache_prepare() do add_to_swap_cache().
> > > 
> > 
> > What you reccomend is code like this ?
> > 
> > ==
> > 	ret = swapcache_prapare(entry);
> > 	if (ret == -ENOENT)
> > 		break;    /* unused swap entry */
> > 	if (ret == -EBUSY)
> > 		continue; /* to call find_get_page() again */
> > ==
> > 
> Yes.
> By current version of your patch, read_swap_cache_async() might return NULL
> if concurrent read_swap_cache_async() exists. It is different from current behavior.
> And this means swapin_readahead() might fail(it calls read_swap_cache_async()
> twice, though) and can cause oom, right ?
> 
Good point. I fixed this in a patch in my box ;)
Thank you fot good review.

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