<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/workqueue.h, branch v5.18.19</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.18.19</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.18.19'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-10-20T16:19:03Z</updated>
<entry>
<title>workqueue: Introduce show_one_worker_pool and show_one_workqueue.</title>
<updated>2021-10-20T16:19:03Z</updated>
<author>
<name>Imran Khan</name>
<email>imran.f.khan@oracle.com</email>
</author>
<published>2021-10-20T03:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=55df0933be74bd2e52aba0b67eb743ae0feabe7e'/>
<id>urn:sha1:55df0933be74bd2e52aba0b67eb743ae0feabe7e</id>
<content type='text'>
Currently show_workqueue_state shows the state of all workqueues and of
all worker pools. In certain cases we may need to dump state of only a
specific workqueue or worker pool. For example in destroy_workqueue we
only need to show state of the workqueue which is getting destroyed.

So rename show_workqueue_state to show_all_workqueues(to signify it
dumps state of all busy workqueues) and divide it into more granular
functions (show_one_workqueue and show_one_worker_pool), that would show
states of individual workqueues and worker pools and can be used in
cases such as the one mentioned above.

Also, as mentioned earlier, make destroy_workqueue dump data pertaining
to only the workqueue that is being destroyed and make user(s) of
earlier interface(show_workqueue_state), use new interface
(show_all_workqueues).

Signed-off-by: Imran Khan &lt;imran.f.khan@oracle.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: annotate alloc_workqueue() as printf</title>
<updated>2021-09-13T17:53:27Z</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eb@emlix.com</email>
</author>
<published>2021-09-13T10:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=80f0a1f99983296be587325004acf72dd11eccd8'/>
<id>urn:sha1:80f0a1f99983296be587325004acf72dd11eccd8</id>
<content type='text'>
This also enables checking of allows alloc_ordered_workqueue().

Signed-off-by: Rolf Eike Beer &lt;eb@emlix.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: Remove unused WORK_NO_COLOR</title>
<updated>2021-08-17T17:49:10Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@linux.alibaba.com</email>
</author>
<published>2021-08-17T01:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bdb0a6548d2233dada752109a71bcf4c9b8ae6d6'/>
<id>urn:sha1:bdb0a6548d2233dada752109a71bcf4c9b8ae6d6</id>
<content type='text'>
WORK_NO_COLOR has no user now, just remove it.

Signed-off-by: Lai Jiangshan &lt;laijs@linux.alibaba.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: Rename "delayed" (delayed by active management) to "inactive"</title>
<updated>2021-08-17T17:49:09Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@linux.alibaba.com</email>
</author>
<published>2021-08-17T01:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f97a4a1a3f8769e3452885967955e21c88f3f263'/>
<id>urn:sha1:f97a4a1a3f8769e3452885967955e21c88f3f263</id>
<content type='text'>
There are two kinds of "delayed" work items in workqueue subsystem.

One is for timer-delayed work items which are visible to workqueue users.
The other kind is for work items delayed by active management which can
not be directly visible to workqueue users.  We mixed the word "delayed"
for both kinds and caused somewhat ambiguity.

This patch renames the later one (delayed by active management) to
"inactive", because it is used for workqueue active management and
most of its related symbols are named with "active" or "activate".

All "delayed" and "DELAYED" are carefully checked and renamed one by
one to avoid accidentally changing the name of the other kind for
timer-delayed.

No functional change intended.

Signed-off-by: Lai Jiangshan &lt;laijs@linux.alibaba.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: Fix typo in comments</title>
<updated>2021-08-09T22:31:03Z</updated>
<author>
<name>Cai Huoqing</name>
<email>caihuoqing@baidu.com</email>
</author>
<published>2021-07-31T00:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=67dc8325370844ffce92aa59abe8b453aa6aa83c'/>
<id>urn:sha1:67dc8325370844ffce92aa59abe8b453aa6aa83c</id>
<content type='text'>
Fix typo:
*assing  ==&gt; assign
*alloced  ==&gt; allocated
*Retun  ==&gt; Return
*excute  ==&gt; execute

