From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with SMTP id 4A16E6B004D for ; Mon, 16 Mar 2009 14:38:10 -0400 (EDT) Date: Mon, 16 Mar 2009 19:37:50 +0100 From: Andrea Arcangeli Subject: Re: [aarcange@redhat.com: [PATCH] fork vs gup(-fast) fix] Message-ID: <20090316183750.GB20555@random.random> References: <1237007189.25062.91.camel@pasglop> <200903170419.38988.nickpiggin@yahoo.com.au> <200903170502.57217.nickpiggin@yahoo.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Linus Torvalds Cc: Nick Piggin , KOSAKI Motohiro , Benjamin Herrenschmidt , Ingo Molnar , Nick Piggin , Hugh Dickins , KAMEZAWA Hiroyuki , linux-mm@kvack.org List-ID: On Mon, Mar 16, 2009 at 11:14:59AM -0700, Linus Torvalds wrote: > You may think that the lock isn't particularly "elegant", but I can only > say "f*ck that, look at the number of lines of code, and the simplicity". I'm sorry but the number of lines that you're reading in the direct_io_worker patch, aren't representative of what it takes to fix it with a mm wide lock. It may be conceptually simpler to fix it outside GUP, on that I can certainly agree (with the downside of leaving splice broken etc..), but I can't see how that small patch can fix anything as releasing the semaphore after direct_io_worker returns with O_DIRECT mixed with async-io. Before claiming that the outer lock results in less number of lines of code, I'd wait to see a fix that works with O_DIRECT+async-io too as well as mine and Nick's do. > Your "elegant" argument is total and utter sh*t, in other words. The lock > approach is tons more elegant, considering that it solves the problem much > more cleanly, and with _much_ less crap. I guess elegant is relative, but the size argument is objective, and that should be possible to compare if somebody writes a full fix that doesn't fall apart if return value of direct_io_worker is -EIOCBQUEUED. -- 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