LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/2] Make RCU lists use the RCU API
@ 2008-01-17 20:46 Franck Bui-Huu
  2008-01-17 20:47 ` [PATCH 1/2] Split list.h and move rcu-protected lists into rculist.h Franck Bui-Huu
  2008-01-17 20:48 ` [PATCH 2/2] rculist.h: use the rcu API Franck Bui-Huu
  0 siblings, 2 replies; 10+ messages in thread
From: Franck Bui-Huu @ 2008-01-17 20:46 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: paulmck

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(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-03  9:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 20:46 [PATCH 0/2] Make RCU lists use the RCU API Franck Bui-Huu
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

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).