<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux-bitkeeper.git/ipc/util.c, branch master</title>
<subtitle>Linux Kernel BitKeeper History</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/atom?h=master</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/'/>
<updated>2004-10-28T01:33:04Z</updated>
<entry>
<title>[PATCH] Lock initializer unifying (Core)</title>
<updated>2004-10-28T01:33:04Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2004-10-28T01:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=c83ff1d2b7be6651f369b3687f88f3cf9236b4f6'/>
<id>urn:sha1:c83ff1d2b7be6651f369b3687f88f3cf9236b4f6</id>
<content type='text'>
To make spinlock/rwlock initialization consistent all over the kernel,
this patch converts explicit lock-initializers into spin_lock_init() and
rwlock_init() calls.

Currently, spinlocks and rwlocks are initialized in two different ways:

  lock = SPIN_LOCK_UNLOCKED
  spin_lock_init(&amp;lock)

  rwlock = RW_LOCK_UNLOCKED
  rwlock_init(&amp;rwlock)

this patch converts all explicit lock initializations to
spin_lock_init() or rwlock_init(). (Besides consistency this also helps
automatic lock validators and debugging code.)

The conversion was done with a script, it was verified manually and it
was reviewed, compiled and tested as far as possible on x86, ARM, PPC.

There is no runtime overhead or actual code change resulting out of this
patch, because spin_lock_init() and rwlock_init() are macros and are
thus equivalent to the explicit initialization method.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&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] RCU: eliminating explicit memory barriers from SysV IPC</title>
<updated>2004-10-28T01:28:37Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@us.ibm.com</email>
</author>
<published>2004-10-28T01:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=3f9fabe7e676a768b70c662f334f3b290ed0907e'/>
<id>urn:sha1:3f9fabe7e676a768b70c662f334f3b290ed0907e</id>
<content type='text'>
This patch uses the rcu_assign_pointer() API to eliminate a number of explicit
memory barriers from the SysV IPC code that uses RCU.  It also restructures
the ipc_ids structure so that the array size is stored in the same memory
block as the array itself (see the new struct ipc_id_ary).  This prevents the
race that the earlier code was subject to, where a reader could see a mismatch
between the size and the actual array.  With the size stored with the array,
the possibility of mismatch is eliminated -- with out the need for careful
ordering and explicit memory barriers.  This has been tested successfully on
i386 and ppc64.

Signed-off-by: &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] rcu: abstracted RCU dereferencing</title>
<updated>2004-08-23T05:58:51Z</updated>
<author>
<name>Dipankar Sarma</name>
<email>dipankar@in.ibm.com</email>
</author>
<published>2004-08-23T05:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=5dae7a69a46f3a9f6562a4702f8beaa7f77e94f6'/>
<id>urn:sha1:5dae7a69a46f3a9f6562a4702f8beaa7f77e94f6</id>
<content type='text'>
Use abstracted RCU API to dereference RCU protected data.  Hides barrier
details.  Patch from Paul McKenney.

This patch introduced an rcu_dereference() macro that replaces most uses of
smp_read_barrier_depends().  The new macro has the advantage of explicitly
documenting which pointers are protected by RCU -- in contrast, it is
sometimes difficult to figure out which pointer is being protected by a given
smp_read_barrier_depends() call.

Signed-off-by: Paul 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] ipc: Add refcount to ipc_rcu_alloc</title>
<updated>2004-08-23T05:40:37Z</updated>
<author>
<name>Manfred Spraul</name>
<email>manfred@colorfullife.com</email>
</author>
<published>2004-08-23T05:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=3a4262a016085f178811ec2459b93f63127e6280'/>
<id>urn:sha1:3a4262a016085f178811ec2459b93f63127e6280</id>
<content type='text'>
The lifetime of the ipc objects (sem array, msg queue, shm mapping) is
controlled by kern_ipc_perms-&gt;lock - a spinlock.  There is no simple way to
reacquire this spinlock after it was dropped to
schedule()/kmalloc/copy_{to,from}_user/whatever.

The attached patch adds a reference count as a preparation to get rid of
sem_revalidate().

Signed-Off-By: Manfred Spraul &lt;manfred@colorfullife.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] rcu: avoid passing an argument to the callback function</title>
<updated>2004-06-24T01:50:18Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-06-24T01:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=8c1ce9d6d628945ff23f844dbe9f21f5d5383b99'/>
<id>urn:sha1:8c1ce9d6d628945ff23f844dbe9f21f5d5383b99</id>
<content type='text'>
From: Dipankar Sarma &lt;dipankar@in.ibm.com&gt;

This patch changes the call_rcu() API and avoids passing an argument to the
callback function as suggested by Rusty.  Instead, it is assumed that the
user has embedded the rcu head into a structure that is useful in the
callback and the rcu_head pointer is passed to the callback.  The callback
can use container_of() to get the pointer to its structure and work with
it.  Together with the rcu-singly-link patch, it reduces the rcu_head size
by 50%.  Considering that we use these in things like struct dentry and
struct dst_entry, this is good savings in space.

