LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: paulmck@linux.vnet.ibm.com
Subject: [PATCH 0/2] Make RCU lists use the RCU API
Date: Thu, 17 Jan 2008 21:46:24 +0100	[thread overview]
Message-ID: <478FBEA0.9090203@gmail.com> (raw)

Hi,

After reading the nice article contributed by Paul on LWN, I took a look
to the kernel RCU-protected list implementation to get a good idea on
how RCU protection mechanism can be used.

And it appears that the implementation doesn't use the RCU API as much
as it could: every updates of "->next" field could have been done by
using rcu_assign_pointer(), the main point being readability.

So this patchset does that. However when cooking the patch, I noticed
that it's hard to import RCU API without creating some circular
dependencies. This is mainly explained by the fact that list.h defines a
couple of very primitive types used all over the kernel.

The easiest thing I could come up with is to create a new header file
rculist.h, which keeps all RCU-protected list definitions. list.h still
keeps the basic list stuffs and still has very few dependencies. OTOH
RCU-protected list is a more complex type of list and can have more
dependencies. Therefore it needs more careful in including it.

I don't know if any header dependency rules exist for the kernel, so
please any suggestions are welcome to deal with such issue.

"make allyesconfig" builds and boots fine on x86 architecture, this
patchset being applied on top of Linus' v2.6.24-rc7 tag.

Please consider,

		Franck

--

 arch/ia64/sn/kernel/irq.c                       |    1 +
 drivers/infiniband/hw/ipath/ipath_verbs_mcast.c |    3 +-
 include/linux/dcache.h                          |    1 +
 include/linux/list.h                            |  385 ----------------------
 include/linux/rculist.h                         |  391 +++++++++++++++++++++++
 lib/textsearch.c                                |    2 +-
 6 files changed, 395 insertions(+), 388 deletions(-)

             reply	other threads:[~2008-01-17 20:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 20:46 Franck Bui-Huu [this message]
2008-01-17 20:47 ` [PATCH 1/2] Split list.h and move rcu-protected lists into rculist.h Franck Bui-Huu
2008-02-01 23:58   ` Andrew Morton
2008-02-02 13:32     ` Franck Bui-Huu
2008-02-02 19:15       ` Andrew Morton
2008-02-03  8:45         ` Franck Bui-Huu
2008-02-03  9:00           ` Andrew Morton
2008-02-03  9:11             ` Franck Bui-Huu
2008-01-17 20:48 ` [PATCH 2/2] rculist.h: use the rcu API Franck Bui-Huu
2008-01-18  5:55   ` 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=478FBEA0.9090203@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --subject='Re: [PATCH 0/2] Make RCU lists use the RCU API' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).