Displaying 20 results from an estimated 2000 matches similar to: "[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue"
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Workqueues have clean and rich API for all basic operations. The code is usually
easier and better readable. It can be easily tuned for the given purpose.
In many cases, it allows to avoid an extra kernel thread. It helps to stop the
growing number of them. Also there will be less thread-specific hacks all over
the kernel code.
It forces making the task selfcontained. There is no longer an
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Workqueues have clean and rich API for all basic operations. The code is usually
easier and better readable. It can be easily tuned for the given purpose.
In many cases, it allows to avoid an extra kernel thread. It helps to stop the
growing number of them. Also there will be less thread-specific hacks all over
the kernel code.
It forces making the task selfcontained. There is no longer an
2014 Nov 12
0
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
On Wed, Nov 12, 2014 at 02:02:48PM +0100, Petr Mladek wrote:
> Workqueues have clean and rich API for all basic operations. The code is usually
> easier and better readable. It can be easily tuned for the given purpose.
>
> In many cases, it allows to avoid an extra kernel thread. It helps to stop the
> growing number of them. Also there will be less thread-specific hacks all over
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
Workqueues have clean and rich API for all basic operations. The code is usually
easier and better readable. It can be easily tuned for the given purpose.
In many cases, it allows to avoid an extra kernel thread. It helps to stop the
growing number of them. Also there will be less thread-specific hacks all over
the kernel code.
It forces making the task selfcontained. There is no longer an
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
Workqueues have clean and rich API for all basic operations. The code is usually
easier and better readable. It can be easily tuned for the given purpose.
In many cases, it allows to avoid an extra kernel thread. It helps to stop the
growing number of them. Also there will be less thread-specific hacks all over
the kernel code.
It forces making the task selfcontained. There is no longer an
2014 Nov 14
1
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Hello, Michael, Petr.
On Wed, Nov 12, 2014 at 03:32:04PM +0200, Michael S. Tsirkin wrote:
> > + /* The workqueue servicing the balloon. */
> > + struct workqueue_struct *wq;
> > + struct work_struct wq_work;
>
> We could use system_freezable_wq instead.
> I do agree a dedicated wq is better since this can get blocked
> for a long time while allocating memory.
>
2014 Nov 14
1
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Hello, Michael, Petr.
On Wed, Nov 12, 2014 at 03:32:04PM +0200, Michael S. Tsirkin wrote:
> > + /* The workqueue servicing the balloon. */
> > + struct workqueue_struct *wq;
> > + struct work_struct wq_work;
>
> We could use system_freezable_wq instead.
> I do agree a dedicated wq is better since this can get blocked
> for a long time while allocating memory.
>
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from
a kthread to a workqueue. I have gained some more experience with
the APIs in the meantime. I hope that you would like the outcome.
I have added one more patch that fixes a separate problem with
restoring the balloon after the system freeze. I have found this
when testing the conversion.
Changes against v3:
+ rebased on
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from
a kthread to a workqueue. I have gained some more experience with
the APIs in the meantime. I hope that you would like the outcome.
I have added one more patch that fixes a separate problem with
restoring the balloon after the system freeze. I have found this
when testing the conversion.
Changes against v3:
+ rebased on
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
On Fri, Dec 04, 2015 at 02:37:51PM +0100, Petr Mladek wrote:
> From: Petr Mladek <pmladek at suse.cz>
>
> This patch moves the deferred work from the "vballoon" kthread into a
> system freezable workqueue.
>
> We do not need to maintain and run a dedicated kthread. Also the event
> driven workqueues API makes the logic much easier. Especially, we do
> not
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
On Fri, Dec 04, 2015 at 02:37:51PM +0100, Petr Mladek wrote:
> From: Petr Mladek <pmladek at suse.cz>
>
> This patch moves the deferred work from the "vballoon" kthread into a
> system freezable workqueue.
>
> We do not need to maintain and run a dedicated kthread. Also the event
> driven workqueues API makes the logic much easier. Especially, we do
> not
2015 Dec 04
0
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
From: Petr Mladek <pmladek at suse.cz>
This patch moves the deferred work from the "vballoon" kthread into a
system freezable workqueue.
We do not need to maintain and run a dedicated kthread. Also the event
driven workqueues API makes the logic much easier. Especially, we do
not longer need an own wait queue, wait function, and freeze point.
The conversion is pretty
2016 Jan 02
3
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
On Sat, Jan 02, 2016 at 06:43:16AM -0500, Tejun Heo wrote:
> Hello,
>
> On Fri, Jan 01, 2016 at 12:18:17PM +0200, Michael S. Tsirkin wrote:
> > > My initial idea was to use a dedicated workqueue. Michael S. Tsirkin
> > > suggested using a system one. Tejun Heo confirmed that the system
> > > workqueue has a pretty high concurrency level (256) by default.
>
2016 Jan 02
3
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
On Sat, Jan 02, 2016 at 06:43:16AM -0500, Tejun Heo wrote:
> Hello,
>
> On Fri, Jan 01, 2016 at 12:18:17PM +0200, Michael S. Tsirkin wrote:
> > > My initial idea was to use a dedicated workqueue. Michael S. Tsirkin
> > > suggested using a system one. Tejun Heo confirmed that the system
> > > workqueue has a pretty high concurrency level (256) by default.
>
2017 Oct 22
2
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
Wei Wang wrote:
> The balloon_lock was used to synchronize the access demand to elements
> of struct virtio_balloon and its queue operations (please see commit
> e22504296d). This prevents the concurrent run of the leak_balloon and
> fill_balloon functions, thereby resulting in a deadlock issue on OOM:
>
> fill_balloon: take balloon_lock and wait for OOM to get some memory;
>
2017 Oct 22
2
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
Wei Wang wrote:
> The balloon_lock was used to synchronize the access demand to elements
> of struct virtio_balloon and its queue operations (please see commit
> e22504296d). This prevents the concurrent run of the leak_balloon and
> fill_balloon functions, thereby resulting in a deadlock issue on OOM:
>
> fill_balloon: take balloon_lock and wait for OOM to get some memory;
>
2017 Oct 13
4
[PATCH] virtio_balloon: fix deadlock on OOM
fill_balloon doing memory allocations under balloon_lock
can cause a deadlock when leak_balloon is called from
virtballoon_oom_notify and tries to take same lock.
To fix, split page allocation and enqueue and do allocations outside the lock.
Here's a detailed analysis of the deadlock by Tetsuo Handa:
In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to
serialize
2017 Oct 13
4
[PATCH] virtio_balloon: fix deadlock on OOM
fill_balloon doing memory allocations under balloon_lock
can cause a deadlock when leak_balloon is called from
virtballoon_oom_notify and tries to take same lock.
To fix, split page allocation and enqueue and do allocations outside the lock.
Here's a detailed analysis of the deadlock by Tetsuo Handa:
In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to
serialize
2017 Nov 08
2
[PATCH v3] virtio_balloon: fix deadlock on OOM
fill_balloon doing memory allocations under balloon_lock
can cause a deadlock when leak_balloon is called from
virtballoon_oom_notify and tries to take same lock.
To fix, split page allocation and enqueue and do allocations outside the lock.
Here's a detailed analysis of the deadlock by Tetsuo Handa:
In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to
serialize
2017 Nov 08
2
[PATCH v3] virtio_balloon: fix deadlock on OOM
fill_balloon doing memory allocations under balloon_lock
can cause a deadlock when leak_balloon is called from
virtballoon_oom_notify and tries to take same lock.
To fix, split page allocation and enqueue and do allocations outside the lock.
Here's a detailed analysis of the deadlock by Tetsuo Handa:
In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to
serialize