<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sys.c, branch v2.6.20</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2007-01-23T19:08:03Z</updated>
<entry>
<title>[PATCH] notifiers: fix blocking_notifier_call_chain() scalability</title>
<updated>2007-01-23T19:08:03Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-01-23T09:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b5180b65122666a36a1a232b7b9b38b21a9dcdd'/>
<id>urn:sha1:1b5180b65122666a36a1a232b7b9b38b21a9dcdd</id>
<content type='text'>
while lock-profiling the -rt kernel i noticed weird contention during
mmap-intense workloads, and the tracer showed the following gem, in one
of our MM hotpaths:

 threaded-2771  1....   65us : sys_munmap (sysenter_do_call)
 threaded-2771  1....   66us : profile_munmap (sys_munmap)
 threaded-2771  1....   66us : blocking_notifier_call_chain (profile_munmap)
 threaded-2771  1....   66us : rt_down_read (blocking_notifier_call_chain)

ouch! a global rw-semaphore taken in one of the most performance-
sensitive codepaths of the kernel.  And i dont even have oprofile
enabled! All distro kernels have CONFIG_PROFILING enabled, so this
scalability problem affects the majority of Linux users.

The fix is to enhance blocking_notifier_call_chain() to only take the
lock if there appears to be work on the call-chain.

With this patch applied i get nicely saturated system, and much higher
munmap performance, on SMP systems.

And as a bonus this also fixes a similar scalability bottleneck in the
thread-exit codepath: profile_task_exit() ...

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sys_setpgid: eliminate unnecessary do_each_task_pid(PIDTYPE_PGID)</title>
<updated>2006-12-08T16:28:52Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-12-08T10:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f020bc468fe4a91d32046d448511978c7b611315'/>
<id>urn:sha1:f020bc468fe4a91d32046d448511978c7b611315</id>
<content type='text'>
All tasks in the process group have the same sid, we don't need to iterate
them all to check that the caller of sys_setpgid() doesn't change its
session.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] add process_session() helper routine</title>
<updated>2006-12-08T16:28:51Z</updated>
<author>
<name>Cedric Le Goater</name>
<email>clg@fr.ibm.com</email>
</author>
<published>2006-12-08T10:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=937949d9edbf4049bd41af6c9f92c26280584564'/>
<id>urn:sha1:937949d9edbf4049bd41af6c9f92c26280584564</id>
<content type='text'>
Replace occurences of task-&gt;signal-&gt;session by a new process_session() helper
routine.

It will be useful for pid namespaces to abstract the session pid number.

Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Sukadev Bhattiprolu &lt;sukadev@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] tty: -&gt;signal-&gt;tty locking</title>
<updated>2006-12-08T16:28:38Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-12-08T10:36:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24ec839c431eb79bb8f6abc00c4e1eb3b8c4d517'/>
<id>urn:sha1:24ec839c431eb79bb8f6abc00c4e1eb3b8c4d517</id>
<content type='text'>
Fix the locking of signal-&gt;tty.

Use -&gt;sighand-&gt;siglock to protect -&gt;signal-&gt;tty; this lock is already used
by most other members of -&gt;signal/-&gt;sighand.  And unless we are 'current'
or the tasklist_lock is held we need -&gt;siglock to access -&gt;signal anyway.

(NOTE: sys_unshare() is broken wrt -&gt;sighand locking rules)

Note that tty_mutex is held over tty destruction, so while holding
tty_mutex any tty pointer remains valid.  Otherwise the lifetime of ttys
are governed by their open file handles.  This leaves some holes for tty
access from signal-&gt;tty (or any other non file related tty access).

It solves the tty SLAB scribbles we were seeing.

(NOTE: the change from group_send_sig_info to __group_send_sig_info needs to
       be examined by someone familiar with the security framework, I think
       it is safe given the SEND_SIG_PRIV from other __group_send_sig_info
       invocations)

[schwidefsky@de.ibm.com: 3270 fix]
[akpm@osdl.org: various post-viro fixes]
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Alan Cox &lt;alan@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Chris Wright &lt;chrisw@sous-sol.org&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Jan Kara &lt;jack@ucw.cz&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sys: remove unused variable</title>
<updated>2006-12-07T16:39:44Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@cs.washington.edu</email>
</author>
<published>2006-12-07T04:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a09c17a6fdad9ae5b5ea1c3383080f84ec76ab20'/>
<id>urn:sha1:a09c17a6fdad9ae5b5ea1c3383080f84ec76ab20</id>
<content type='text'>
Remove unused 'new_ruid' variable.

