* [PATCH] nbd: increase default and max request sizes
@ 2013-04-02 19:41 Paul Clements
2013-04-11 22:34 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Paul Clements @ 2013-04-02 19:41 UTC (permalink / raw)
To: akpm, linux-kernel, belczyk
This patch raises the default max request size for nbd to 128KB (from 127KB)
to get it 4KB aligned. This patch also allows the max request size to be
increased (via /sys/block/nbd<x>/queue/max_sectors_kb) to 32MB.
The patch makes nbd network traffic more efficient by:
- reducing request fragmentation (4KB alignment)
- reducing the number of requests (fewer round trips, less network overhead)
Especially in high latency networks, larger request size can make a dramatic
difference in performance.
From: Michal Belczyk <belczyk@bsd.krakow.pl>
Signed-off-by: Paul Clements <paul.clements@steeleye.com>
---
nbd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 7fecc78..037288e 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -856,6 +856,8 @@ static int __init nbd_init(void)
disk->queue->limits.discard_granularity = 512;
disk->queue->limits.max_discard_sectors = UINT_MAX;
disk->queue->limits.discard_zeroes_data = 0;
+ blk_queue_max_hw_sectors(disk->queue, 65536);
+ disk->queue->limits.max_sectors = 256;
}
if (register_blkdev(NBD_MAJOR, "nbd")) {
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] nbd: increase default and max request sizes
2013-04-02 19:41 [PATCH] nbd: increase default and max request sizes Paul Clements
@ 2013-04-11 22:34 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2013-04-11 22:34 UTC (permalink / raw)
To: Paul Clements; +Cc: linux-kernel, belczyk
On Tue, 2 Apr 2013 15:41:20 -0400 (EDT) Paul Clements <paul.clements@steeleye.com> wrote:
> This patch raises the default max request size for nbd to 128KB (from 127KB)
> to get it 4KB aligned. This patch also allows the max request size to be
> increased (via /sys/block/nbd<x>/queue/max_sectors_kb) to 32MB.
>
> The patch makes nbd network traffic more efficient by:
> - reducing request fragmentation (4KB alignment)
> - reducing the number of requests (fewer round trips, less network overhead)
>
> Especially in high latency networks, larger request size can make a dramatic
> difference in performance.
>
> From: Michal Belczyk <belczyk@bsd.krakow.pl>
> Signed-off-by: Paul Clements <paul.clements@steeleye.com>
This is a bit odd.
- The author's "From:" line shouild appear right at the start of the
changelog.
- Michal's Signed-off-by: is absent. Is one available?
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-11 22:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-02 19:41 [PATCH] nbd: increase default and max request sizes Paul Clements
2013-04-11 22:34 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox