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: <20101123164107.7BBC.A69D9226@jp.fujitsu.com>
Date:	Tue, 23 Nov 2010 16:49:49 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	kosaki.motohiro@...fujitsu.com,
	Michel Lespinasse <walken@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Nick Piggin <npiggin@...nel.dk>,
	Rik van Riel <riel@...hat.com>,
	Michael Rubin <mrubin@...gle.com>
Subject: Re: [RFC] mlock: release mmap_sem every 256 faulted pages

> On Mon, 22 Nov 2010 21:00:52 -0800 Michel Lespinasse <walken@...gle.com> wrote:
> 
> > Hi,
> > 
> > I'd like to sollicit comments on this proposal:
> > 
> > Currently mlock() holds mmap_sem in exclusive mode while the pages get
> > faulted in. In the case of a large mlock, this can potentially take a
> > very long time.
> 
> A more compelling description of why this problem needs addressing
> would help things along.

Michel, as far as I know, now Michael Rubin (now I'm ccing him) are trying
to make automatic MM test suit. So if possible, can you please make
test case which reproduce your workload?

http://code.google.com/p/samplergrapher/


I hope to join to solve your issue. and I also hope you help to understand
and reproduce your issue. 

Thanks.

> 
> > +		/*
> > +		 * Limit batch size to 256 pages in order to reduce
> > +		 * mmap_sem hold time.
> > +		 */
> > +		nfault = nstart + 256 * PAGE_SIZE;
> 
> It would be nicer if there was an rwsem API to ask if anyone is
> currently blocked in down_read() or down_write().  That wouldn't be too
> hard to do.  It wouldn't detect people polling down_read_trylock() or
> down_write_trylock() though.

Andrew, yes it is certinally optimal. But I doubt it improve mlock
performance a lot. because mlock is _very_ slooooooow syscall.
lock regrabing may be cheap than it. So, _IF_ you can allow, I hope
we take a simple method at first. personally I think Michel move 
forwarding right way. then I don't hope to make a hardest hurdle.

Thanks.


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