Skip to content

Scalability requirements for sysv ipc - v3

[email protected] lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 29 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Change the idr structureinclude/linux/idr.h+2 -02 replies
2/9Rename some of the idr APIs internal routineslib/idr.c+16 -152 replies
3/9Fix a printk calllib/idr.c+2 -12 replies
4/9Error checking factorizationinclude/linux/idr.h lib/idr.c+15 -211 reply
5/9Make idr_get_new* rcu-safelib/idr.c+12 -52 replies
6/9Make idr_find rcu-safeinclude/linux/idr.h lib/idr.c+22 -52 replies
7/9Make idr_remove rcu-safelib/idr.c+44 -158 replies
8/9Call idr_find() without locking in ipc_lock()ipc/util.c+0 -92 replies
9/9Get rid of ipc_lock_down()ipc/shm.c ipc/util.c ipc/util.h+4 -752 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchRik van RielTim PepperPaul E. McKenney
1/9A-b R-b
2/9A-b R-b
3/9A-b R-b
4/9A-b
5/9A-b R-b
6/9A-b R-b
7/9A-b R-b T-b R-b
8/9A-b A-b
9/9A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] Scalability requirements for sysv ipc - v3

After scalability problems have been detected when using the sysV ipcs, I have proposed to use an RCU based implementation of the IDR api instead (see threads http://lkml.org/lkml/2008/4/11/212 and
http://lkml.org/lkml/2008/4/29/295).

This resulted in many people asking to convert the idr API and make it rcu safe (because most of the code was duplicated and thus unmaintanable and unreviewable).

So here is a first attempt.

The important change wrt to the idr API itself is during idr removes:
idr layers are freed after a grace period, instead of being moved to the free list.

The important change wrt to ipcs, is that idr_find() can now be called locklessly inside a rcu read critical section.

Here are the results I've got for the pmsg test sent by Manfred:

2.6.25-rc3-mm1 2.6.25-rc3-mm1+ 2.6.25-mm1 Patched 2.6.25-mm1

1         1168441           1064021       876000               947488
2         1094264            921059      1549592              1730685
3         2082520           1738165      1694370              2324880
4         2079929           1695521       404553              2400408
5         2898758            406566       391283              3246580
6         2921417            261275       263249              3752148
7         3308761            126056       191742              4243142
8         3329456            100129       141722              4275780

1st column: stock 2.6.25-rc3-mm1
2nd column: 2.6.25-rc3-mm1 + ipc patches (store ipcs into idrs) 3nd column: stock 2.6.25-mm1
4th column: 2.6.25-mm1 + this pacth series.

I'll send a chart as an answer to this mail: don't know how to do that with quilt :-(

Reviewers are more than ever welcome!

Patches should be applied on linux-2.6.25-mm1, in the following order:

[ PATCH 01/09 ] : idr_add_rcu_head.patch
[ PATCH 02/09 ] : idr_rename_routines.patch
[ PATCH 03/09 ] : idr_fix_printk.patch
[ PATCH 04/09 ] : idr_rc_to_errno.patch
[ PATCH 05/09 ] : idr_get_new_rcu_safe.patch
[ PATCH 06/09 ] : idr_find_rcu_safe.patch
[ PATCH 07/09 ] : idr_remove_rcu_safe.patch
[ PATCH 08/09 ] : ipc_fix_ipc_lock.patch
[ PATCH 09/09 ] : remove_ipc_lock_down.patch

Patches 2, 3 and 4 do not introduce actual changes.

I won't be available before next Tuesday, so, please, don't be mad at me if I'm not answering fast enough.

Regards,
Nadia

--