Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965430AbXBFUjb (ORCPT ); Tue, 6 Feb 2007 15:39:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965433AbXBFUja (ORCPT ); Tue, 6 Feb 2007 15:39:30 -0500 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:3963 "EHLO spitz.ucw.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965416AbXBFUja (ORCPT ); Tue, 6 Feb 2007 15:39:30 -0500 Date: Tue, 6 Feb 2007 20:39:15 +0000 From: Pavel Machek To: Denis Vlasenko Cc: Phillip Susi , Michael Tokarev , Linus Torvalds , Viktor , Aubrey , Hua Zhong , Hugh Dickins , linux-kernel@vger.kernel.org, hch@infradead.org, kenneth.w.chen@in.karlin.mff.cuni.cz Subject: Re: O_DIRECT question Message-ID: <20070206203914.GA4128@ucw.cz> References: <6d6a94c50701101857v2af1e097xde69e592135e54ae@mail.gmail.com> <200701252211.39017.vda.linux@googlemail.com> <45BA34EE.4050402@cfl.rr.com> <200701270016.46951.vda.linux@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701270016.46951.vda.linux@googlemail.com> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 865 Lines: 23 Hi! > > > Which shouldn't be true. There is no fundamental reason why > > > ordinary writes should be slower than O_DIRECT. > > > > Again, there IS a reason: O_DIRECT eliminates the cpu overhead of the > > kernel-user copy, > > You assume that ordinary read()/write() is *required* to do the copying. > It doesn't. Kernel is allowed to do direct DMAing in this case too. Kernel is allowed, but it is practically impossible to code. It would require slow MMU magic. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - 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/