From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4510086C.4020101@yahoo.com.au> Date: Wed, 20 Sep 2006 01:10:36 +1000 From: Nick Piggin MIME-Version: 1.0 Subject: Re: [PATCH] mm: exempt pcp alloc from watermarks References: <20060914220011.2be9100a.akpm@osdl.org> <20060914234926.9b58fd77.pj@sgi.com> <20060915002325.bffe27d1.akpm@osdl.org> <20060915012810.81d9b0e3.akpm@osdl.org> <20060915203816.fd260a0b.pj@sgi.com> <20060915214822.1c15c2cb.akpm@osdl.org> <20060916043036.72d47c90.pj@sgi.com> <20060916081846.e77c0f89.akpm@osdl.org> <20060917022834.9d56468a.pj@sgi.com> <450D1A94.7020100@yahoo.com.au> <20060917041525.4ddbd6fa.pj@sgi.com> <450D434B.4080702@yahoo.com.au> <20060917061922.45695dcb.pj@sgi.com> <450D5310.50004@yahoo.com.au> <1158583495.23551.53.camel@twins> <45100028.90109@yahoo.com.au> <1158677483.23551.59.camel@twins> In-Reply-To: <1158677483.23551.59.camel@twins> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Peter Zijlstra Cc: Paul Jackson , akpm@osdl.org, clameter@sgi.com, linux-mm@kvack.org, rientjes@google.com, ak@suse.de List-ID: Peter Zijlstra wrote: > On Wed, 2006-09-20 at 00:35 +1000, Nick Piggin wrote: > >>Thanks for the patch! I have a slight preference for the following >>version, which speculatively tests pcp->count without disabling >>interrupts (the chance of being preempted or scheduled in this >>window is basically the same as the chance of being preempted after >>checking watermarks). What do you think? > > > The race here allows to wrongly bypass the watermark check. My version > raced the other way about, where you could find a non empty pcp where an > empty one was otherwise expected. I really doubt it matters. You could be preempted after that check anyway, and by the time you return the previous watermark check is meaningless. If we really want to be strict about watermark checks, it has to be done with the zone lock held, no other option. I doubt anybody bothered, because the watermarks (even PF_MEMALLOC pool) are all heuristics anyway and it is a better idea to keep fastpath code fast. > OTOH it is much shorter, I'll see if I can shorten mine and keep the > race safe (and perhaps do what Christoph suggests). -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com -- 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