<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/workqueue.h, branch v3.8-rc4</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8-rc4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8-rc4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-08-21T20:18:24Z</updated>
<entry>
<title>workqueue: deprecate __cancel_delayed_work()</title>
<updated>2012-08-21T20:18:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-21T20:18:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=136b5721d75a62a8f02c601c89122e32c1a85a84'/>
<id>urn:sha1:136b5721d75a62a8f02c601c89122e32c1a85a84</id>
<content type='text'>
Now that cancel_delayed_work() can be safely called from IRQ handlers,
there's no reason to use __cancel_delayed_work().  Use
cancel_delayed_work() instead of __cancel_delayed_work() and mark the
latter deprecated.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</content>
</entry>
<entry>
<title>workqueue: reimplement cancel_delayed_work() using try_to_grab_pending()</title>
<updated>2012-08-21T20:18:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-21T20:18:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57b30ae77bf00d2318df711ef9a4d2a9be0a3a2a'/>
<id>urn:sha1:57b30ae77bf00d2318df711ef9a4d2a9be0a3a2a</id>
<content type='text'>
cancel_delayed_work() can't be called from IRQ handlers due to its use
of del_timer_sync() and can't cancel work items which are already
transferred from timer to worklist.

Also, unlike other flush and cancel functions, a canceled delayed_work
would still point to the last associated cpu_workqueue.  If the
workqueue is destroyed afterwards and the work item is re-used on a
different workqueue, the queueing code can oops trying to dereference
already freed cpu_workqueue.

This patch reimplements cancel_delayed_work() using
try_to_grab_pending() and set_work_cpu_and_clear_pending().  This
allows the function to be called from IRQ handlers and makes its
behavior consistent with other flush / cancel functions.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>workqueue: use irqsafe timer for delayed_work</title>
<updated>2012-08-21T20:18:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-21T20:18:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0aecdd874d78b7129a64b056c20e529e2c916df'/>
<id>urn:sha1:e0aecdd874d78b7129a64b056c20e529e2c916df</id>
<content type='text'>
Up to now, for delayed_works, try_to_grab_pending() couldn't be used
from IRQ handlers because IRQs may happen while
delayed_work_timer_fn() is in progress leading to indefinite -EAGAIN.

This patch makes delayed_work use the new TIMER_IRQSAFE flag for
delayed_work-&gt;timer.  This makes try_to_grab_pending() and thus
mod_delayed_work_on() safe to call from IRQ handlers.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: clean up delayed_work initializers and add missing one</title>
<updated>2012-08-21T20:18:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-21T20:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f991b318cc6627a493b0d317a565bb7c3271f36b'/>
<id>urn:sha1:f991b318cc6627a493b0d317a565bb7c3271f36b</id>
<content type='text'>
Reimplement delayed_work initializers using new timer initializers
which take timer flags.  This reduces code duplications and will ease
further initializer changes.  This patch also adds a missing
initializer - INIT_DEFERRABLE_WORK_ONSTACK().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: make deferrable delayed_work initializer names consistent</title>
<updated>2012-08-21T20:18:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-21T20:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=203b42f7317494ae5e5efc7be6fb7f29c927f102'/>
<id>urn:sha1:203b42f7317494ae5e5efc7be6fb7f29c927f102</id>
<content type='text'>
Initalizers for deferrable delayed_work are confused.

* __DEFERRED_WORK_INITIALIZER()
* DECLARE_DEFERRED_WORK()
* INIT_DELAYED_WORK_DEFERRABLE()

Rename them to

* __DEFERRABLE_WORK_INITIALIZER()
* DECLARE_DEFERRABLE_WORK()
* INIT_DEFERRABLE_WORK()

This patch doesn't cause any functional changes.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: cosmetic whitespace updates for macro definitions</title>
<updated>2012-08-21T20:18:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-21T20:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ee64e7f697ad7e5575e6ac8900cfb71975484421'/>
<id>urn:sha1:ee64e7f697ad7e5575e6ac8900cfb71975484421</id>
<content type='text'>
Consistently use the last tab position for '\' line continuation in
complex macro definitions.  This is to help the following patches.

This patch is cosmetic.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: deprecate system_nrt[_freezable]_wq</title>
<updated>2012-08-20T21:51:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-20T21:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3b07e9ca26866697616097044f25fbe53dbab693'/>
<id>urn:sha1:3b07e9ca26866697616097044f25fbe53dbab693</id>
<content type='text'>
system_nrt[_freezable]_wq are now spurious.  Mark them deprecated and
convert all users to system[_freezable]_wq.

If you're cc'd and wondering what's going on: Now all workqueues are
non-reentrant, so there's no reason to use system_nrt[_freezable]_wq.
Please use system[_freezable]_wq instead.

This patch doesn't make any functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-By: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;

Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>workqueue: deprecate flush[_delayed]_work_sync()</title>
<updated>2012-08-20T21:51:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-20T21:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43829731dd372d04d6706c51052b9dabab9ca356'/>
<id>urn:sha1:43829731dd372d04d6706c51052b9dabab9ca356</id>
<content type='text'>
flush[_delayed]_work_sync() are now spurious.  Mark them deprecated
and convert all users to flush[_delayed]_work().

If you're cc'd and wondering what's going on: Now all workqueues are
non-reentrant and the regular flushes guarantee that the work item is
not pending or running on any CPU on return, so there's no reason to
use the sync flushes at all and they're going away.

This patch doesn't make any functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Mattia Dongili &lt;malattia@linux.it&gt;
Cc: Kent Yoder &lt;key@linux.vnet.ibm.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Karsten Keil &lt;isdn@linux-pingi.de&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Alasdair Kergon &lt;agk@redhat.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: linux-wireless@vger.kernel.org
Cc: Anton Vorontsov &lt;cbou@mail.ru&gt;
Cc: Sangbeom Kim &lt;sbkim73@samsung.com&gt;
Cc: "James E.J. Bottomley" &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Petr Vandrovec &lt;petr@vandrovec.name&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt; 
</content>
</entry>
<entry>
<title>workqueue: gut system_nrt[_freezable]_wq()</title>
<updated>2012-08-20T21:51:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-20T21:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ae930e0f4e66fd540c6fbad9f1e2a7743d8b9afe'/>
<id>urn:sha1:ae930e0f4e66fd540c6fbad9f1e2a7743d8b9afe</id>
<content type='text'>
Now that all workqueues are non-reentrant, system[_freezable]_wq() are
equivalent to system_nrt[_freezable]_wq().  Replace the latter with
wrappers around system[_freezable]_wq().  The wrapping goes through
inline functions so that __deprecated can be added easily.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: gut flush[_delayed]_work_sync()</title>
<updated>2012-08-20T21:51:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-20T21:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=606a5020b9bdceb20b4f43e11db0054afa349028'/>
<id>urn:sha1:606a5020b9bdceb20b4f43e11db0054afa349028</id>
<content type='text'>
Now that all workqueues are non-reentrant, flush[_delayed]_work_sync()
are equivalent to flush[_delayed]_work().  Drop the separate
implementation and make them thin wrappers around
flush[_delayed]_work().

* start_flush_work() no longer takes @wait_executing as the only left
  user - flush_work() - always sets it to %true.

* __cancel_work_timer() uses flush_work() instead of wait_on_work().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
