public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nadia.Derbey@bull.net
To: akpm@linux-foundation.org, paulmck@linux.vnet.ibm.com
Cc: manfred@colorfullife.com, lnxninja@linux.vnet.ibm.com,
	efault@gmx.de, linux-kernel@vger.kernel.org,
	Nadia Derbey <Nadia.Derbey@bull.net>
Subject: [PATCH -mm1] Remove useless calls to INIT_RCU_HEAD in the idr code (was Scalability requirements for sysv ipc - v3)
Date: Tue, 03 Jun 2008 08:56:34 +0200	[thread overview]
Message-ID: <20080603065712.322118000@bull.net> (raw)
In-Reply-To: 20080603065633.480505000@bull.net

[-- Attachment #1: remove_useless_init_rcu_head_from_idr_code.patch --]
[-- Type: text/plain, Size: 1220 bytes --]

Since I didn't get any answer yesterday, (see http://lkml.org/lkml/2008/6/2/20)
here's the patch after Paul's review.


Regards,
Nadia

[ PATCH 01/01 ]

This is a trivial patch that removes unneeded calls to INIT_RCU_HEAD() in the
idr api code.

This patch applies to 2.6.26-rc2-mm1.

Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>

---
 lib/idr.c |    3 ---
 1 file changed, 3 deletions(-)

Index: linux-2.6.26-rc2-mm1/lib/idr.c
===================================================================
--- linux-2.6.26-rc2-mm1.orig/lib/idr.c	2008-05-29 13:09:01.000000000 +0200
+++ linux-2.6.26-rc2-mm1/lib/idr.c	2008-06-02 09:32:46.000000000 +0200
@@ -185,7 +185,6 @@ static int sub_alloc(struct idr *idp, in
 			new = get_from_free_list(idp);
 			if (!new)
 				return -1;
-			INIT_RCU_HEAD(&new->rcu_head);
 			rcu_assign_pointer(p->ary[m], new);
 			p->count++;
 		}
@@ -211,7 +210,6 @@ build_up:
 	if (unlikely(!p)) {
 		if (!(p = get_from_free_list(idp)))
 			return -1;
-		INIT_RCU_HEAD(&p->rcu_head);
 		layers = 1;
 	}
 	/*
@@ -239,7 +237,6 @@ build_up:
 		}
 		new->ary[0] = p;
 		new->count = 1;
-		INIT_RCU_HEAD(&new->rcu_head);
 		if (p->bitmap == IDR_FULL)
 			__set_bit(0, &new->bitmap);
 		p = new;

--

       reply	other threads:[~2008-06-03  6:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080603065633.480505000@bull.net>
2008-06-03  6:56 ` Nadia.Derbey [this message]
2008-06-03 12:17   ` [PATCH -mm1] Remove useless calls to INIT_RCU_HEAD in the idr code (was Scalability requirements for sysv ipc - v3) Paul E. McKenney

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=20080603065712.322118000@bull.net \
    --to=nadia.derbey@bull.net \
    --cc=akpm@linux-foundation.org \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lnxninja@linux.vnet.ibm.com \
    --cc=manfred@colorfullife.com \
    --cc=paulmck@linux.vnet.ibm.com \
    /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