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:	Wed, 05 Nov 2008 19:50:39 +0200
From:	"Eugene V. Lyubimkin" <jackyf.devel@...il.com>
To:	Hugh Dickins <hugh@...itas.com>
CC:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Peter Zijlstra <peterz@...radead.org>,
	Chris Friesen <cfriesen@...tel.com>,
	Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
	linux-mm <linux-mm@...ck.org>
Subject: Re: mmap: is default non-populating behavior stable?

Hugh Dickins wrote:
>> Thanks to all for answers. I have made the conclusion that doing "open() new
>> file, truncate(<big size>), mmap(<the same big size>), write/read some memory
>> pages" should not populate other, untouched by write/read pages (until
>> MAP_POPULATE given), right?
[snip]
> For a start, it depends on the filesystem: I believe that vfat, for
> example, does not support the concept of sparse files (files with holes
> in), so its truncate(<big size>) will allocate the whole of that big
> size initially.
For my case vfat is not an option fortunately.

> I'm not sure what you mean by "populate": in mm, as in MAP_POPULATE,
> we're thinking of prefaulting pages into the user address space; but
> you're probably thinking of whether the blocks are allocated on disk?
Yes.

>>>From time to time we toy with prefaulting adjacent pages when a fault
> occurs (though IIRC tests have proved disappointing in the past): we'd
> like to keep that option open, but it would go against your guidelines
> above to some extent.
It depends how is "adjacent" would count :) If several pages, probably not. If
millions or similar, that would be a problem. It's very convenient to use such
"open+truncate+mmap+write/read" behavior to make self-growing-on-demand cache
in memory with disk as back-end without remaps.

Thanks for descriptive answer.

-- 
Eugene V. Lyubimkin aka JackYF


Download attachment "signature.asc" of type "application/pgp-signature" (261 bytes)

Powered by blists - more mailing lists