[Qemu-devel] [PATCH] Avoiding extra iterations while closing file fd

2014-03-12 Thread Pankaj Gupta
Avoiding iterations for fd 0, 1 & 2 when we are closing file fds in child process. Signed-off-by: Pankaj Gupta --- net/tap.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/net/tap.c b/net/tap.c index 2d5099b..3253838 100644 --- a/net/tap.c +++ b/net/t

[Qemu-devel] [RFC] net: 'Remove vhostforce option in addition to vhost param'

2015-02-11 Thread Pankaj Gupta
vhost on the basis of vhost=ON/OFF. Signed-off-by: Pankaj Gupta --- net/tap.c| 4 +--- net/vhost-user.c | 16 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/net/tap.c b/net/tap.c index 1fe0edf..bd2efa9 100644 --- a/net/tap.c +++ b/net/tap.c @@ -634,13 +6

Re: [Qemu-devel] [RFC] net: 'Remove vhostforce option in addition to vhost param'

2015-02-12 Thread Pankaj Gupta
> On Thu, Feb 12, 2015 at 11:50:05AM +0530, Pankaj Gupta wrote: > > vhostforce was added to enable use of vhost when > > guest don't have MSI-X support. > > Now, we have scenarios which dont use interrupts > > like DPDK and still use vhost. Also, performa

Re: [Qemu-devel] [RFC] net: 'Remove vhostforce option in addition to vhost param'

2015-02-12 Thread Pankaj Gupta
> > > On Thu, Feb 12, 2015 at 11:50:05AM +0530, Pankaj Gupta wrote: > > > vhostforce was added to enable use of vhost when > > > guest don't have MSI-X support. > > > Now, we have scenarios which dont use interrupts > > > like DPDK and s

Re: [Qemu-devel] [RFC] net: 'Remove vhostforce option in addition to vhost param'

2015-02-19 Thread Pankaj Gupta
I was also searching for "kvm eventfd support for injecting level-triggered interrupts", For non-MSIX guests, can we remove vhost-force unless we have this feature? Best regards, Pankaj - Original Message - > From: "Jason Wang" > To: "Pankaj Gupta&q

Re: [Qemu-devel] balloon vs postcopy migrate

2015-02-03 Thread Pankaj Gupta
> Hi, > Andrea pointed out there is a risk that a guest inflating its > balloon during a postcopy migrate could cause us problems, and > I wanted to see what the best way of avoiding the problem was. > > Guests inflating there balloon cause an madvise(MADV_DONTNEED) on > the host, marking pages

[Qemu-devel] requesting for creating user name

2014-12-14 Thread Pankaj Gupta
Hi, kindly help me ... Kindly create an user id for the my name to access QEMU materials. Preferred user ID: Pankajusic ​Thanks for the support.​ -- Thanks with Regards: Pankaj Kumar Gupta Hyderabad, Telangana cell: *+91-9035486588*

