search for: workqueue

Displaying 20 results from an estimated 1158 matches for "workqueue".

2018 Feb 11
0
[PATCH 1/5] workqueue: Allow retrieval of current task's work struct
Introduce a helper to retrieve the current task's work struct if it is a workqueue worker. This allows us to fix a long-standing deadlock in several DRM drivers wherein the ->runtime_suspend callback waits for a specific worker to finish and that worker in turn calls a function which waits for runtime suspend to finish. That function is invoked from multiple call sites and w...
2012 Oct 19
1
FW: [PATCH] workqueue: cancel_delayed_work() should return %NULL if work item is idle
...ne-line patch is merged, as the code in ramster that provoked it is directly leveraged from ocfs2 o2net. > From: Tejun Heo [mailto:tj at kernel.org] > Sent: Thursday, October 18, 2012 5:39 PM > To: Dan Magenheimer > Cc: linux-kernel at vger.kernel.org; Konrad Wilk > Subject: [PATCH] workqueue: cancel_delayed_work() should return %NULL if work item is idle > > From e65120fcfc1cb9697655d29ecd7982451c05d3c2 Mon Sep 17 00:00:00 2001 > From: Dan Magenheimer <dan.magenheimer at oracle.com> > Date: Thu, 18 Oct 2012 16:31:37 -0700 > > 57b30ae77b ("workqueue: reimp...
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. > However, please add...
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. > However, please add...
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 longer need an own wait queue, wait function, and freeze point. > > The conversion is pretty straightforward. One cycle of the...
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 longer need an own wait queue, wait function, and freeze point. > > The conversion is pretty straightforward. One cycle of the...
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...
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...
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 straightforward. One cycle of the main loop is put into a work....
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...
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...
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...ms no matter when it's called or what's going on. External (non-self) queueings of course should be stopped in other ways. > > > From that POV a dedicated WQ kept it simple. > > > > A dedicated wq doesn't do anything for that. You can't shut down a > > workqueue with a pending work item on it. destroy_workqueue() will > > try to drain the target wq, warn if it doesn't finish in certain > > number of iterations and just keep trying indefinitely. > > > > Thanks. > > Right, so eventually we'll stop requeueuing and it w...
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...ms no matter when it's called or what's going on. External (non-self) queueings of course should be stopped in other ways. > > > From that POV a dedicated WQ kept it simple. > > > > A dedicated wq doesn't do anything for that. You can't shut down a > > workqueue with a pending work item on it. destroy_workqueue() will > > try to drain the target wq, warn if it doesn't finish in certain > > number of iterations and just keep trying indefinitely. > > > > Thanks. > > Right, so eventually we'll stop requeueuing and it w...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
Hello. On 10/5/2014 8:07 PM, Michael S. Tsirkin wrote: > config_mutex served two purposes: prevent multiple concurrent config > change handlers, and synchronize access to config_enable flag. > Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1 > workqueue: make all workqueues non-reentrant > all workqueues are non-reentrant, and config_enable > is now gone. > Get rid of the unnecessary lock. > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/net/virtio_net.c | 7 +------ > 1 file changed, 1 insert...
2014 Oct 06
2
[PATCH 09/16] virtio-net: drop config_mutex
Hello. On 10/5/2014 8:07 PM, Michael S. Tsirkin wrote: > config_mutex served two purposes: prevent multiple concurrent config > change handlers, and synchronize access to config_enable flag. > Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1 > workqueue: make all workqueues non-reentrant > all workqueues are non-reentrant, and config_enable > is now gone. > Get rid of the unnecessary lock. > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/net/virtio_net.c | 7 +------ > 1 file changed, 1 insert...
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...
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...
2015 Feb 06
0
[PATCH] x86 spinlock: Fix memory corruption on completing completions
...] BUG: spinlock lockup suspected on CPU#31, kworker/31:1/5213 [ 161.613469] lock: purge_lock.28981+0x0/0x40, .magic: dead4ead, .owner: kworker/7:1/6400, .owner_cpu: 7 [ 161.613469] CPU: 31 PID: 5213 Comm: kworker/31:1 Not tainted 3.19.0-rc7-next-20150204-sasha-00048-gee3a350 #1869 [ 161.613469] Workqueue: events bpf_prog_free_deferred [ 161.613469] 0000000000000000 00000000f03dd27f ffff88056b227a88 ffffffffa1702276 [ 161.613469] 0000000000000000 ffff88017cf70000 ffff88056b227aa8 ffffffff9e1d009c [ 161.613469] ffffffffa3edae60 0000000086c3f830 ffff88056b227ad8 ffffffff9e1d01d7 [ 161.613469] C...
2015 Feb 06
0
[PATCH] x86 spinlock: Fix memory corruption on completing completions
...] BUG: spinlock lockup suspected on CPU#31, kworker/31:1/5213 [ 161.613469] lock: purge_lock.28981+0x0/0x40, .magic: dead4ead, .owner: kworker/7:1/6400, .owner_cpu: 7 [ 161.613469] CPU: 31 PID: 5213 Comm: kworker/31:1 Not tainted 3.19.0-rc7-next-20150204-sasha-00048-gee3a350 #1869 [ 161.613469] Workqueue: events bpf_prog_free_deferred [ 161.613469] 0000000000000000 00000000f03dd27f ffff88056b227a88 ffffffffa1702276 [ 161.613469] 0000000000000000 ffff88017cf70000 ffff88056b227aa8 ffffffff9e1d009c [ 161.613469] ffffffffa3edae60 0000000086c3f830 ffff88056b227ad8 ffffffff9e1d01d7 [ 161.613469] C...
2016 Jan 25
2
[PATCH v5 0/2] virtio_balloon: Conversion to workqueue + parallel stats
...to two; it allows to update stats even when the balloon is being resized Changes against v3: + rebased on 4.4-rc3 + call cancel_work_sync() when removing the balloon + do not queue the work from fill_balloon() and leak_balloon() because they are called also independently from the workqueue, e.g. remove_common(), virtballoon_oom_notify(). Re-queue the work from the work function when necessary. Changes against v2: + Use system_freezable_wq instead of an allocated one and move INIT_WORK() higher in virtballoon_probe(). + Fix typos in the commit message. Changes ag...