search for: virtio_balloon_cmd_id_don

Displaying 20 results from an estimated 22 matches for "virtio_balloon_cmd_id_don".

2020 Apr 17
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...een consumed >>> by the hypervisor. >>> >> >> I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. > > Can't find that one anywhere. what did I miss? Sorry, the QEMU implementation is confusing. FREE_PAGE_REPORT_S_DONE is translated to VIRTIO_BALLOON_CMD_ID_DONE QEMU: hw/virtio/virtio-balloon.c:virtio_balloon_free_page_report_notify() -> virtio_balloon_free_page_done(dev) -> s->free_page_report_status = FREE_PAGE_REPORT_S_DONE; virtio_notify_config(vdev); When the guest reads the config hw/virtio/virtio-balloon.c:virtio_balloon_get_config()...
2020 Apr 17
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...>>>> >>>> I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. >>> >>> Can't find that one anywhere. what did I miss? >> >> Sorry, the QEMU implementation is confusing. FREE_PAGE_REPORT_S_DONE is >> translated to VIRTIO_BALLOON_CMD_ID_DONE > > Well VIRTIO_BALLOON_CMD_ID_DONE just means "don't give me any > more hints, I finished migration". > Guest will stop hinting even without that once it scans all > free memory. Yeah, that's the end of the whole process where you can be sure the host processed...
2020 Apr 17
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...sor. > >>> > >> > >> I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. > > > > Can't find that one anywhere. what did I miss? > > Sorry, the QEMU implementation is confusing. FREE_PAGE_REPORT_S_DONE is > translated to VIRTIO_BALLOON_CMD_ID_DONE Well VIRTIO_BALLOON_CMD_ID_DONE just means "don't give me any more hints, I finished migration". Guest will stop hinting even without that once it scans all free memory. > QEMU: > > hw/virtio/virtio-balloon.c:virtio_balloon_free_page_report_notify() > -> virtio_ba...
2019 Jan 03
6
[PATCH v1 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config registers inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. Wei Wang (2): virtio-balloon: tweak config_changed implementation virtio-balloon: improve update_balloon_size_func drivers/virtio/virtio_balloon.c | 59
2020 Apr 17
4
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
> What do you call "hinting ends" though? The fact we put > a page in the VQ is not a guarantee that it's been consumed > by the hypervisor. > I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. > > I think a strict definition is this: > - hint includes a command ID > - hint implies "page was unused at some point after guest
2019 Jan 04
4
[PATCH v2 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. v1->v2 ChangeLog: - add config_read_bitmap to indicate to the workqueue callbacks about the necessity of reading the related config fields. Wei Wang (2): virtio-balloon: tweak
2019 Jan 03
0
[PATCH v1 1/2] virtio-balloon: tweak config_changed implementation
...n_size_work); - spin_unlock_irqrestore(&vb->stop_update_lock, flags); - } - if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { - virtio_cread(vdev, struct virtio_balloon_config, - free_page_report_cmd_id, &vb->cmd_id_received); - if (vb->cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { - /* Pass ULONG_MAX to give back all the free pages */ - return_free_pages_to_mm(vb, ULONG_MAX); - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && - vb->cmd_id_received != - virtio32_to_cpu(vdev, vb->cmd_id_active)) { - spin_lock_irqsave(&vb...
2020 Apr 17
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...;>> I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. > >>> > >>> Can't find that one anywhere. what did I miss? > >> > >> Sorry, the QEMU implementation is confusing. FREE_PAGE_REPORT_S_DONE is > >> translated to VIRTIO_BALLOON_CMD_ID_DONE > > > > Well VIRTIO_BALLOON_CMD_ID_DONE just means "don't give me any > > more hints, I finished migration". > > Guest will stop hinting even without that once it scans all > > free memory. > > Yeah, that's the end of the whole process where...
2019 Jan 04
0
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...n_size_work); - spin_unlock_irqrestore(&vb->stop_update_lock, flags); - } - if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { - virtio_cread(vdev, struct virtio_balloon_config, - free_page_report_cmd_id, &vb->cmd_id_received); - if (vb->cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { - /* Pass ULONG_MAX to give back all the free pages */ - return_free_pages_to_mm(vb, ULONG_MAX); - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && - vb->cmd_id_received != - virtio32_to_cpu(vdev, vb->cmd_id_active)) { - spin_lock_irqsave(&vb...
2019 Jan 03
1
[PATCH v1 1/2] virtio-balloon: tweak config_changed implementation
...omplete. So host can no longer quickly stop the report in progress. A simple work-around would be to set some kind of flag whenever there is a change interrupt, then have send_free_pages test it and re-read cmd_id_received. Needs to be an atomic I guess ... > - if (vb->cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { > - /* Pass ULONG_MAX to give back all the free pages */ > - return_free_pages_to_mm(vb, ULONG_MAX); > - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && > - vb->cmd_id_received != > - virtio32_to_cpu(vdev, vb->cmd_id_active)) { >...
2019 Jan 07
3
[PATCH v3 0/3] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. v2->v3 ChangeLog: - rename cmd_id_received to cmd_id_received_cache, and have call sites read the latest value via virtio_balloon_cmd_id_received. (Still kept Cornelia and
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...rqrestore(&vb->stop_update_lock, flags); > - } > > - if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { > - virtio_cread(vdev, struct virtio_balloon_config, > - free_page_report_cmd_id, &vb->cmd_id_received); > - if (vb->cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { > - /* Pass ULONG_MAX to give back all the free pages */ > - return_free_pages_to_mm(vb, ULONG_MAX); > - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && > - vb->cmd_id_received != > - virtio32_to_cpu(vdev, vb->cmd_id_active)) { >...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...rqrestore(&vb->stop_update_lock, flags); > - } > > - if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { > - virtio_cread(vdev, struct virtio_balloon_config, > - free_page_report_cmd_id, &vb->cmd_id_received); > - if (vb->cmd_id_received == VIRTIO_BALLOON_CMD_ID_DONE) { > - /* Pass ULONG_MAX to give back all the free pages */ > - return_free_pages_to_mm(vb, ULONG_MAX); > - } else if (vb->cmd_id_received != VIRTIO_BALLOON_CMD_ID_STOP && > - vb->cmd_id_received != > - virtio32_to_cpu(vdev, vb->cmd_id_active)) { >...
2020 Aug 03
0
[PATCH v2 05/24] virtio_balloon: correct tags for config space fields
...++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h index dc3e656470dd..ddaa45e723c4 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h @@ -45,20 +45,20 @@ #define VIRTIO_BALLOON_CMD_ID_DONE 1 struct virtio_balloon_config { /* Number of pages host wants Guest to give up. */ - __u32 num_pages; + __le32 num_pages; /* Number of pages we've actually got in balloon. */ - __u32 actual; + __le32 actual; /* * Free page hint command id, readonly by guest. * Was previously name...
2020 Aug 05
0
[PATCH v3 05/38] virtio_balloon: correct tags for config space fields
...++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h index dc3e656470dd..ddaa45e723c4 100644 --- a/include/uapi/linux/virtio_balloon.h +++ b/include/uapi/linux/virtio_balloon.h @@ -45,20 +45,20 @@ #define VIRTIO_BALLOON_CMD_ID_DONE 1 struct virtio_balloon_config { /* Number of pages host wants Guest to give up. */ - __u32 num_pages; + __le32 num_pages; /* Number of pages we've actually got in balloon. */ - __u32 actual; + __le32 actual; /* * Free page hint command id, readonly by guest. * Was previously name...
2020 Mar 12
0
[RFC for QEMU] virtio-balloon: Add option thp-order to set VIRTIO_BALLOON_F_THP_ORDER
...5 /* Set balloon page order to thp order */ > > /* Size of a PFN in the balloon interface. */ > #define VIRTIO_BALLOON_PFN_SHIFT 12 > > +/* The order of the balloon page */ > +#define VIRTIO_BALLOON_THP_ORDER 9 > + > #define VIRTIO_BALLOON_CMD_ID_STOP 0 > #define VIRTIO_BALLOON_CMD_ID_DONE 1 > struct virtio_balloon_config { > -- > 2.7.4
2020 Apr 17
0
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...at it's been consumed > > by the hypervisor. > > > > I'd say hinting ends once the hypervisor sets FREE_PAGE_REPORT_S_DONE. The key bit to this is that there are 4 states, and quasi unlimited command IDs, although I believe the first 2 are matched up to the states. So the VIRTIO_BALLOON_CMD_ID_DONE is matched up with FREE_PAGE_REPORT_S_DONE, and CMD_ID_STOP with S_STOP, but really all it means is that we are done with the current epoch so we need to flush the memory and move on. The state is more important to the hypervisor as it will switch to "STOP" while it is synching the dirty...
2020 Mar 12
0
[RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue
...Balloon page order to thp order */ > > /* Size of a PFN in the balloon interface. */ > #define VIRTIO_BALLOON_PFN_SHIFT 12 > > +/* The order of the balloon page */ > +#define VIRTIO_BALLOON_THP_ORDER 9 > + Why 9? > #define VIRTIO_BALLOON_CMD_ID_STOP 0 > #define VIRTIO_BALLOON_CMD_ID_DONE 1 > struct virtio_balloon_config { Assuming the idea is to also allow passing larger chunks to host, I think we need to switch to using regular virtio S/G for starters. That involves spec work though. > -- > 2.7.4
2020 May 13
0
[RFC v3 for QEMU] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT
...f (virtio_has_feature(features, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { > return offsetof(struct virtio_balloon_config, poison_val); > } > @@ -646,6 +658,11 @@ static void virtio_balloon_get_config(VirtIODevice *vdev, uint8_t *config_data) > cpu_to_le32(VIRTIO_BALLOON_CMD_ID_DONE); > } > > + if (virtio_has_feature(dev->host_features, VIRTIO_BALLOON_F_CONT_PAGES)) { > + config.max_pages_order = cpu_to_le32(CONT_PAGES_ORDER); > + config.current_pages_order = cpu_to_le32(dev->current_pages_order); > + } > + > trace...
2020 Mar 12
2
[RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue
...RDER 5 /* Balloon page order to thp order */ > > /* Size of a PFN in the balloon interface. */ > #define VIRTIO_BALLOON_PFN_SHIFT 12 > > +/* The order of the balloon page */ > +#define VIRTIO_BALLOON_THP_ORDER 9 > + > #define VIRTIO_BALLOON_CMD_ID_STOP 0 > #define VIRTIO_BALLOON_CMD_ID_DONE 1 > struct virtio_balloon_config { > -- Thanks, David / dhildenb