From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 31 May 2007 09:47:53 +0300 Subject: Re: [PATCH] Document Linux Memory Policy Message-ID: <20070531064753.GA31143@minantech.com> References: <1180467234.5067.52.camel@localhost> <1180544104.5850.70.camel@localhost> <20070531061836.GL4715@minantech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: From: glebn@voltaire.com (Gleb Natapov) Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Lee Schermerhorn , linux-mm , Andrew Morton , Andi Kleen List-ID: On Wed, May 30, 2007 at 11:41:25PM -0700, Christoph Lameter wrote: > On Thu, 31 May 2007, Gleb Natapov wrote: > > > On Wed, May 30, 2007 at 10:56:17AM -0700, Christoph Lameter wrote: > > > > You don't get COW if it's a shared mapping. You use the page cache > > > > pages which ignores my mbind(). That's my beef! [;-)] > > > > > > page cache pages are subject to a tasks memory policy regardless of how we > > > get to the page cache page. I think that is pretty consistent. > > > > > I am a little bit confused here. If two processes mmap some file with > > MAP_SHARED and each one marks different part of the file with > > numa_setlocal_memory() (and suppose that no pages were faulted in for > > The numa_setlocal_memory() has no effect on ranges that map pagecache > pages. > > > this file yet). Now first process touches a part of the file that was > > marked local by second process. Will faulted page be placed in first > > process' local memory or second? I surely expect later, but it seems I > > am wrong. > > The faulted page will use the memory policy of the task that faulted it > in. If that process has numa_set_localalloc() set then the page will be > located as closely as possible to the allocating thread. Thanks. But I have to say this feels very unnatural. So to have desirable effect I have to create shared memory with shmget? -- Gleb. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org