From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <42F0B4D6.5030604@yahoo.com.au> Date: Wed, 03 Aug 2005 22:13:10 +1000 From: Nick Piggin MIME-Version: 1.0 Subject: Re: [patch 2.6.13-rc4] fix get_user_pages bug References: <42F09B41.3050409@yahoo.com.au> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Hugh Dickins Cc: Linus Torvalds , Martin Schwidefsky , Andrew Morton , Robin Holt , linux-kernel , linux-mm@kvack.org, Ingo Molnar , Roland McGrath List-ID: Hugh Dickins wrote: > Stupidity was the reason I thought handle_mm_fault couldn't be inline: > I was picturing it static inline within mm/memory.c, failed to make the > great intellectual leap you've achieved by moving it to include/linux/mm.h. > Well it was one of my finer moments, so don't be too hard on yourself. > > No, I don't think it would break anything: it's just an historic oddity, > used to be -1 for failure, and only got given a name recently, I think > when wli added the proper major/minor counting. > > Your version of the patch looks less hacky to me (not requiring > VM_FAULT_WRITE_EXPECTED arg), though we could perfectly well remove > that at leisure by adding VM_FAULT_WRITE case into all the arches in > 2.6.14 (which might be preferable to leaving the __inline obscurity?). > Well depends on what they want I suppose. Does it even make sense to expose VM_FAULT_WRITE to arch code if it will just fall through to VM_FAULT_MINOR? With my earlier VM_FAULT_RACE thing, you can squint and say that's a different case to VM_FAULT_MINOR - and accordingly not increment the minor fault count. Afterall, minor faults *seem* to track count of modifications made to the pte entry minus major faults, rather than the number of times the hardware traps. I say this because we increment the number in get_user_pages too. But... > I don't mind either way, but since you've not yet found an actual > error in mine, I'd prefer you to make yours a tidyup patch on top, > Signed-off-by your own good self, and let Linus decide whether he > wants to apply yours on top or not. Or perhaps the decision rests > for the moment with Robin, whether he gets his customer to test > yours or mine - whichever is tested is the one which should go in. > I agree that for the moment we probably just want something that works. I'd be just as happy to go with your patch as is for now. Nick -- 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