search for: update_balloon_size

Displaying 20 results from an estimated 240 matches for "update_balloon_size".

2016 Jan 01
2
[PATCH RFC] virtio_balloon: refill by config handler
...c index 7efc329..ee29473 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -589,7 +589,7 @@ static int virtballoon_restore(struct virtio_device *vdev) virtio_device_ready(vdev); - fill_balloon(vb, towards_target(vb)); + wake_up(&vb->config_change); update_balloon_size(vb); return 0; } -- MST
2016 Jan 01
2
[PATCH RFC] virtio_balloon: refill by config handler
...c index 7efc329..ee29473 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -589,7 +589,7 @@ static int virtballoon_restore(struct virtio_device *vdev) virtio_device_ready(vdev); - fill_balloon(vb, towards_target(vb)); + wake_up(&vb->config_change); update_balloon_size(vb); return 0; } -- MST
2012 Apr 26
4
[PATCH 0/3] virtio: balloon: cleanups and a fix
Hello, The main fix is to update the host with the current balloon value on module removal after deflating the balloon. Without the fix, the host has the wrong idea of the ballooned memory in the guest. This is patch 2. Patches 1 and 3 are cleanups with no effective code change. Please apply, Amit Shah (3): virtio: balloon: drop restore_common() virtio: balloon: let host know of updated
2012 Apr 26
4
[PATCH 0/3] virtio: balloon: cleanups and a fix
Hello, The main fix is to update the host with the current balloon value on module removal after deflating the balloon. Without the fix, the host has the wrong idea of the ballooned memory in the guest. This is patch 2. Patches 1 and 3 are cleanups with no effective code change. Please apply, Amit Shah (3): virtio: balloon: drop restore_common() virtio: balloon: let host know of updated
2019 Jan 03
6
[PATCH v1 0/2] virtio-balloon: tweak config_changed
...irtio-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 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) -- 2.7.4
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
.../* To register callback in oom notifier call chain */ > - struct notifier_block nb; > + /* To register a shrinker to shrink memory upon memory pressure */ > + struct shrinker shrinker; > }; > > static struct virtio_device_id id_table[] = { > @@ -365,38 +364,6 @@ static void update_balloon_size(struct virtio_balloon *vb) > &actual); > } > > -/* > - * virtballoon_oom_notify - release pages when system is under severe > - * memory pressure (called from out_of_memory()) > - * @self : notifier block struct > - * @dummy: not used > - * @parm : r...
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
.../* To register callback in oom notifier call chain */ > - struct notifier_block nb; > + /* To register a shrinker to shrink memory upon memory pressure */ > + struct shrinker shrinker; > }; > > static struct virtio_device_id id_table[] = { > @@ -365,38 +364,6 @@ static void update_balloon_size(struct virtio_balloon *vb) > &actual); > } > > -/* > - * virtballoon_oom_notify - release pages when system is under severe > - * memory pressure (called from out_of_memory()) > - * @self : notifier block struct > - * @dummy: not used > - * @parm : r...
2017 Oct 10
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...pfns = 0; vb->num_pfns < num; > @@ -367,7 +373,7 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > + num_freed_pages = leak_balloon(vb, oom_pages, false); > update_balloon_size(vb); > *freed += num_freed_pages; > > @@ -395,7 +401,7 @@ static void update_balloon_size_func(struct work_struct *work) > if (diff > 0) > diff -= fill_balloon(vb, diff); > else if (diff < 0) > - diff += leak_balloon(vb, -diff); > + diff += leak_balloon(vb...
2017 Oct 12
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...= 0; vb->num_pfns < num; > @@ -367,7 +373,7 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > + num_freed_pages = leak_balloon(vb, oom_pages, false); > update_balloon_size(vb); > *freed += num_freed_pages; > > @@ -395,7 +401,7 @@ static void update_balloon_size_func(struct work_struct *work) > if (diff > 0) > diff -= fill_balloon(vb, diff); > else if (diff < 0) > - diff += leak_balloon(vb, -diff); > + diff += leak_ballo...
2017 Oct 10
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...pfns = 0; vb->num_pfns < num; > @@ -367,7 +373,7 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > + num_freed_pages = leak_balloon(vb, oom_pages, false); > update_balloon_size(vb); > *freed += num_freed_pages; > > @@ -395,7 +401,7 @@ static void update_balloon_size_func(struct work_struct *work) > if (diff > 0) > diff -= fill_balloon(vb, diff); > else if (diff < 0) > - diff += leak_balloon(vb, -diff); > + diff += leak_balloon(vb...
2017 Oct 12
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...= 0; vb->num_pfns < num; > @@ -367,7 +373,7 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > + num_freed_pages = leak_balloon(vb, oom_pages, false); > update_balloon_size(vb); > *freed += num_freed_pages; > > @@ -395,7 +401,7 @@ static void update_balloon_size_func(struct work_struct *work) > if (diff > 0) > diff -= fill_balloon(vb, diff); > else if (diff < 0) > - diff += leak_balloon(vb, -diff); > + diff += leak_ballo...
2018 Jul 27
5
[PATCH v2 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page reporting" series to make some improvements. v1->v2 ChangeLog: - register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated. Wei Wang (2): virtio-balloon: remove BUG() in init_vqs virtio_balloon: replace oom notifier with shrinker drivers/virtio/virtio_balloon.c | 125
2018 Jul 27
5
[PATCH v2 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page reporting" series to make some improvements. v1->v2 ChangeLog: - register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated. Wei Wang (2): virtio-balloon: remove BUG() in init_vqs virtio_balloon: replace oom notifier with shrinker drivers/virtio/virtio_balloon.c | 125
2017 Oct 13
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...pfns = 0; vb->num_pfns < num; > @@ -367,7 +373,7 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > + num_freed_pages = leak_balloon(vb, oom_pages, false); > update_balloon_size(vb); > *freed += num_freed_pages; > > @@ -395,7 +401,7 @@ static void update_balloon_size_func(struct work_struct *work) > if (diff > 0) > diff -= fill_balloon(vb, diff); > else if (diff < 0) > - diff += leak_balloon(vb, -diff); > + diff += leak_balloon(vb...
2017 Oct 13
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...pfns = 0; vb->num_pfns < num; > @@ -367,7 +373,7 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > + num_freed_pages = leak_balloon(vb, oom_pages, false); > update_balloon_size(vb); > *freed += num_freed_pages; > > @@ -395,7 +401,7 @@ static void update_balloon_size_func(struct work_struct *work) > if (diff > 0) > diff -= fill_balloon(vb, diff); > else if (diff < 0) > - diff += leak_balloon(vb, -diff); > + diff += leak_balloon(vb...
2018 Aug 03
4
[PATCH v3 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page reporting" series to make some improvements. ChangeLog: v2->v3: - shrink the balloon pages according to the amount requested by the claimer, instead of using a user specified number; v1->v2: - register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated. Wei Wang (2): virtio-balloon: remove BUG()
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...,7 @@ static void virtballoon_changed(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - wake_up(&vb->config_change); + queue_work(vb->wq, &vb->wq_work); } static inline s64 towards_target(struct virtio_balloon *vb) @@ -287,35 +292,22 @@ static void update_balloon_size(struct virtio_balloon *vb) &actual); } -static int balloon(void *_vballoon) +static void balloon(struct work_struct *work) { - struct virtio_balloon *vb = _vballoon; - - set_freezable(); - while (!kthread_should_stop()) { - s64 diff; - - try_to_freeze(); - wait_event_interruptib...
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...,7 @@ static void virtballoon_changed(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - wake_up(&vb->config_change); + queue_work(vb->wq, &vb->wq_work); } static inline s64 towards_target(struct virtio_balloon *vb) @@ -287,35 +292,22 @@ static void update_balloon_size(struct virtio_balloon *vb) &actual); } -static int balloon(void *_vballoon) +static void balloon(struct work_struct *work) { - struct virtio_balloon *vb = _vballoon; - - set_freezable(); - while (!kthread_should_stop()) { - s64 diff; - - try_to_freeze(); - wait_event_interruptib...
2014 Oct 08
2
[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM
...ruct virtio_balloon /* Memory statistics */ int need_stats_update; struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR]; + + /* To register callback in oom notifier call chain */ + struct notifier_block nb; }; static struct virtio_device_id id_table[] = { @@ -290,6 +300,33 @@ static void update_balloon_size(struct virtio_balloon *vb) &actual); } +/* + * virtballoon_oom_notify - release pages when system is under severe + * memory pressure (called from out_of_memory()) + * @self : notifier block struct + * @dummy: not used + * @parm : returned - number of freed...
2014 Oct 08
2
[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM
...ruct virtio_balloon /* Memory statistics */ int need_stats_update; struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR]; + + /* To register callback in oom notifier call chain */ + struct notifier_block nb; }; static struct virtio_device_id id_table[] = { @@ -290,6 +300,33 @@ static void update_balloon_size(struct virtio_balloon *vb) &actual); } +/* + * virtballoon_oom_notify - release pages when system is under severe + * memory pressure (called from out_of_memory()) + * @self : notifier block struct + * @dummy: not used + * @parm : returned - number of freed...