From patchwork Thu Dec 22 15:40:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9485165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CEF9A600BA for ; Thu, 22 Dec 2016 15:40:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0F7327FB2 for ; Thu, 22 Dec 2016 15:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5AC328174; Thu, 22 Dec 2016 15:40:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 529FF280F4 for ; Thu, 22 Dec 2016 15:40:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933162AbcLVPkw (ORCPT ); Thu, 22 Dec 2016 10:40:52 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:43541 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755570AbcLVPkv (ORCPT ); Thu, 22 Dec 2016 10:40:51 -0500 Received: from hch by bombadil.infradead.org with local (Exim 4.85_2 #1 (Red Hat Linux)) id 1cK5U9-0002Ss-HI; Thu, 22 Dec 2016 15:40:49 +0000 Date: Thu, 22 Dec 2016 07:40:49 -0800 From: Christoph Hellwig To: Laurence Oberman Cc: Christoph Hellwig , Bart Van Assche , linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: Testing latest linux-next 4.9 ib_srp and ib_srpt sees I/O capped at 1MB and no merging Message-ID: <20161222154049.GA4638@infradead.org> References: <07c07529-4636-fafb-2598-7358d8a1460d@sandisk.com> <1918919536.8196250.1482262406057.JavaMail.zimbra@redhat.com> <2052479881.8196880.1482263028727.JavaMail.zimbra@redhat.com> <1668746735.8200653.1482266682585.JavaMail.zimbra@redhat.com> <120559766.8215321.1482291094018.JavaMail.zimbra@redhat.com> <1928955380.8220327.1482302041315.JavaMail.zimbra@redhat.com> <1337539588.8422488.1482372617094.JavaMail.zimbra@redhat.com> <20161222062321.GA30326@infradead.org> <1661819060.8462293.1482412678092.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1661819060.8462293.1482412678092.JavaMail.zimbra@redhat.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Laurance, please try the patch below: --- From 69febe1cfb55844862f768447432249781001f9c Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 22 Dec 2016 16:38:29 +0100 Subject: block: add back plugging in __blkdev_direct_IO This allows sending larger than 1 MB requess to devices that support large I/O sizes. Signed-off-by: Christoph Hellwig Reported-by: Laurence Oberman --- fs/block_dev.c | 3 +++ fs/iomap.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 7c45072..206a92a 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -328,6 +328,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) struct file *file = iocb->ki_filp; struct inode *inode = bdev_file_inode(file); struct block_device *bdev = I_BDEV(inode); + struct blk_plug plug; struct blkdev_dio *dio; struct bio *bio; bool is_read = (iov_iter_rw(iter) == READ); @@ -353,6 +354,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) dio->multi_bio = false; dio->should_dirty = is_read && (iter->type == ITER_IOVEC); + blk_start_plug(&plug); for (;;) { bio->bi_bdev = bdev; bio->bi_iter.bi_sector = pos >> 9; @@ -394,6 +396,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) submit_bio(bio); bio = bio_alloc(GFP_KERNEL, nr_pages); } + blk_finish_plug(&plug); if (!dio->is_sync) return -EIOCBQUEUED; diff --git a/fs/iomap.c b/fs/iomap.c index 354a123..3adf1e1 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -844,7 +844,6 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, struct iomap_ops *ops, size_t count = iov_iter_count(iter); loff_t pos = iocb->ki_pos, end = iocb->ki_pos + count - 1, ret = 0; unsigned int flags = IOMAP_DIRECT; - struct blk_plug plug; struct iomap_dio *dio; lockdep_assert_held(&inode->i_rwsem);