v1-&gt;v2:
*reverse 'iff'
*update changelog

Signed-off-by: Cai Huoqing &lt;caihuoqing@baidu.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: fix annotation for WQ_SYSFS</title>
<updated>2021-01-19T15:20:07Z</updated>
<author>
<name>Menglong Dong</name>
<email>dong.menglong@zte.com.cn</email>
</author>
<published>2021-01-18T08:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=93e86295f5e9238779096fa599c3804a08e25bd1'/>
<id>urn:sha1:93e86295f5e9238779096fa599c3804a08e25bd1</id>
<content type='text'>
'wq_sysfs_register()' in annotation for 'WQ_SYSFS' is unavailable,
change it to 'workqueue_sysfs_register()'.

Signed-off-by: Menglong Dong &lt;dong.menglong@zte.com.cn&gt;
Reviewed-by: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: fix a piece of comment about reserved bits for work flags</title>
<updated>2020-06-01T15:02:28Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@linux.alibaba.com</email>
</author>
<published>2020-06-01T08:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c39ba6b3a8d47be07c180f857564a25a0356d336'/>
<id>urn:sha1:c39ba6b3a8d47be07c180f857564a25a0356d336</id>
<content type='text'>
8a2e8e5dec7e("workqueue: fix cwq-&gt;nr_active underflow")
allocated one more bit from the work flags, and it updated
partial of the comments (128 bytes -&gt; 256 bytes), but it
failed to update the info about the number of reserved bits.

Signed-off-by: Lai Jiangshan &lt;laijs@linux.alibaba.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq</title>
<updated>2020-04-03T19:27:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-04-03T19:27:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0adb8bc0391f1fa7820529c0200fb0c4912fe365'/>
<id>urn:sha1:0adb8bc0391f1fa7820529c0200fb0c4912fe365</id>
<content type='text'>
Pull workqueue updates from Tejun Heo:
 "Nothing too interesting. Just two trivial patches"

* 'for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: Mark up unlocked access to wq-&gt;first_flusher
  workqueue: Make workqueue_init*() return void
</content>
</entry>
<entry>
<title>workqueue: Make workqueue_init*() return void</title>
<updated>2020-03-04T16:21:49Z</updated>
<author>
<name>Yu Chen</name>
<email>chen.yu@easystack.cn</email>
</author>
<published>2020-02-23T07:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2333e829952fb437db915bbb17f4d8c43127d438'/>
<id>urn:sha1:2333e829952fb437db915bbb17f4d8c43127d438</id>
<content type='text'>
The return values of workqueue_init() and workqueue_early_int() are
always 0, and there is no usage of their return value.  So just make
them return void.

Signed-off-by: Yu Chen &lt;chen.yu@easystack.cn&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>workqueue: Document (some) memory-ordering properties of {queue,schedule}_work()</title>
<updated>2020-02-12T20:59:40Z</updated>
<author>
<name>Andrea Parri</name>
<email>parri.andrea@gmail.com</email>
</author>
<published>2020-01-22T18:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dbb92f88648d6206bf22fcb764fb9fe2939d401a'/>
<id>urn:sha1:dbb92f88648d6206bf22fcb764fb9fe2939d401a</id>
<content type='text'>
It's desirable to be able to rely on the following property:  All stores
preceding (in program order) a call to a successful queue_work() will be
visible from the CPU which will execute the queued work by the time such
work executes, e.g.,

  { x is initially 0 }

    CPU0                              CPU1

    WRITE_ONCE(x, 1);                 [ "work" is being executed ]
    r0 = queue_work(wq, work);          r1 = READ_ONCE(x);

  Forbids: r0 == true &amp;&amp; r1 == 0

The current implementation of queue_work() provides such memory-ordering
property:

  - In __queue_work(), the -&gt;lock spinlock is acquired.

  - On the other side, in worker_thread(), this same -&gt;lock is held
    when dequeueing work.

So the locking ordering makes things work out.

Add this property to the DocBook headers of {queue,schedule}_work().

Suggested-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Andrea Parri &lt;parri.andrea@gmail.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
