From: Christoph Hellwig <hch@infradead.org>
To: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
suruchi <suruchi.a.kadu@intel.com>, ak <ak@linux.intel.com>,
Dave Hansen <dave.hansen@intel.com>,
Matthew Wilcox <willy@linux.intel.com>,
"hubert.nueckel" <hubert.nueckel@intel.com>,
beth.marsh-prime@intel.com, "doug.nelson" <doug.nelson@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [Regression 3.16-rc kernel] -55% reduction in throughput for OLTP benchmark
Date: Tue, 29 Jul 2014 09:49:51 -0700 [thread overview]
Message-ID: <20140729164951.GA23863@infradead.org> (raw)
In-Reply-To: <1406651702.2970.927.camel@schen9-DESK>
On Tue, Jul 29, 2014 at 09:35:02AM -0700, Tim Chen wrote:
> On Tue, 2014-07-29 at 07:19 -0700, Christoph Hellwig wrote:
> > Hi Tim,
> >
> > I think the problem is that sdio.size doesn't get set set with
> > the new dio code. Please try the patch below to fix this by not
> > relying on that field:
>
> Thanks for your quick response. We'll test this patch and let you
> know the results.
There actually was a little bug in it, please try the version below
instead:
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 194d0d1..17e39b0 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -71,7 +71,6 @@ struct dio_submit {
been performed at the start of a
write */
int pages_in_io; /* approximate total IO pages */
- size_t size; /* total request size (doesn't change)*/
sector_t block_in_file; /* Current offset into the underlying
file in dio_block units. */
unsigned blocks_available; /* At block_in_file. changes */
@@ -1104,7 +1103,8 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
unsigned blkbits = i_blkbits;
unsigned blocksize_mask = (1 << blkbits) - 1;
ssize_t retval = -EINVAL;
- loff_t end = offset + iov_iter_count(iter);
+ size_t count = iov_iter_count(iter);
+ loff_t end = offset + count;
struct dio *dio;
struct dio_submit sdio = { 0, };
struct buffer_head map_bh = { 0, };
@@ -1287,10 +1287,9 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
*/
BUG_ON(retval == -EIOCBQUEUED);
if (dio->is_async && retval == 0 && dio->result &&
- ((rw == READ) || (dio->result == sdio.size)))
+ (rw == READ || dio->result == count))
retval = -EIOCBQUEUED;
-
- if (retval != -EIOCBQUEUED)
+ else
dio_await_completion(dio);
if (drop_refcount(dio) == 0) {
next prev parent reply other threads:[~2014-07-29 16:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 21:51 [Regression 3.16-rc kernel] -55% reduction in throughput for OLTP benchmark Tim Chen
2014-07-29 14:19 ` Christoph Hellwig
2014-07-29 16:35 ` Tim Chen
2014-07-29 16:49 ` Christoph Hellwig [this message]
2014-07-29 17:41 ` Tim Chen
2014-07-29 23:57 ` Tim Chen
2014-07-30 0:12 ` Christoph Hellwig
2014-07-31 16:13 ` Tim Chen
2014-07-31 17:07 ` Linus Torvalds
2014-07-31 17:10 ` Christoph Hellwig
2014-07-31 17:22 ` Linus Torvalds
2014-08-01 6:45 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140729164951.GA23863@infradead.org \
--to=hch@infradead.org \
--cc=ak@linux.intel.com \
--cc=beth.marsh-prime@intel.com \
--cc=dave.hansen@intel.com \
--cc=doug.nelson@intel.com \
--cc=hubert.nueckel@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suruchi.a.kadu@intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).