search for: start_cmd_id

Displaying 20 results from an estimated 44 matches for "start_cmd_id".

2018 Jan 19
3
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
..._id == VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID) { > .... > } > that's ok too. > > > > > > > + if (cmd_id == VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID) { > > > + WRITE_ONCE(vb->report_free_page, false); > > > + } else if (cmd_id != vb->start_cmd_id) { > > > + /* > > > + * Host requests to start the reporting by sending a new cmd > > > + * id. > > > + */ > > > + WRITE_ONCE(vb->report_free_page, true); > > I don't know why we bother with WRITE_ONCE here. The point of > > r...
2018 Jan 24
1
[virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...2018 08:39 PM, Michael S. Tsirkin wrote: >> On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: >>> On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: >>>> On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: >>>> >>>>> + vb->start_cmd_id = cmd_id; >>>>> + queue_work(vb->balloon_wq, &vb->report_free_page_work); >>>> It seems that if a command was already queued (with a different id), >>>> this will result in new command id being sent to host twice, which >>>> will...
2018 Jan 24
1
[virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...39 PM, Michael S. Tsirkin wrote: > > On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: > > > On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: > > > > On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: > > > > > > > > > + vb->start_cmd_id = cmd_id; > > > > > + queue_work(vb->balloon_wq, &vb->report_free_page_work); > > > > It seems that if a command was already queued (with a different id), > > > > this will result in new command id being sent to host twice, which will > > >...
2018 Jan 25
2
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...+ struct virtio_balloon *vb; >> + unsigned long flags; >> + >> + vb = container_of(work, struct virtio_balloon, report_free_page_work); >> + >> + /* Start by sending the obtained cmd id to the host with an outbuf */ >> + send_cmd_id(vb, &vb->start_cmd_id); >> + >> + /* >> + * Set start_cmd_id to VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID to >> + * indicate a new request can be queued. >> + */ >> + spin_lock_irqsave(&vb->stop_update_lock, flags); >> + vb->start_cmd_id = cpu_to_vir...
2018 Jan 24
3
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...lloon_stats_work; > @@ -63,6 +75,13 @@ struct virtio_balloon { > spinlock_t stop_update_lock; > bool stop_update; > > + /* Start to report free pages */ > + bool report_free_page; > + /* Stores the cmd id given by host to start the free page reporting */ > + __virtio32 start_cmd_id; > + /* Stores STOP_ID as a sign to tell host that the reporting is done */ > + __virtio32 stop_cmd_id; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > > @@ -281,6 +300,53 @@ static unsigned int update_balloon_stats(struct virtio_ba...
2018 Jan 24
3
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...lloon_stats_work; > @@ -63,6 +75,13 @@ struct virtio_balloon { > spinlock_t stop_update_lock; > bool stop_update; > > + /* Start to report free pages */ > + bool report_free_page; > + /* Stores the cmd id given by host to start the free page reporting */ > + __virtio32 start_cmd_id; > + /* Stores STOP_ID as a sign to tell host that the reporting is done */ > + __virtio32 stop_cmd_id; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > > @@ -281,6 +300,53 @@ static unsigned int update_balloon_stats(struct virtio_ba...
2018 Jan 22
0
[virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: > On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: >> On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: >>> On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: >>> >>>> + vb->start_cmd_id = cmd_id; >>>> + queue_work(vb->balloon_wq, &vb->report_free_page_work); >>> It seems that if a command was already queued (with a different id), >>> this will result in new command id being sent to host twice, which will >>> likely confuse the host...
2018 Jan 24
0
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...queue. */ struct work_struct update_balloon_stats_work; @@ -63,6 +75,13 @@ struct virtio_balloon { spinlock_t stop_update_lock; bool stop_update; + /* Start to report free pages */ + bool report_free_page; + /* Stores the cmd id given by host to start the free page reporting */ + __virtio32 start_cmd_id; + /* Stores STOP_ID as a sign to tell host that the reporting is done */ + __virtio32 stop_cmd_id; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -281,6 +300,53 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) return idx; } +stat...
2018 Jan 17
3
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...balloon_stats_work; > @@ -63,6 +68,13 @@ struct virtio_balloon { > spinlock_t stop_update_lock; > bool stop_update; > > + /* Start to report free pages */ > + bool report_free_page; > + /* Stores the cmd id given by host to start the free page reporting */ > + uint32_t start_cmd_id; > + /* Stores STOP_ID as a sign to tell host that the reporting is done */ > + uint32_t stop_cmd_id; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > > @@ -281,6 +293,71 @@ static unsigned int update_balloon_stats(struct virtio_ball...
2018 Jan 17
3
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...balloon_stats_work; > @@ -63,6 +68,13 @@ struct virtio_balloon { > spinlock_t stop_update_lock; > bool stop_update; > > + /* Start to report free pages */ > + bool report_free_page; > + /* Stores the cmd id given by host to start the free page reporting */ > + uint32_t start_cmd_id; > + /* Stores STOP_ID as a sign to tell host that the reporting is done */ > + uint32_t stop_cmd_id; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > > @@ -281,6 +293,71 @@ static unsigned int update_balloon_stats(struct virtio_ball...
2018 Jan 24
4
[PATCH v24 0/2] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's
2018 Jan 19
0
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
..._BALLOON_F_FREE_PAGE_VQ)) { virtio_cread(..); if (cmd_id == VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID) { .... } > > >> + if (cmd_id == VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID) { >> + WRITE_ONCE(vb->report_free_page, false); >> + } else if (cmd_id != vb->start_cmd_id) { >> + /* >> + * Host requests to start the reporting by sending a new cmd >> + * id. >> + */ >> + WRITE_ONCE(vb->report_free_page, true); > I don't know why we bother with WRITE_ONCE here. The point of > report_free_page being used lockless is t...
2018 Jan 25
0
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...struct work_struct *work) > +{ > + struct virtio_balloon *vb; > + unsigned long flags; > + > + vb = container_of(work, struct virtio_balloon, report_free_page_work); > + > + /* Start by sending the obtained cmd id to the host with an outbuf */ > + send_cmd_id(vb, &vb->start_cmd_id); > + > + /* > + * Set start_cmd_id to VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID to > + * indicate a new request can be queued. > + */ > + spin_lock_irqsave(&vb->stop_update_lock, flags); > + vb->start_cmd_id = cpu_to_virtio32(vb->vdev, > + VIRTIO_BALLOON_FR...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...balloon_stats_work; > @@ -63,6 +68,13 @@ struct virtio_balloon { > spinlock_t stop_update_lock; > bool stop_update; > > + /* Start to report free pages */ > + bool report_free_page; > + /* Stores the cmd id given by host to start the free page reporting */ > + uint32_t start_cmd_id; > + /* Stores STOP_ID as a sign to tell host that the reporting is done */ > + uint32_t stop_cmd_id; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > > @@ -281,6 +293,71 @@ static unsigned int update_balloon_stats(struct > virtio...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...balloon_stats_work; > @@ -63,6 +68,13 @@ struct virtio_balloon { > spinlock_t stop_update_lock; > bool stop_update; > > + /* Start to report free pages */ > + bool report_free_page; > + /* Stores the cmd id given by host to start the free page reporting */ > + uint32_t start_cmd_id; > + /* Stores STOP_ID as a sign to tell host that the reporting is done */ > + uint32_t stop_cmd_id; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > > @@ -281,6 +293,71 @@ static unsigned int update_balloon_stats(struct > virtio...
2018 Jan 17
0
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...rkqueue. */ struct work_struct update_balloon_stats_work; @@ -63,6 +68,13 @@ struct virtio_balloon { spinlock_t stop_update_lock; bool stop_update; + /* Start to report free pages */ + bool report_free_page; + /* Stores the cmd id given by host to start the free page reporting */ + uint32_t start_cmd_id; + /* Stores STOP_ID as a sign to tell host that the reporting is done */ + uint32_t stop_cmd_id; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -281,6 +293,71 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) return idx; } +static...
2018 Jan 24
0
[PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...queue. */ struct work_struct update_balloon_stats_work; @@ -63,6 +75,13 @@ struct virtio_balloon { spinlock_t stop_update_lock; bool stop_update; + /* Start to report free pages */ + bool report_free_page; + /* Stores the cmd id given by host to start the free page reporting */ + __virtio32 start_cmd_id; + /* Stores STOP_ID as a sign to tell host that the reporting is done */ + __virtio32 stop_cmd_id; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -281,6 +300,56 @@ static unsigned int update_balloon_stats(struct virtio_balloon *vb) return idx; } +stat...
2017 Dec 01
3
[PATCH v18 10/10] virtio-balloon: don't report free pages when page poisoning is enabled
...vers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -652,7 +652,9 @@ static void report_free_page(struct work_struct *work) > /* Start by sending the obtained cmd id to the host with an outbuf */ > send_one_desc(vb, vb->free_page_vq, virt_to_phys(&vb->start_cmd_id), > sizeof(uint32_t), false, true, false); > - walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages); > + if (!(page_poisoning_enabled() && > + !IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY))) > + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_...
2017 Dec 01
3
[PATCH v18 10/10] virtio-balloon: don't report free pages when page poisoning is enabled
...vers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -652,7 +652,9 @@ static void report_free_page(struct work_struct *work) > /* Start by sending the obtained cmd id to the host with an outbuf */ > send_one_desc(vb, vb->free_page_vq, virt_to_phys(&vb->start_cmd_id), > sizeof(uint32_t), false, true, false); > - walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages); > + if (!(page_poisoning_enabled() && > + !IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY))) > + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_...
2018 Jan 24
3
[PATCH v23 0/2] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_VQ, implemented by this series enables the virtio-balloon driver to report hints of guest free pages to the host. It can be used to accelerate live migration of VMs. Here is an introduction of this usage: Live migration needs to transfer the VM's memory