An example :

struct my_struct {
	struct rcu_head rcu;
	int x;
	int y;
};

void my_rcu_callback(struct rcu_head *head)
{
	struct my_struct *p = container_of(head, struct my_struct, rcu);
	free(p);
}

void my_delete(struct my_struct *p)
{
	...
	call_rcu(&amp;p-&gt;rcu, my_rcu_callback);
	...
}

Signed-Off-By: Dipankar Sarma &lt;dipankar@in.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] Sanitise handling of unneeded syscall stubs</title>
<updated>2004-05-22T03:38:29Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-05-22T03:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=581ae915a3e17cbee9e393d4cf1e877b08b8a7a1'/>
<id>urn:sha1:581ae915a3e17cbee9e393d4cf1e877b08b8a7a1</id>
<content type='text'>
From: David Mosberger &lt;davidm@napali.hpl.hp.com&gt;

Below is a patch that tries to sanitize the dropping of unneeded system-call
stubs in generic code.  In some instances, it would be possible to move the
optional system-call stubs into a library routine which would avoid the need
for #ifdefs, but in many cases, doing so would require making several
functions global (and possibly exporting additional data-structures in
header-files).  Furthermore, it would inhibit (automatic) inlining in the
cases in the cases where the stubs are needed.  For these reasons, the patch
keeps the #ifdef-approach.

This has been tested on ia64 and there were no objections from the
arch-maintainers (and one positive response).  The patch should be safe but
arch-maintainers may want to take a second look to see if some __ARCH_WANT_foo
macros should be removed for their architecture (I'm quite sure that's the
case, but I wanted to play it safe and only preserved the status-quo in that
regard).
</content>
</entry>
<entry>
<title>[PATCH] posix message queues: code move</title>
<updated>2004-04-12T05:53:50Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-04-12T05:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=c334f752d8e9d3847d4459d06f7544dea9a49923'/>
<id>urn:sha1:c334f752d8e9d3847d4459d06f7544dea9a49923</id>
<content type='text'>
From: Manfred Spraul &lt;manfred@colorfullife.com&gt;

cleanup of sysv ipc as a preparation for posix message queues:

- replace !CONFIG_SYSVIPC wrappers for copy_semundo and exit_sem with
  static inline wrappers.  Now the whole ipc/util.c file is only used if
  CONFIG_SYSVIPC is set, use makefile magic instead of #ifdef.

- remove the prototypes for copy_semundo and exit_sem from kernel/fork.c

- they belong into a header file.

- create a new msgutil.c with the helper functions for message queues.

- cleanup the helper functions: run Lindent, add __user tags.
</content>
</entry>
<entry>
<title>[PATCH] cleanup condsyscall for sysv ipc</title>
<updated>2004-02-22T15:05:38Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-02-22T15:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=ae0ecb664a7c4d16fa2a737c50e2d5833b06cdd0'/>
<id>urn:sha1:ae0ecb664a7c4d16fa2a737c50e2d5833b06cdd0</id>
<content type='text'>
From: Manfred Spraul &lt;manfred@colorfullife.com&gt;

Attached is a patch that replaces the #ifndef CONFIG_SYSV syscall stubs
with cond_syscall stubs.
</content>
</entry>
<entry>
<title>[PATCH] PA-RISC needs IPC64 structs</title>
<updated>2004-02-06T11:44:47Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@debian.org</email>
</author>
<published>2004-02-06T11:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=1941d9bcab411cfee706feb1552d7998a984d186'/>
<id>urn:sha1:1941d9bcab411cfee706feb1552d7998a984d186</id>
<content type='text'>
PA-RISC also uses the 64-bit version of the IPC structs.
</content>
</entry>
<entry>
<title>[PATCH] UID16 fixes</title>
<updated>2003-10-06T08:15:36Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@muc.de</email>
</author>
<published>2003-10-06T08:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux-bitkeeper.git/commit/?id=a001f96a1c93d01e6da68f3de143f01f51b60f87'/>
<id>urn:sha1:a001f96a1c93d01e6da68f3de143f01f51b60f87</id>
<content type='text'>
This fixes CONFIG_UID16 problems on x86-64 as discussed earlier.

CONFIG_UID16 now only selects the inclusion of kernel/uid16.c, all
conversions are triggered dynamically based on type sizes.  This allows
x86-64 to both include uid16.c for emulation purposes, but not truncate
uids to 16bit in sys_newstat. 

- Replace the old macros from linux/highuid.h with new SET_UID/SET_GID
  macros that do type checking. Based on Linus' proposal.

- Fix everybody to use them.

- Clean up some cruft in the x86-64 32bit emulation allowed by this
  (other 32bit emulations could be cleaned too, but I'm too lazy for 
  that right now) 

- Add one missing EOVERFLOW check in x86-64 32bit sys_newstat while
  I was at it.
</content>
</entry>
</feed>
