search for: free_page_list

Displaying 20 results from an estimated 34 matches for "free_page_list".

2020 Feb 04
3
Balloon pressuring page cache
...g a shrinker running deflation when you are actively trying >>> to increase the balloon. It would make more sense to wait until you are >>> actually about to start hitting oom. >> >> I think the shrinker makes sense for free page hinting feature >> (everything on free_page_list). >> >> So instead of only reverting, I think we should split it up and always >> register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM >> notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. s/VIRTIO_BALLOON_F_MUST_TELL_HOST/VIRTIO_BALLOON_F_DEFLATE_ON...
2020 Feb 04
3
Balloon pressuring page cache
...g a shrinker running deflation when you are actively trying >>> to increase the balloon. It would make more sense to wait until you are >>> actually about to start hitting oom. >> >> I think the shrinker makes sense for free page hinting feature >> (everything on free_page_list). >> >> So instead of only reverting, I think we should split it up and always >> register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM >> notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. s/VIRTIO_BALLOON_F_MUST_TELL_HOST/VIRTIO_BALLOON_F_DEFLATE_ON...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
>> static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) >> @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev) >> VIRTIO_BALLOON_CMD_ID_STOP); >> spin_lock_init(&vb->free_page_list_lock); >> INIT_LIST_HEAD(&vb->free_page_list); >> + /* >> + * We're allowed to reuse any free pages, even if they are >> + * still to be processed by the host. >> + */ >> + err = virtio_balloon_register_shrinker(vb); >> + if (err) &gt...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
>> static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) >> @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev) >> VIRTIO_BALLOON_CMD_ID_STOP); >> spin_lock_init(&vb->free_page_list_lock); >> INIT_LIST_HEAD(&vb->free_page_list); >> + /* >> + * We're allowed to reuse any free pages, even if they are >> + * still to be processed by the host. >> + */ >> + err = virtio_balloon_register_shrinker(vb); >> + if (err) &gt...
2020 Feb 03
6
Balloon pressuring page cache
...not sure there is much > value to having a shrinker running deflation when you are actively trying > to increase the balloon. It would make more sense to wait until you are > actually about to start hitting oom. I think the shrinker makes sense for free page hinting feature (everything on free_page_list). So instead of only reverting, I think we should split it up and always register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. (Of course, adapting what is being done in the shrinker and in the OOM notifier) -- Thanks, D...
2020 Feb 03
6
Balloon pressuring page cache
...not sure there is much > value to having a shrinker running deflation when you are actively trying > to increase the balloon. It would make more sense to wait until you are > actually about to start hitting oom. I think the shrinker makes sense for free page hinting feature (everything on free_page_list). So instead of only reverting, I think we should split it up and always register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. (Of course, adapting what is being done in the shrinker and in the OOM notifier) -- Thanks, D...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...eled. */ > spinlock_t stop_update_lock; > bool stop_update; > + /* Bitmap to indicate if reading the related config fields are needed */ > + unsigned long config_read_bitmap; > > /* The list of allocated free pages, waiting to be given back to mm */ > struct list_head free_page_list; It seems that you never initialize this bitmap. Probably harmless here but generally using uninitialized memory isn't good. > @@ -390,37 +396,31 @@ static unsigned long return_free_pages_to_mm(struct virtio_balloon *vb, > return num_returned; > } > > +static void virtio_...
2019 Jan 04
2
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...eled. */ > spinlock_t stop_update_lock; > bool stop_update; > + /* Bitmap to indicate if reading the related config fields are needed */ > + unsigned long config_read_bitmap; > > /* The list of allocated free pages, waiting to be given back to mm */ > struct list_head free_page_list; It seems that you never initialize this bitmap. Probably harmless here but generally using uninitialized memory isn't good. > @@ -390,37 +396,31 @@ static unsigned long return_free_pages_to_mm(struct virtio_balloon *vb, > return num_returned; > } > > +static void virtio_...
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
2020 Feb 05
2
Balloon pressuring page cache
...a shrinker running deflation when you are actively trying >>> to increase the balloon. It would make more sense to wait until you are >>> actually about to start hitting oom. >> >> I think the shrinker makes sense for free page hinting feature >> (everything on free_page_list). >> >> So instead of only reverting, I think we should split it up and always >> register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM >> notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. >> >> (Of course, adapting what is being done in...
2020 Feb 05
2
Balloon pressuring page cache
...a shrinker running deflation when you are actively trying >>> to increase the balloon. It would make more sense to wait until you are >>> actually about to start hitting oom. >> >> I think the shrinker makes sense for free page hinting feature >> (everything on free_page_list). >> >> So instead of only reverting, I think we should split it up and always >> register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM >> notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. >> >> (Of course, adapting what is being done in...
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
2020 Feb 05
1
Balloon pressuring page cache
...ctively trying > >>>> to increase the balloon. It would make more sense to wait until you are > >>>> actually about to start hitting oom. > >>> > >>> I think the shrinker makes sense for free page hinting feature > >>> (everything on free_page_list). > >>> > >>> So instead of only reverting, I think we should split it up and always > >>> register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM > >>> notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. > >>> > &gt...
2018 Jul 20
10
[PATCH v36 0/5] 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 Jul 20
10
[PATCH v36 0/5] 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
2019 Jan 05
0
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
...pdate_lock; > > bool stop_update; > > + /* Bitmap to indicate if reading the related config fields are needed > */ > > + unsigned long config_read_bitmap; > > > > /* The list of allocated free pages, waiting to be given back to mm */ > > struct list_head free_page_list; > > It seems that you never initialize this bitmap. Probably harmless here but > generally using uninitialized memory isn't good. We've used kzalloc to allocate the vb struct, so it's already 0-initialized :) > > + > > static int send_free_pages(struct virtio_b...
2020 Feb 04
0
Balloon pressuring page cache
...ation when you are actively trying > >>> to increase the balloon. It would make more sense to wait until you are > >>> actually about to start hitting oom. > >> > >> I think the shrinker makes sense for free page hinting feature > >> (everything on free_page_list). > >> > >> So instead of only reverting, I think we should split it up and always > >> register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM > >> notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST. > > s/VIRTIO_BALLOON_F_MUST_TELL_HO...
2020 Mar 10
0
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...vid Hildenbrand wrote: > >> static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) > >> @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev) > >> VIRTIO_BALLOON_CMD_ID_STOP); > >> spin_lock_init(&vb->free_page_list_lock); > >> INIT_LIST_HEAD(&vb->free_page_list); > >> + /* > >> + * We're allowed to reuse any free pages, even if they are > >> + * still to be processed by the host. > >> + */ > >> + err = virtio_balloon_register_shrinker...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
..._BALLOON_PAGES_PER_PAGE; + update_balloon_size(vb); + + return NOTIFY_OK; } static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev) VIRTIO_BALLOON_CMD_ID_STOP); spin_lock_init(&vb->free_page_list_lock); INIT_LIST_HEAD(&vb->free_page_list); + /* + * We're allowed to reuse any free pages, even if they are + * still to be processed by the host. + */ + err = virtio_balloon_register_shrinker(vb); + if (err) + goto out_del_balloon_wq; } + if (virtio_has_feature(vdev, VI...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
..._BALLOON_PAGES_PER_PAGE; + update_balloon_size(vb); + + return NOTIFY_OK; } static void virtio_balloon_unregister_shrinker(struct virtio_balloon *vb) @@ -971,7 +950,22 @@ static int virtballoon_probe(struct virtio_device *vdev) VIRTIO_BALLOON_CMD_ID_STOP); spin_lock_init(&vb->free_page_list_lock); INIT_LIST_HEAD(&vb->free_page_list); + /* + * We're allowed to reuse any free pages, even if they are + * still to be processed by the host. + */ + err = virtio_balloon_register_shrinker(vb); + if (err) + goto out_del_balloon_wq; } + if (virtio_has_feature(vdev, VI...