RE: [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Liu, Changpeng
> -Original Message- > From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > Sent: Tuesday, March 28, 2017 4:20 AM > To: Liu, Changpeng > Cc: virtio-...@lists.oasis-open.org; > virtualization@lists.linux-foundation.org; linux- > ker...@vger.kernel.org;

RE: [virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Liu, Changpeng
> -Original Message- > From: virtio-...@lists.oasis-open.org > [mailto:virtio-...@lists.oasis-open.org] On > Behalf Of Paolo Bonzini > Sent: Monday, March 27, 2017 7:34 PM > To: Liu, Changpeng ; virtio-...@lists.oasis-open.org; >

RE: [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Liu, Changpeng
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Monday, March 27, 2017 10:56 PM > To: Liu, Changpeng > Cc: virtio-...@lists.oasis-open.org; > virtualization@lists.linux-foundation.org; linux- > ker...@vger.kernel.org; h...@lst.de;

Re: [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Stefan Hajnoczi
On Tue, Mar 28, 2017 at 04:39:25PM +0800, Changpeng Liu wrote: > Currently virtio-blk driver does not provide discard feature flag, so the > filesystems which built on top of the block device will not send discard > command. This is okay for HDD backend, but it will impact the performance > for

Re: [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour'

2017-03-27 Thread James Hogan
Hi Marcel, On Tue, Mar 21, 2017 at 04:16:58PM +0200, Marcel Apfelbaum wrote: > Can you please check if the below patch fixes the problem? > Please note it is not a solution. > > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c > index f9b7244..5b4d429 100644 > ---

Re: [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Christoph Hellwig
On Tue, Mar 28, 2017 at 04:39:25PM +0800, Changpeng Liu wrote: > Currently virtio-blk driver does not provide discard feature flag, so the > filesystems which built on top of the block device will not send discard > command. This is okay for HDD backend, but it will impact the performance > for

Re: [virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Paolo Bonzini
On 28/03/2017 10:39, Changpeng Liu wrote: > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > + q->limits.discard_zeroes_data = 0; Maybe you could use another feature bit to populate discard_zeroes_data. Paolo > + q->limits.discard_alignment = blk_size; > +

Re: [PATCH] virtio_balloon: prevent uninitialized variable use

2017-03-27 Thread Ladi Prosek
On Fri, Mar 24, 2017 at 9:59 PM, Michael S. Tsirkin wrote: > On Fri, Mar 24, 2017 at 09:40:07PM +0100, Arnd Bergmann wrote: >> On Fri, Mar 24, 2017 at 9:11 PM, Ladi Prosek wrote: >> > On Fri, Mar 24, 2017 at 7:38 PM, David Hildenbrand >> >

[PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Changpeng Liu
Currently virtio-blk driver does not provide discard feature flag, so the filesystems which built on top of the block device will not send discard command. This is okay for HDD backend, but it will impact the performance for SSD backend. Add a feature flag VIRTIO_BLK_F_DISCARD and command