Reported by David Binderman &lt;dcb314@hotmail.com&gt;.

Signed-off-by: David Rientjes &lt;rientjes@cs.washington.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>WorkStruct: Pass the work_struct pointer instead of context data</title>
<updated>2006-11-22T14:55:48Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-11-22T14:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=65f27f38446e1976cc98fd3004b110fedcddd189'/>
<id>urn:sha1:65f27f38446e1976cc98fd3004b110fedcddd189</id>
<content type='text'>
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] SRCU: report out-of-memory errors</title>
<updated>2006-10-04T14:55:30Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2006-10-04T09:17:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6a92013ba458804161c0c5b6d134d82204dc233'/>
<id>urn:sha1:e6a92013ba458804161c0c5b6d134d82204dc233</id>
<content type='text'>
Currently the init_srcu_struct() routine has no way to report out-of-memory
errors.  This patch (as761) makes it return -ENOMEM when the per-cpu data
allocation fails.

The patch also makes srcu_init_notifier_head() report a BUG if a notifier
head can't be initialized.  Perhaps it should return -ENOMEM instead, but
in the most likely cases where this might occur I don't think any recovery
is possible.  Notifier chains generally are not created dynamically.

[akpm@osdl.org: avoid statement-with-side-effect in macro]
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Paul E. McKenney &lt;paulmck@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Add SRCU-based notifier chains</title>
<updated>2006-10-04T14:55:30Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2006-10-04T09:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eabc069401bcf45bcc3f19e643017bf761780aa8'/>
<id>urn:sha1:eabc069401bcf45bcc3f19e643017bf761780aa8</id>
<content type='text'>
This patch (as751) adds a new type of notifier chain, based on the SRCU
(Sleepable Read-Copy Update) primitives recently added to the kernel.  An
SRCU notifier chain is much like a blocking notifier chain, in that it must
be called in process context and its callout routines are allowed to sleep.
 The difference is that the chain's links are protected by the SRCU
mechanism rather than by an rw-semaphore, so calling the chain has
extremely low overhead: no memory barriers and no cache-line bouncing.  On
the other hand, unregistering from the chain is expensive and the chain
head requires special runtime initialization (plus cleanup if it is to be
deallocated).

SRCU notifiers are appropriate for notifiers that will be called very
frequently and for which unregistration occurs very seldom.  The proposed
"task notifier" scheme qualifies, as may some of the network notifiers.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Paul E. McKenney &lt;paulmck@us.ibm.com&gt;
Acked-by: Chandra Seetharaman &lt;sekharan@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] replace cad_pid by a struct pid</title>
<updated>2006-10-02T14:57:25Z</updated>
<author>
<name>Cedric Le Goater</name>
<email>clg@fr.ibm.com</email>
</author>
<published>2006-10-02T09:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ec52099e4b8678a60e9f93e41ad87885d64f3e6'/>
<id>urn:sha1:9ec52099e4b8678a60e9f93e41ad87885d64f3e6</id>
<content type='text'>
There are a few places in the kernel where the init task is signaled.  The
ctrl+alt+del sequence is one them.  It kills a task, usually init, using a
cached pid (cad_pid).

This patch replaces the pid_t by a struct pid to avoid pid wrap around
problem.  The struct pid is initialized at boot time in init() and can be
modified through systctl with

	/proc/sys/kernel/cad_pid

[ I haven't found any distro using it ? ]

It also introduces a small helper routine kill_cad_pid() which is used
where it seemed ok to use cad_pid instead of pid 1.

[akpm@osdl.org: cleanups, build fix]
Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] namespaces: utsname: switch to using uts namespaces</title>
<updated>2006-10-02T14:57:21Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2006-10-02T09:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9ff3990f08e9a0c2839cc22808b01732ea5b3e4'/>
<id>urn:sha1:e9ff3990f08e9a0c2839cc22808b01732ea5b3e4</id>
<content type='text'>
Replace references to system_utsname to the per-process uts namespace
where appropriate.  This includes things like uname.

Changes: Per Eric Biederman's comments, use the per-process uts namespace
	for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c

[jdike@addtoit.com: UML fix]
[clg@fr.ibm.com: cleanup]
[akpm@osdl.org: build fix]
Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Andrey Savochkin &lt;saw@sw.ru&gt;
Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
