From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Date: Thu, 16 Dec 2004 22:37:50 +0000 Subject: Re: [very very drafty] prezeroing to increase the page fault rate Message-Id: <41C20E3E.3070209@yahoo.com.au> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ia64@vger.kernel.org Luck, Tony wrote: >>>>Also just a stupid question - would an madvise(..., MADV_PREFAULT) >>>>be of use to you? Or is that too difficult to get a good NUMA >>>>allocation layout? >>> >>>Its easy to implement. The current code already checks for MADV_RAND and >>>switches off prefaulting for that case. >> >>Oh yeah that could be useful too (ie. pre-enlarging the >>prefault window) >> >>What I had meant though is: MADV_PREFAULT will allocate pages and >>instantiate ptes and allocate pages for the region specified. So your >>large app would call that on startup and not take any faults in future. > > > How does that differ from (the already existing) MADV_WILLNEED? > MADV_WILLNEED populates the pagecache, but AFAIKS doesn't actually set up any ptes in the mapping. So for anonymous memory, I don't think it would help.