public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio_blk: don't bounce highmem requests
@ 2009-06-19 18:20 Christoph Hellwig
  2009-06-20 18:32 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2009-06-19 18:20 UTC (permalink / raw)
  To: rusty; +Cc: linux-kernel, kvm


By default a block driver bounces highmem requests, but virtio-blk is
perfectly fine with any request that fit into it's 64 bit addressing scheme,
mapped in the kernel virtual space or not.

Besides improving performance on highmem systems this also makes the
reproducible oops in __bounce_end_io go away (but hiding the real cause).

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/drivers/block/virtio_blk.c
===================================================================
--- linux-2.6.orig/drivers/block/virtio_blk.c	2009-06-15 16:28:24.225815322 +0200
+++ linux-2.6/drivers/block/virtio_blk.c	2009-06-19 18:03:12.469805377 +0200
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struc
 	blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2);
 	blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2);
 
+	/* No need to bounce any requests */
+	blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);
+
 	/* No real sector limit. */
 	blk_queue_max_sectors(vblk->disk->queue, -1U);
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio_blk: don't bounce highmem requests
  2009-06-19 18:20 [PATCH] virtio_blk: don't bounce highmem requests Christoph Hellwig
@ 2009-06-20 18:32 ` Christoph Hellwig
  2009-06-23  7:12   ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2009-06-20 18:32 UTC (permalink / raw)
  To: rusty; +Cc: linux-kernel, kvm

Looks like I sent a patch that doesn't actually compile because qui
decided to apply those fixes to a different one.  Here's the correc
one:

--

Subject: virtio_blk: don't bounce highmem requests
From: Christoph Hellwig <hch@lst.de>

By default a block driver bounces highmem requests, but virtio-blk is
perfectly fine with any request that fit into it's 64 bit addressing scheme,
mapped in the kernel virtual space or not.

Besides improving performance on highmem systems this also makes the
reproducible oops in __bounce_end_io go away (but hiding the real cause).

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/drivers/block/virtio_blk.c
===================================================================
--- linux-2.6.orig/drivers/block/virtio_blk.c	2009-06-20 20:11:44.769929544 +0200
+++ linux-2.6/drivers/block/virtio_blk.c	2009-06-20 20:20:29.661804686 +0200
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struc
 	blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2);
 	blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2);
 
+	/* No need to bounce any requests */
+	blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY);
+
 	/* No real sector limit. */
 	blk_queue_max_sectors(vblk->disk->queue, -1U);
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio_blk: don't bounce highmem requests
  2009-06-20 18:32 ` Christoph Hellwig
@ 2009-06-23  7:12   ` Rusty Russell
  2009-07-08 18:10     ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2009-06-23  7:12 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, kvm

On Sun, 21 Jun 2009 04:02:15 am Christoph Hellwig wrote:
> Looks like I sent a patch that doesn't actually compile because qui
> decided to apply those fixes to a different one.  Here's the correc
> one:
>
> --
>
> Subject: virtio_blk: don't bounce highmem requests
> From: Christoph Hellwig <hch@lst.de>
>
> By default a block driver bounces highmem requests, but virtio-blk is
> perfectly fine with any request that fit into it's 64 bit addressing
> scheme, mapped in the kernel virtual space or not.

Thanks, applied.

I had no idea we had to set a bounce limit; wonder what else the driver 
doesn't do?

Thanks,
Rusty.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio_blk: don't bounce highmem requests
  2009-06-23  7:12   ` Rusty Russell
@ 2009-07-08 18:10     ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2009-07-08 18:10 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Christoph Hellwig, linux-kernel, kvm

On Tue, Jun 23, 2009 at 04:42:52PM +0930, Rusty Russell wrote:
> On Sun, 21 Jun 2009 04:02:15 am Christoph Hellwig wrote:
> > Looks like I sent a patch that doesn't actually compile because qui
> > decided to apply those fixes to a different one.  Here's the correc
> > one:
> >
> > --
> >
> > Subject: virtio_blk: don't bounce highmem requests
> > From: Christoph Hellwig <hch@lst.de>
> >
> > By default a block driver bounces highmem requests, but virtio-blk is
> > perfectly fine with any request that fit into it's 64 bit addressing
> > scheme, mapped in the kernel virtual space or not.
> 
> Thanks, applied.

Can you forward it to Linus for 2.6.31?  It's a trivial fix for an issue
causing a lot of pain to people with highmem enabled.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-08 18:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 18:20 [PATCH] virtio_blk: don't bounce highmem requests Christoph Hellwig
2009-06-20 18:32 ` Christoph Hellwig
2009-06-23  7:12   ` Rusty Russell
2009-07-08 18:10     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox