public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-2.6.31] virtio_blk: revert QUEUE_FLAG_VIRT addition
@ 2009-09-04 20:44 Christoph Hellwig
  2009-09-04 21:18 ` Jeff Moyer
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2009-09-04 20:44 UTC (permalink / raw)
  To: Rusty Russell; +Cc: kvm, linux-kernel, Mark McLoughlin

It seems like the addition of QUEUE_FLAG_VIRT caueses major performance
regressions for Fedora users:

	https://bugzilla.redhat.com/show_bug.cgi?id=509383
	https://bugzilla.redhat.com/show_bug.cgi?id=505695

while I can't reproduce those extreme regressions myself I think the flag
is wrong.

Rationale:

  QUEUE_FLAG_VIRT expands to QUEUE_FLAG_NONROT which casus the queue
  unplugged immediately.  This is not a good behaviour for at least
  qemu and kvm where we do have significant overhead for every
  I/O operations.  Even with all the latested speeups (native AIO,
  MSI support, zero copy) we can only get native speed for up to 128kb
  I/O requests we already are down to 66% of native performance for 4kb
  requests even on my laptop running the Intel X25-M SSD for which the
  QUEUE_FLAG_NONROT was designed.
  If we ever get virtio-blk overhead low enough that this flag makes
  sense it should only be set based on a feature flag set by the host.
	
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-09-04 17:33:48.802523987 -0300
+++ linux-2.6/drivers/block/virtio_blk.c	2009-09-04 17:33:56.186522158 -0300
@@ -314,7 +314,6 @@ static int __devinit virtblk_probe(struc
 	}
 
 	vblk->disk->queue->queuedata = vblk;
-	queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue);
 
 	if (index < 26) {
 		sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);

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

* Re: [PATCH for-2.6.31] virtio_blk: revert QUEUE_FLAG_VIRT addition
  2009-09-04 20:44 [PATCH for-2.6.31] virtio_blk: revert QUEUE_FLAG_VIRT addition Christoph Hellwig
@ 2009-09-04 21:18 ` Jeff Moyer
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Moyer @ 2009-09-04 21:18 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Rusty Russell, kvm, linux-kernel, Mark McLoughlin

Christoph Hellwig <hch@lst.de> writes:

> It seems like the addition of QUEUE_FLAG_VIRT caueses major performance
> regressions for Fedora users:
>
> 	https://bugzilla.redhat.com/show_bug.cgi?id=509383
> 	https://bugzilla.redhat.com/show_bug.cgi?id=505695
>
> while I can't reproduce those extreme regressions myself I think the flag
> is wrong.
>
> Rationale:
>
>   QUEUE_FLAG_VIRT expands to QUEUE_FLAG_NONROT which casus the queue
>   unplugged immediately.  This is not a good behaviour for at least
>   qemu and kvm where we do have significant overhead for every
>   I/O operations.  Even with all the latested speeups (native AIO,
>   MSI support, zero copy) we can only get native speed for up to 128kb
>   I/O requests we already are down to 66% of native performance for 4kb
>   requests even on my laptop running the Intel X25-M SSD for which the
>   QUEUE_FLAG_NONROT was designed.
>   If we ever get virtio-blk overhead low enough that this flag makes
>   sense it should only be set based on a feature flag set by the host.

I agree with that rationale.

Acked-by: Jeff Moyer <jmoyer@redhat.com>

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

end of thread, other threads:[~2009-09-04 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-04 20:44 [PATCH for-2.6.31] virtio_blk: revert QUEUE_FLAG_VIRT addition Christoph Hellwig
2009-09-04 21:18 ` Jeff Moyer

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