All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: linux-block@vger.kernel.org
Cc: axboe@kernel.dk, Kernel-team@fb.com, Shaohua Li <shli@fb.com>
Subject: [PATCH V2 1/2] block/loop: set hw_sectors
Date: Thu, 24 Aug 2017 12:24:52 -0700	[thread overview]
Message-ID: <92dafefc8c0b64eaaf51298734ebe4aa7d880046.1503602376.git.shli@fb.com> (raw)
In-Reply-To: <cover.1503602376.git.shli@fb.com>
In-Reply-To: <cover.1503602376.git.shli@fb.com>

From: Shaohua Li <shli@fb.com>

Loop can handle any size of request. Limiting it to 255 sectors just
burns the CPU for bio split and request merge for underlayer disk and
also cause bad fs block allocation in directio mode.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
---
 drivers/block/loop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index b55a1f8..428da07 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1799,6 +1799,7 @@ static int loop_add(struct loop_device **l, int i)
 	}
 	lo->lo_queue->queuedata = lo;
 
+	blk_queue_max_hw_sectors(lo->lo_queue, BLK_DEF_MAX_SECTORS);
 	/*
 	 * It doesn't make sense to enable merge because the I/O
 	 * submitted to backing file is handled page by page.
-- 
2.9.5

  reply	other threads:[~2017-08-24 19:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 19:24 [PATCH V2 0/2] block/loop: improve performance Shaohua Li
2017-08-24 19:24 ` Shaohua Li [this message]
2017-08-29  9:35   ` [PATCH V2 1/2] block/loop: set hw_sectors Ming Lei
2017-08-24 19:24 ` [PATCH V2 2/2] block/loop: allow request merge for directio mode Shaohua Li
2017-08-29  9:56   ` Ming Lei
2017-08-29 15:13     ` Shaohua Li
2017-08-30  2:51       ` Ming Lei
2017-08-30  4:43         ` Shaohua Li
2017-08-30  6:43           ` Ming Lei
2017-08-30 22:06             ` Shaohua Li
2017-08-31  3:25               ` Ming Lei

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=92dafefc8c0b64eaaf51298734ebe4aa7d880046.1503602376.git.shli@fb.com \
    --to=shli@kernel.org \
    --cc=Kernel-team@fb.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=shli@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.