<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/task_work.h, branch linux-3.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.6.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.6.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2012-07-22T19:57:56Z</updated>
<entry>
<title>merge task_work and rcu_head, get rid of separate allocation for keyring case</title>
<updated>2012-07-22T19:57:56Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-27T07:07:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=67d1214551e800f9fe7dc7c47a346d2df0fafed5'/>
<id>urn:sha1:67d1214551e800f9fe7dc7c47a346d2df0fafed5</id>
<content type='text'>
task_work and rcu_head are identical now; merge them (calling the result
struct callback_head, rcu_head #define'd to it), kill separate allocation
in security/keys since we can just use cred-&gt;rcu now.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>trim task_work: get rid of hlist</title>
<updated>2012-07-22T19:57:55Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-27T05:24:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=158e1645e07f3e9f7e4962d7a0997f5c3b98311b'/>
<id>urn:sha1:158e1645e07f3e9f7e4962d7a0997f5c3b98311b</id>
<content type='text'>
layout based on Oleg's suggestion; single-linked list,
task-&gt;task_works points to the last element, forward pointer
from said last element points to head.  I'd still prefer
much more regular scheme with two pointers in task_work,
but...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>trimming task_work: kill -&gt;data</title>
<updated>2012-07-22T19:57:54Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-26T18:10:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41f9d29f09ca0b22c3631e8a39676e74cda9bcc0'/>
<id>urn:sha1:41f9d29f09ca0b22c3631e8a39676e74cda9bcc0</id>
<content type='text'>
get rid of the only user of -&gt;data; this is _not_ the final variant - in the
end we'll have task_work and rcu_head identical and just use cred-&gt;rcu,
at which point the separate allocation will be gone completely.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>task_work_add: generic process-context callbacks</title>
<updated>2012-05-24T02:09:21Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-05-11T00:59:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e73f8959af0439d114847eab5a8a5ce48f1217c4'/>
<id>urn:sha1:e73f8959af0439d114847eab5a8a5ce48f1217c4</id>
<content type='text'>
Provide a simple mechanism that allows running code in the (nonatomic)
context of the arbitrary task.

The caller does task_work_add(task, task_work) and this task executes
task_work-&gt;func() either from do_notify_resume() or from do_exit().  The
callback can rely on PF_EXITING to detect the latter case.

"struct task_work" can be embedded in another struct, still it has "void
*data" to handle the most common/simple case.

This allows us to kill the -&gt;replacement_session_keyring hack, and
potentially this can have more users.

Performance-wise, this adds 2 "unlikely(!hlist_empty())" checks into
tracehook_notify_resume() and do_exit().  But at the same time we can
remove the "replacement_session_keyring != NULL" checks from
arch/*/signal.c and exit_creds().

Note: task_work_add/task_work_run abuses -&gt;pi_lock.  This is only because
this lock is already used by lookup_pi_state() to synchronize with
do_exit() setting PF_EXITING.  Fortunately the scope of this lock in
task_work.c is really tiny, and the code is unlikely anyway.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Richard Kuo &lt;rkuo@codeaurora.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Alexander Gordeev &lt;agordeev@redhat.com&gt;
Cc: Chris Zankel &lt;chris@zankel.net&gt;
Cc: David Smith &lt;dsmith@redhat.com&gt;
Cc: "Frank Ch. Eigler" &lt;fche@redhat.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Larry Woodman &lt;lwoodman@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
