From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH] direct-io: Submit bio after boundary buffer is added to it Date: Tue, 9 Apr 2013 22:55:56 +0200 Message-ID: <20130409205556.GC15214@quack.suse.cz> References: <1365522169-24718-1-git-send-email-jack@suse.cz> <20130409134758.fc074bcfda430b0ce6508d06@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Kazuya Mio To: Andrew Morton Return-path: Received: from cantor2.suse.de ([195.135.220.15]:47706 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762739Ab3DIUz7 (ORCPT ); Tue, 9 Apr 2013 16:55:59 -0400 Content-Disposition: inline In-Reply-To: <20130409134758.fc074bcfda430b0ce6508d06@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 09-04-13 13:47:58, Andrew Morton wrote: > On Tue, 9 Apr 2013 17:42:49 +0200 Jan Kara wrote: > > > Currently, dio_send_cur_page() submits bio before current page and > > cached sdio->cur_page is added to the bio if sdio->boundary is set. This > > is actually wrong because sdio->boundary means the current buffer is the > > last one before metadata needs to be read. So we should rather submit > > the bio after the current page is added to it. > > > > Reported-by: Kazuya Mio > > Signed-off-by: Jan Kara > > --- > > fs/direct-io.c | 28 +++++++++++----------------- > > 1 files changed, 11 insertions(+), 17 deletions(-) > > > > Andrew, can you add this patch the previous direct IO boundary handling fix? > > What is the user-visible impact of these two patches? I've measured about 10% throughput improvement of direct IO reads on ext3 with SATA harddrive (from 90 MB/s to 100 MB/s) with these patches applied. With ramdisk, the improvement was about 3-fold (from 350 MB/s to 1.2 GB/s). For other filesystems (such as ext4), the improvements won't be as visible because the frequency of BH_Boundary flag being set is much smaller... Honza -- Jan Kara SUSE Labs, CR