From: Nadia.Derbey@bull.net
To: efault@gmx.de
Cc: manfred@colorfullife.com, linux-kernel@vger.kernel.org,
paulmck@linux.vnet.ibm.com, akpm@linux-foundation.org,
peterz@infradead.org, xemul@openvz.org,
Nadia Derbey <Nadia.Derbey@bull.net>
Subject: [PATCH 08/13] Fix ridr_get_new_above_int()
Date: Fri, 11 Apr 2008 18:17:10 +0200 [thread overview]
Message-ID: <20080411162001.141840000@bull.net> (raw)
In-Reply-To: 20080411161702.460410000@bull.net
[-- Attachment #1: ridr_get_new.patch --]
[-- Type: text/plain, Size: 1418 bytes --]
[PATCH 08/13]
This patch only fixes the ridr_get_new_above_int() portion of ridr.c, to make
it RCU based.
Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
---
lib/ridr.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Index: linux-2.6.25-rc8-mm1/lib/ridr.c
===================================================================
--- linux-2.6.25-rc8-mm1.orig/lib/ridr.c 2008-04-11 17:55:37.000000000 +0200
+++ linux-2.6.25-rc8-mm1/lib/ridr.c 2008-04-11 17:58:41.000000000 +0200
@@ -256,7 +256,8 @@ static int ridr_get_new_above_int(struct
* Successfully found an empty slot. Install the user
* pointer and mark the slot full.
*/
- pa[0]->ary[id & IDR_MASK] = (struct ridr_layer *)ptr;
+ rcu_assign_pointer(pa[0]->ary[id & IDR_MASK],
+ (struct ridr_layer *)ptr);
pa[0]->count++;
ridr_mark_full(pa, id);
}
@@ -273,9 +274,9 @@ static int ridr_get_new_above_int(struct
* This is the allocate id function. It should be called with any
* required locks.
*
- * If memory is required, it will return -EAGAIN, you should unlock
- * and go back to the ridr_pre_get() call. If the ridr is full, it will
- * return -ENOSPC.
+ * If memory is required, it will return -EAGAIN, you should unlock, enable
+ * preemption and go back to the ridr_pre_get() call.
+ * If the ridr is full, it will return -ENOSPC.
*
* @id returns a value in the range 0 ... 0x7fffffff
*/
--
next prev parent reply other threads:[~2008-04-11 16:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-11 16:17 [PATCH 00/13] Re: Scalability requirements for sysv ipc Nadia.Derbey
2008-04-11 16:17 ` [PATCH 01/13] duplicate idr code Nadia.Derbey
2008-04-11 16:17 ` [PATCH 02/13] Change ridr structure Nadia.Derbey
2008-04-11 16:17 ` [PATCH 03/13] Fix ridr_pre_get() Nadia.Derbey
2008-04-11 16:17 ` [PATCH 04/13] Fix ridr_alloc_layer() Nadia.Derbey
2008-04-11 16:17 ` [PATCH 05/13] Fix free_layer() Nadia.Derbey
2008-04-11 16:17 ` [PATCH 06/13] Fix sub_alloc() Nadia.Derbey
2008-04-11 16:17 ` [PATCH 07/13] Fix get_empty_slot() Nadia.Derbey
2008-04-11 16:17 ` Nadia.Derbey [this message]
2008-04-11 16:17 ` [PATCH 09/13] Fix ridr_remove() Nadia.Derbey
2008-04-11 16:17 ` [PATCH 10/13] Fix ridr_find() Nadia.Derbey
2008-04-11 16:17 ` [PATCH 11/13] Integrate the ridr code Nadia.Derbey
2008-04-11 16:17 ` [PATCH 12/13] Integrate the ridr code into IPC code Nadia.Derbey
2008-04-11 16:17 ` [PATCH 13/13] Get rid of ipc_lock_down() Nadia.Derbey
2008-04-11 16:27 ` [PATCH 00/13] Re: Scalability requirements for sysv ipc Peter Zijlstra
2008-04-14 5:18 ` Nadia Derbey
2008-04-14 7:15 ` Peter Zijlstra
2008-04-14 8:33 ` Nadia Derbey
2008-04-14 10:52 ` Nadia Derbey
2008-04-14 18:54 ` Manfred Spraul
2008-04-15 6:13 ` Nadia Derbey
2008-04-19 23:28 ` Paul E. McKenney
2008-04-21 8:07 ` Nadia Derbey
2008-04-21 14:44 ` Paul E. McKenney
2008-04-14 13:54 ` Mike Galbraith
2008-04-14 15:01 ` Nadia Derbey
2008-04-19 23:24 ` Paul E. McKenney
2008-04-19 23:25 ` Paul E. McKenney
2008-04-21 5:59 ` Nadia Derbey
2008-04-29 14:35 ` Nadia Derbey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080411162001.141840000@bull.net \
--to=nadia.derbey@bull.net \
--cc=akpm@linux-foundation.org \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox