Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965305AbXATQiV (ORCPT ); Sat, 20 Jan 2007 11:38:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965307AbXATQiU (ORCPT ); Sat, 20 Jan 2007 11:38:20 -0500 Received: from ug-out-1314.google.com ([66.249.92.170]:15113 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965305AbXATQiU (ORCPT ); Sat, 20 Jan 2007 11:38:20 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=tNQkZXjGmI84K3KLrk68TeZsL1rlI4EHbkQFVMUT2JulJER5j+jay1aSOBJ0qURy6gXea9LWf8P+oZZlvWzf1quuoOGNhlZ3tI0FH9vkSDyYrWIxGX+KHJ9o0pwXnQMT4c614mnm9rwXxEuOMWYZ0LNI2nJdZEjIDyUgn/O5XSo= From: Denis Vlasenko To: Michael Tokarev Subject: Re: O_DIRECT question Date: Sat, 20 Jan 2007 17:36:22 +0100 User-Agent: KMail/1.8.2 Cc: Linus Torvalds , Viktor , Aubrey , Hua Zhong , Hugh Dickins , linux-kernel@vger.kernel.org, hch@infradead.org, kenneth.w.chen@intel.com, akpm@osdl.org References: <6d6a94c50701101857v2af1e097xde69e592135e54ae@mail.gmail.com> <45A6704A.40205@tls.msk.ru> In-Reply-To: <45A6704A.40205@tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701201736.22553.vda.linux@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1000 Lines: 21 On Thursday 11 January 2007 18:13, Michael Tokarev wrote: > example, which isn't quite possible now from userspace. But as long as > O_DIRECT actually writes data before returning from write() call (as it > seems to be the case at least with a normal filesystem on a real block > device - I don't touch corner cases like nfs here), it's pretty much > THE ideal solution, at least from the application (developer) standpoint. Why do you want to wait while 100 megs of data are being written? You _have to_ have threaded db code in order to not waste gobs of CPU time on UP + even with that you eat context switch penalty anyway. I hope you agree that threaded code is not ideal performance-wise - async IO is better. O_DIRECT is strictly sync IO. -- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/