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:	Tue, 03 Apr 2007 16:07:36 -0700
From:	Ulrich Drepper <drepper@...hat.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	Rik van Riel <riel@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Jakub Jelinek <jakub@...hat.com>, linux-mm@...ck.org,
	Hugh Dickins <hugh@...itas.com>
Subject: Re: missing madvise functionality

Andi Kleen wrote:
> If you know in advance you need them it might be possible to 
> batch that. e.g. MADV_WILLNEED could be extended to
> work on anonymous memory and establish the mappings in the syscall. 
> Would that be useful? 

Not in the exact way you think.  The problem is that not all pages would
be needed right away.  An allocator requests address space from the
kernel in larger chunks and then uses it piece by piece.  The so-far
unused memory remains untouched and therefore not mapped.  It would be
wasteful to allocate all pages.  It would mean the allocator has to
request smaller blocks from the kernel which in turn means more system
calls.

The behavior is also not good for the malloc()'ed blocks.  A large block
might also not be used fully or at least not necessary.

But I definitely could see cases where I would want that functionality.
 For instance, for memory regions which contain only administrative data
and where every page is used right away.  Substituting N page faults for
one madvise call probably is a win.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