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  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:	Thu, 04 Jun 2009 18:24:31 -0600
From:	Robert Hancock <>
To:	Julian Phillips <>
Subject: Re: A question about using a private anonymous mmap

Julian Phillips wrote:
> I have a program which creates a reasonably large private anonymous map. 
> The program then writes into a few places in the map, but ends up 
> reading from all of them.
> When I run this program on a system running the process only 
> ever seems to use enough memory to hold the data that has actually been 
> written (well - in units of PAGE_SIZE).  When I run the program on a 
> system running then as it reads the map the amount of memory 
> used continues to increase until the complete map has actually been 
> allocated (and since the total size is greater than the physically 
> available RAM causes swapping).  Basically I seem to be seeing 
> copy-on-read instead of copy-on-write type behaviour.
> Is this an expected change, and is there any option I can tweak to get 
> the old behaviour back?

Looks like this was as a result of the ZERO_PAGE removal:;a=commit;h=557ed1fa2620dc119adb86b34c614e152a629a80

The commit comment notes: "Inserting a ZERO_PAGE for anonymous read 
faults appears to be a false optimisation: if an application is 
performance critical, it would not be doing many read faults of new 
memory, or at least it could be expected to write to that memory soon 
afterwards. If cache or memory use is critical, it should not be working 
with a significant number of ZERO_PAGEs anyway (a more compact 
representation of zeroes should be used)."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists