From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Date: Thu, 16 Dec 2004 02:17:49 +0000 Subject: Re: [very very drafty] prezeroing to increase the page fault rate Message-Id: <1103163469.6730.41.camel@npiggin-nld.site> 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 On Wed, 2004-12-15 at 16:41 -0800, Christoph Lameter wrote: > On Thu, 16 Dec 2004, Nick Piggin 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. The problem I was imagining is that the allocations will all come from the caller with regard to NUMA behaviour... so the app would need to be aware of that (and eg. have each thread call MADV_PREFAULT on their own working set). Nick