Re: [Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-05-26 Thread Pankaj Gupta
sts > without MSI-X support is getting less popular. > > Its OK to remove this extra option and enable vhost > on the basis of vhost=ON/OFF. > Done basic testing with vhost on/off for latest guests > and old guests(non-msix). > > Signed-off-by: Pankaj Gupta > --- >

Re: [Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-05-28 Thread Pankaj Gupta
gt; > > on the basis of vhost=ON/OFF. > > > Done basic testing with vhost on/off for latest guests > > > and old guests(non-msix). > > > > > > Signed-off-by: Pankaj Gupta > > I think this silently changes the command line semantics: > previously vhos

[Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-03-08 Thread Pankaj Gupta
vhost on the basis of vhost=ON/OFF. Done basic testing with vhost on/off for latest guests and old guests(non-msix). Signed-off-by: Pankaj Gupta --- hw/net/vhost_net.c| 2 +- hw/scsi/vhost-scsi.c | 2 +- hw/virtio/vhost.c | 6 ++ include/hw/virtio/vhost.h | 3 +-- in

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-02-04 Thread Pankaj Gupta
Hi Ladi, I think this is fine if we have multiple requests from Guests and depending on entropy pool available we can honour individual requests and return with the entropy. Just one point I have is, Suppose we have multiple requests from Guests and we are returning if request length < 0 for

Re: [Qemu-devel] [PATCH] rng-random: implement request queue

2016-02-04 Thread Pankaj Gupta
> > Hi Pankaj, > > - Original Message - > > > > Hi Ladi, > > > > I think this is fine if we have multiple requests from Guests and > > depending on entropy pool available we can honour individual requests > > and return with the entropy. > > > > Just one point I have is, Suppose we ha

Re: [Qemu-devel] [PATCH v2 0/4] rng-random: implement request queue

2016-02-15 Thread Pankaj Gupta
> > As suggested by Paolo, I have moved the RngRequest implementation > up to the RngBackend parent class and made both child classes use > it. Apart from the refactoring, the only functional change > compared to v1 is the use of heap instead of stack allocation for > the read buffer in rng-rando

[Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support

2015-06-05 Thread Pankaj Gupta
additional argument. But after discussing this in mailing list found that some programs are using vhostforce and some vhost. So, we want to keep semantics of both the options. Signed-off-by: Pankaj Gupta --- net/tap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ne

Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support

2015-06-11 Thread Pankaj Gupta
> > On 06/05/2015 10:32 PM, Pankaj Gupta wrote: > > We use vhostforce to enable vhost even if Guests don't have MSI-X > > support > > and we fall back to QEMU virtio-net. This patch will enable vhost > > unconditionally > > when

Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support

2015-06-12 Thread Pankaj Gupta
> > On 06/11/2015 07:49 PM, Pankaj Gupta wrote: > >> On 06/05/2015 10:32 PM, Pankaj Gupta wrote: > >>> We use vhostforce to enable vhost even if Guests don't have MSI-X > >>> support > >>> and we fall back to QEMU virtio

[Qemu-devel] [PATCH] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-10 Thread Pankaj Gupta
resulting in extra processing. This patch triggers timer only when guest requests for entropy. As soon as first request from guest for entropy comes we set the timer. Timer bumps up the quota value when it gets triggered. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-rng.c | 15

Re: [Qemu-devel] [PATCH] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-12 Thread Pankaj Gupta
Hi Amit, Thanks for the review. > > On (Fri) 10 Jul 2015 [15:04:00], Pankaj Gupta wrote: > >    Timer was added in virtio-rng to rate limit the > > entropy. It used to trigger at regular intervals to > > bump up the quota value. The value of quota and timer > > sli

Re: [Qemu-devel] [PATCH] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-13 Thread Pankaj Gupta
> > Hi Amit, > > > > Thanks for the review. > > > > > > > > On (Fri) 10 Jul 2015 [15:04:00], Pankaj Gupta wrote: > > > >    Timer was added in virtio-rng to rate limit the > > > > entropy. It used to trigger at regular interval

Re: [Qemu-devel] [PATCH] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-13 Thread Pankaj Gupta
> On Fri, Jul 10, 2015 at 03:04:00PM +0530, Pankaj Gupta wrote: > > @@ -196,13 +201,9 @@ static void virtio_rng_device_realize(DeviceState > > *dev, Error **errp) > >   > >      vrng->vq = virtio_add_queue(vdev, 8, handle_input); > >      vrng->

Re: [Qemu-devel] [PATCH] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-13 Thread Pankaj Gupta
> On (Mon) 13 Jul 2015 [04:01:01], Pankaj Gupta wrote: > > > > > > Hi Amit, > > > > > > > > Thanks for the review. > > > > > > > > > > > > > > On (Fri) 10 Jul 2015 [15:04:00], Pankaj Gupta wrote: > &g

[Qemu-devel] (no subject)

2015-07-14 Thread Pankaj Gupta
Subject: [PATCH 0/2 v2] virtio-rng: Avoid uncessary timer trigger to bump up quota value Timer was added in virtio-rng to rate limit the entropy. It used to trigger at regular intervals to bump up the quota value. The value of quota and timer is used to ensure single guest should not use up all

[Qemu-devel] [PATCH 1/2 v2] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-14 Thread Pankaj Gupta
This patch triggers timer only when guest requests for entropy. As soon as first request from guest for entropy comes we set the timer. Timer bumps up the quota value when it gets triggered. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-rng.c | 15 --- include/hw

[Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-14 Thread Pankaj Gupta
patch also moves out 'request size' logic out to 'check_request' function so that can be re-used. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-rng.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/hw/virtio/virtio

[Qemu-devel] [PATCH 0/2 v2] virtio-rng: Avoid uncessary timer trigger to bump up quota value

2015-07-14 Thread Pankaj Gupta
Timer was added in virtio-rng to rate limit the entropy. It used to trigger at regular intervals to bump up the quota value. The value of quota and timer is used to ensure single guest should not use up all the entropy from the host. This resulted in triggering of timer even when quota is not exha

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
- Original Message - > From: "Amit Shah" > To: "Pankaj Gupta" > Cc: qemu-devel@nongnu.org, m...@redhat.com > Sent: Wednesday, 15 July, 2015 12:09:57 PM > Subject: Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if > any after

Re: [Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
> On (Wed) 15 Jul 2015 [03:05:06], Pankaj Gupta wrote: > > > > > > - Original Message - > > > From: "Amit Shah" > > > To: "Pankaj Gupta" > > > Cc: qemu-devel@nongnu.org, m...@redhat.com > > > Sent: Wedne

[Qemu-devel] [PATCH 1/2 v3] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-15 Thread Pankaj Gupta
This patch triggers timer only when guest requests for entropy. As soon as first request from guest for entropy comes we set the timer. Timer bumps up the quota value when it gets triggered. Signed-off-by: Pankaj Gupta Reviewed-by: Amit Shah --- hw/virtio/virtio-rng.c | 15

[Qemu-devel] [PATCH 0/2 v3] virtio-rng: Avoid uncessary timer trigger to bump up quota value

2015-07-15 Thread Pankaj Gupta
Timer was added in virtio-rng to rate limit the entropy. It used to trigger at regular intervals to bump up the quota value. The value of quota and timer is used to ensure single guest should not use up all the entropy from the host. This resulted in triggering of timer even when quota is not exha

[Qemu-devel] [PATCH 2/2 v3] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
ff-by: Pankaj Gupta --- hw/virtio/virtio-rng.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index ae04352..3d9a002 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -142,9 +142,13 @@ static int virtio_rng

Re: [Qemu-devel] [PATCH 2/2 v3] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-15 Thread Pankaj Gupta
- Original Message - > From: "Amit Shah" > To: "Pankaj Gupta" > Cc: qemu-devel@nongnu.org, m...@redhat.com > Sent: Thursday, 16 July, 2015 11:35:36 AM > Subject: Re: [Qemu-devel] [PATCH 2/2 v3] virtio-rng: Serve pending request if > any after time

[Qemu-devel] [PATCH v3] Enable vhost with vhostforce, vhost options for guests without MSI-X support

2015-06-16 Thread Pankaj Gupta
semantic for options vhost= 'ON' || vhostforce = 'ON', vhost should be ON. Signed-off-by: Pankaj Gupta --- hw/net/vhost_net.c| 12 +--- hw/net/virtio-net.c | 4 hw/scsi/vhost-scsi.c | 2 +- hw/virtio/vhost.c | 14 +---

Re: [Qemu-devel] [PATCH] rng-random: rename RndRandom to RngRandom

2016-04-29 Thread Pankaj Gupta
Code changes look fine to me. > > Usually, Random Number Generator is abbreviated to RNG/rng. > so replacing RndRandom with RngRandom seems more reasonable > and keep consistent with RngBackend. Reviewed-by: Pankaj Gupta > > Signed-off-by: Wei Jiangang > --- >

Re: [Qemu-devel] [PATCH v7 4/6] dax: check synchronous mapping is supported

2019-05-07 Thread Pankaj Gupta
> > From: Pankaj Gupta > Date: Thu, Apr 25, 2019 at 10:00 PM > > > +static inline bool daxdev_mapping_supported(struct vm_area_struct *vma, > > + struct dax_device *dax_dev) > > +{ > > + return !(vma->flags & V

Re: [Qemu-devel] [PATCH v7 6/6] xfs: disable map_sync for async flush

2019-05-07 Thread Pankaj Gupta
> > On Tue, May 07, 2019 at 08:37:01AM -0700, Dan Williams wrote: > > On Thu, Apr 25, 2019 at 10:03 PM Pankaj Gupta wrote: > > > > > > Dont support 'MAP_SYNC' with non-DAX files and DAX files > > > with asynchronous dax_device. Virtio pmem

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Pankaj Gupta
> > On 4/25/19 10:00 PM, Pankaj Gupta wrote: > > > +void host_ack(struct virtqueue *vq) > > +{ > > + unsigned int len; > > + unsigned long flags; > > + struct virtio_pmem_request *req, *req_buf; > > + struct virtio_pmem *vpmem = vq->vd

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Pankaj Gupta
Hi Dan, Thank you for the review. Please see my reply inline. > > Hi Pankaj, > > Some minor file placement comments below. Sure. > > On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote: > > > > This patch adds virtio-pmem driver for KVM guest. > > &

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-08 Thread Pankaj Gupta
> > > > > +int virtio_pmem_flush(struct nd_region *nd_region) > > > +{ > > > +int err; > > > +unsigned long flags; > > > +struct scatterlist *sgs[2], sg, ret; > > > +struct virtio_device *vdev = nd_region->provider_data; > > > +struct virtio_pmem *vpmem =

Re: [Qemu-devel] [PATCH v7 3/6] libnvdimm: add dax_dev sync flag

2019-05-09 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_SYNC' flag which is set > > for nd_region doing synchronous flush. This later > > is used to disable MAP_SYNC functionality for > > ext4 & xfs filesystem for devices don't support > > synchronous flush. >

[Qemu-devel] [PATCH v8 2/6] virtio-pmem: Add virtio pmem driver

2019-05-10 Thread Pankaj Gupta
orms flush on DAX memory range. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia --- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 129 +++ drivers/nvdimm/virtio_pmem.c | 117 drivers/virtio/Kconfig

[Qemu-devel] [PATCH v8 1/6] libnvdimm: nd_region flush callback support

2019-05-10 Thread Pankaj Gupta
ed by host fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -

[Qemu-devel] [PATCH v8 4/6] dax: check synchronous mapping is supported

2019-05-10 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara S

[Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c|

[Qemu-devel] [PATCH v8 5/6] ext4: disable map_sync for async flush

2019-05-10 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara

[Qemu-devel] [PATCH v8 6/6] xfs: disable map_sync for async flush

2019-05-10 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong -

[Qemu-devel] [PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Pankaj Gupta
nsio_rw_bytes() that the flush can fail - Rename nvdimm_flush() to generic_nvdimm_flush() - Use 'nd_region->provider_data' for long dereferencing - Remove virtio_pmem_freeze/restore functions - Remove BSD license text with SPDX license text - Add might_sleep() in virtio_pmem_flush

Re: [Qemu-devel] [PATCH v8 0/6] virtio pmem driver

2019-05-10 Thread Pankaj Gupta
virtio patch 2 from Micahel. Thank you for all your help. Best regards, Pankaj Gupta >

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_SYNC' flag which is set > > for nd_region doing synchronous flush. This later > > is used to disable MAP_SYNC functionality for > > ext4 & xfs filesystem for devices don't support > > synchronous flush. &g

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-10 Thread Pankaj Gupta
> > > > > > > > This patch adds 'DAXDEV_SYNC' flag which is set > > > > for nd_region doing synchronous flush. This later > > > > is used to disable MAP_SYNC functionality for > > > > ext4 & xfs filesystem for devices don&

Re: [Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver

2019-05-10 Thread Pankaj Gupta
> > > > Hi Dan, > > > > Thank you for the review. Please see my reply inline. > > > > > > > > Hi Pankaj, > > > > > > Some minor file placement comments below. > > > > Sure. > > > > > > > > On

Re: [Qemu-devel] [PATCH v8 2/6] virtio-pmem: Add virtio pmem driver

2019-05-12 Thread Pankaj Gupta
; > VIRTIO from 'pmem' driver when userspace performs flush > > on DAX memory range. > > > > Signed-off-by: Pankaj Gupta > > Reviewed-by: Yuval Shaia > > Acked-by: Michael S. Tsirkin Thank you, Michael. Best regards, Pankaj > > > --- > &

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-13 Thread Pankaj Gupta
Hi Dan, While testing device mapper with DAX, I faced a bug with the commit: commit ad428cdb525a97d15c0349fdc80f3d58befb50df Author: Dan Williams Date: Wed Feb 20 21:12:50 2019 -0800 When I reverted the condition to old code[1] it worked for me. I am thinking when we map two different devi

Re: [Qemu-devel] [PATCH v8 3/6] libnvdimm: add dax_dev sync flag

2019-05-13 Thread Pankaj Gupta
> > > > > > Hi Dan, > > > > While testing device mapper with DAX, I faced a bug with the commit: > > > > commit ad428cdb525a97d15c0349fdc80f3d58befb50df > > Author: Dan Williams > > Date: Wed Feb 20 21:12:50 2019 -0800 > > > > When I reverted the condition to old code[1] it worked for me. I >

Re: [Qemu-devel] [PATCH v10 4/7] dm: enable synchronous dax

2019-06-09 Thread Pankaj Gupta
> On Tue, May 21, 2019 at 6:43 AM Pankaj Gupta wrote: > > > > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > > devices of device mapper support synchrononous DAX. If device > > mapper consists of both synchronous and asynchronous dax de

Re: [Qemu-devel] [PATCH 1/7] virtio-pmem: add virtio device

2019-06-09 Thread Pankaj Gupta
name should ideally be used by all other virtio-* based memory > > devices in the future. > > -device virtio-pmem-pci,id=p0,bus=bux0,addr=0x01,memaddr=0x1000000... > > > > Acked-by: Markus Armbruster > > [ QAPI bits ] > > Signed-off-by: Pankaj Gupta &

[Qemu-devel] [PATCH v11 0/7] virtio pmem driver

2019-06-10 Thread Pankaj Gupta
- nvdimm_flush() return 0 or -EIO if it fails - Teach nsio_rw_bytes() that the flush can fail - Rename nvdimm_flush() to generic_nvdimm_flush() - Use 'nd_region->provider_data' for long dereferencing - Remove virtio_pmem_freeze/restore functions - Remove BSD license text with SPDX licen

[Qemu-devel] [PATCH v11 1/7] libnvdimm: nd_region flush callback support

2019-06-10 Thread Pankaj Gupta
ed by host fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -

[Qemu-devel] [PATCH v11 2/7] virtio-pmem: Add virtio pmem driver

2019-06-10 Thread Pankaj Gupta
orms flush on DAX memory range. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia Acked-by: Michael S. Tsirkin Acked-by: Jakub Staron Tested-by: Jakub Staron --- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 124 +++ drivers/

[Qemu-devel] [PATCH v11 3/7] libnvdimm: add dax_dev sync flag

2019-06-10 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c|

[Qemu-devel] [PATCH v11 5/7] dax: check synchronous mapping is supported

2019-06-10 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara S

[Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax

2019-06-10 Thread Pankaj Gupta
This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. Signed-off-by: Pankaj Gupta --- d

[Qemu-devel] [PATCH v11 6/7] ext4: disable map_sync for async flush

2019-06-10 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara

[Qemu-devel] [PATCH v11 7/7] xfs: disable map_sync for async flush

2019-06-10 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong -

Re: [Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
Hi Mike, Thanks for the review Please find my reply inline. > > dm_table_supports_dax() is called multiple times (from > dm_table_set_restrictions and dm_table_determine_type). It is strange > to have a getter have a side-effect of being a setter too. Overloading > like this could get you in t

Re: [Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
> > > Hi Mike, > > > > Thanks for the review Please find my reply inline. > > > > > > > > dm_table_supports_dax() is called multiple times (from > > > dm_table_set_restrictions and dm_table_determine_type). It is strange > > > to have a getter have a side-effect of being a setter too. Over

[Qemu-devel] [PATCH v12 6/7] ext4: disable map_sync for async flush

2019-06-11 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara

[Qemu-devel] [PATCH v12 5/7] dax: check synchronous mapping is supported

2019-06-11 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara S

[Qemu-devel] [PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
red to pass 'iterate_devices_fn' as argument so that the callers can pass the appropriate functions. Suggested-by: Mike Snitzer Signed-off-by: Pankaj Gupta --- drivers/md/dm-table.c | 24 ++-- drivers/md/dm.c | 2 +- drivers/md/dm.h | 5 - 3 files ch

[Qemu-devel] [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Pankaj Gupta
orms flush on DAX memory range. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia Acked-by: Michael S. Tsirkin Acked-by: Jakub Staron Tested-by: Jakub Staron --- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 124 +++ drivers/

[Qemu-devel] [PATCH v12 3/7] libnvdimm: add dax_dev sync flag

2019-06-11 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c|

[Qemu-devel] [PATCH v12 0/7] virtio pmem driver

2019-06-11 Thread Pankaj Gupta
n - Use indirect call for nvdimm_flush - Don’t move declarations to common global header e.g nd.h - nvdimm_flush() return 0 or -EIO if it fails - Teach nsio_rw_bytes() that the flush can fail - Rename nvdimm_flush() to generic_nvdimm_flush() - Use 'nd_region->provider_data' for long dereferencing - Remo

[Qemu-devel] [PATCH v12 7/7] xfs: disable map_sync for async flush

2019-06-11 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong -

[Qemu-devel] [PATCH v12 1/7] libnvdimm: nd_region flush callback support

2019-06-11 Thread Pankaj Gupta
ed by host fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -

Re: [Qemu-devel] [PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
> On Tue, Jun 11 2019 at 12:37pm -0400, > Pankaj Gupta wrote: > > > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > > devices of device mapper support synchrononous DAX. If device > > mapper consists of both synchronous and async

Re: [Qemu-devel] [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Pankaj Gupta
Hi Cornelia, > On Tue, 11 Jun 2019 22:07:57 +0530 > Pankaj Gupta wrote: > > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also &g

Re: [Qemu-devel] [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-12 Thread Pankaj Gupta
> > Hi Pankaj, > > On Tue, 11 Jun 2019 23:34:50 -0400 (EDT) > Pankaj Gupta wrote: > > > Hi Cornelia, > > > > > On Tue, 11 Jun 2019 22:07:57 +0530 > > > Pankaj Gupta wrote: > > > > > > + err1 = virtqueue_kick(vpmem-

[Qemu-devel] [PATCH v13 4/7] dm: enable synchronous dax

2019-06-12 Thread Pankaj Gupta
red to pass 'iterate_devices_fn' as argument so that the callers can pass the appropriate functions. Suggested-by: Mike Snitzer Signed-off-by: Pankaj Gupta Reviewed-by: Mike Snitzer --- drivers/md/dm-table.c | 24 ++-- drivers/md/dm.c | 2 +- drivers/

[Qemu-devel] [PATCH v13 0/7] virtio pmem driver

2019-06-12 Thread Pankaj Gupta
m_flush function - Use indirect call for nvdimm_flush - Don’t move declarations to common global header e.g nd.h - nvdimm_flush() return 0 or -EIO if it fails - Teach nsio_rw_bytes() that the flush can fail - Rename nvdimm_flush() to generic_nvdimm_flush() - Use 'nd_region->provider_da

[Qemu-devel] [PATCH v13 5/7] dax: check synchronous mapping is supported

2019-06-12 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara S

[Qemu-devel] [PATCH v13 3/7] libnvdimm: add dax_dev sync flag

2019-06-12 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c|

[Qemu-devel] [PATCH v13 1/7] libnvdimm: nd_region flush callback support

2019-06-12 Thread Pankaj Gupta
ed by host fsync failure to userspace. Signed-off-by: Pankaj Gupta --- drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 -- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c| 13 - drivers/nvdimm/region_devs.c | 26 -

[Qemu-devel] [PATCH v13 2/7] virtio-pmem: Add virtio pmem driver

2019-06-12 Thread Pankaj Gupta
orms flush on DAX memory range. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia Acked-by: Michael S. Tsirkin Acked-by: Jakub Staron Tested-by: Jakub Staron --- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 125 +++ drivers/

[Qemu-devel] [PATCH v13 6/7] ext4: disable map_sync for async flush

2019-06-12 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara

[Qemu-devel] [PATCH v13 7/7] xfs: disable map_sync for async flush

2019-06-12 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong -

Re: [Qemu-devel] [PATCH v13 2/7] virtio-pmem: Add virtio pmem driver

2019-06-12 Thread Pankaj Gupta
> > This also provides function to perform guest flush over > > VIRTIO from 'pmem' driver when userspace performs flush > > on DAX memory range. > > > > Signed-off-by: Pankaj Gupta > > Reviewed-by: Yuval Shaia > > Acked-by: Michael S. Tsirkin &

Re: [PATCH v2 1/3] virtio: add ability to delete vq through a pointer

2019-12-04 Thread Pankaj Gupta
unsigned int len); > void virtqueue_flush(VirtQueue *vq, unsigned int count); > -- > 2.7.2.windows.1 > > Overall it ooks good to me. Just one point: e.g in virtio_rng: "virtio_rng_device_unrealize" function We are doing : virtio_del_queue(vdev, 0); One can directly call "virtio_delete_queue". It can become confusing to call multiple functions for same purpose. Instead, Can we make "virtio_delete_queue" static inline? Other than that: Reviewed-by: Pankaj Gupta > >

Re: [PATCH v2 1/3] virtio: add ability to delete vq through a pointer

2019-12-04 Thread Pankaj Gupta
> > On 2019/12/4 16:33, Pankaj Gupta wrote: > > > >> From: Pan Nengyuan > >> > >> Devices tend to maintain vq pointers, allow deleting them trough a vq > >> pointer. > >> > >> Signed-off-by: Michael S. Tsirkin > >> Si

[Qemu-devel] [PATCH] virtio pmem: user document

2019-07-29 Thread Pankaj Gupta
This patch documents the steps to use virtio pmem. It also documents other useful information about virtio pmem e.g use-case, comparison with Qemu NVDIMM backend and current limitations. Signed-off-by: Pankaj Gupta --- docs/virtio-pmem.txt | 65 1

[Qemu-devel] [PATCH] virtio pmem: user document

2019-07-29 Thread Pankaj Gupta
This patch documents the steps to use virtio pmem. It also documents other useful information about virtio pmem e.g use-case, comparison with Qemu NVDIMM backend and current limitations. Signed-off-by: Pankaj Gupta --- docs/virtio-pmem.txt | 65 1

Re: [Qemu-devel] [PATCH] virtio pmem: user document

2019-07-30 Thread Pankaj Gupta
> On Tue, 30 Jul 2019 12:16:57 +0530 > Pankaj Gupta wrote: > > > This patch documents the steps to use virtio pmem. > > It also documents other useful information about > > virtio pmem e.g use-case, comparison with Qemu NVDIMM > > backend and current li

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> So it can handle more incoming requests. > > Signed-off-by: Jack Wang > --- > migration/rdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index c7c7a384875b..2e223170d06d 100644 > --- a/migration/rdma.c > +++ b/migration/rdma.c

Re: [PATCH 2/2] migration/rdma: set the REUSEADDR option for destination

2022-02-01 Thread Pankaj Gupta
> This allow address could be reused to avoid rdma_bind_addr error > out. Seems we are proposing to allow multiple connections on same source ip port pair? > > Signed-off-by: Jack Wang > --- > migration/rdma.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/migration/rdma.c b/mig

Re: [PATCH 2/2] migration/rdma: set the REUSEADDR option for destination

2022-02-01 Thread Pankaj Gupta
> > > This allow address could be reused to avoid rdma_bind_addr error > > > out. > > > > Seems we are proposing to allow multiple connections on same source ip > > port pair? > according to the man page, it's more about the destination side which > is the incoming side.[1] By source here I meant

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> > > So it can handle more incoming requests. > > > > > > Signed-off-by: Jack Wang > > > --- > > > migration/rdma.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > > index c7c7a384875b..2e223170d06d 100644 > > > --- a/m

Re: [PATCH 1/2] migration/rdma: Increase the backlog from 5 to 128

2022-02-01 Thread Pankaj Gupta
> > > > migration/rdma.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/migration/rdma.c b/migration/rdma.c > > > > index c7c7a384875b..2e223170d06d 100644 > > > > --- a/migration/rdma.c > > > > +++ b/migration/rdma.c > > > > @@ -4238,7 +4238,7 @@ void r

Re: [PATCH v2] migration/rdma: set the REUSEADDR option for destination

2022-02-08 Thread Pankaj Gupta
> +ERROR(errp, "Error: could not set REUSEADDR option"); > +goto err_dest_init_bind_addr; > +} > for (e = res; e != NULL; e = e->ai_next) { > inet_ntop(e->ai_family, > &((struct sockaddr_in *) e->ai_dst_addr)->sin_addr, ip, sizeof > ip); Reviewed-by: Pankaj Gupta

Re: [PATCH v1] util/oslib-posix: Fix missing unlock in the error path of os_mem_prealloc()

2022-01-11 Thread Pankaj Gupta
zini > Cc: Michael S. Tsirkin > Cc: Pankaj Gupta > Cc: Daniel P. Berrangé > Cc: Michal Privoznik > Signed-off-by: David Hildenbrand > --- > util/oslib-posix.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/util/oslib-posix.c b/util/oslib-posix.c > i

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
Thank you David for replying! > > From: Pankaj Gupta > > > > > Enable live migration support for virtio-pmem device. > > Tested this: with live migration on same host. > > > > Need suggestion on below points to support virtio-pmem live migration > > be

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
> >> I mean, that would be fundamentally broken, because the fsync() would > >> corrupt the file. So I assume in a sane environment, the dst could only > >> have stale clean pagecache pages. And we'd have to get rid of these to > >> re-read everything from file. > > > > In case of write back cache

Re: [RFC] virtio_pmem: enable live migration support

2022-01-12 Thread Pankaj Gupta
> I mean, that would be fundamentally broken, because the fsync() would > corrupt the file. So I assume in a sane environment, the dst could only > have stale clean pagecache pages. And we'd have to get rid of these to > re-read everything from file. > >>> > >>> In case of write

  1   2   3   4   5   6   >