Mike Galbraith wrote: > On Sun, 2008-03-30 at 16:12 +0200, Manfred Spraul wrote: > >>Mike Galbraith wrote: >> >>>On Sat, 2008-03-22 at 20:08 +0100, Manfred Spraul wrote: >>> >>> >>> >>>>just the normal performance of 2.6.25-rc3 is abyssimal, 55 to 60% slower >>>>than 2.6.18.8: >>>> >>> >>>After manually reverting 3e148c79938aa39035669c1cfa3ff60722134535, >>>2.6.25.git scaled linearly >> >>We can't just revert that patch: with IDR, a global lock is mandatory :-( >>We must either revert the whole idea of using IDR or live with the >>reduced scalability. > > > Yeah, I looked at the problem, but didn't know what the heck to do about > it, so just grabbed my axe to verify/quantify. > > >>Actually, there are further bugs: the undo structures are not >>namespace-aware, thus semop with SEM_UNDO, unshare, create new array >>with same id, but more semaphores, another semop with SEM_UNDO will >>corrupt kernel memory :-( >>I'll try to clean up the bugs first, then I'll look at the scalability >>again. > > > Great! > > -Mike > > > > I could get better results with the following solution: wrote an RCU-based idr api (layers allocation is managed similarly to the radix-tree one) Using it in the ipc code makes me get rid of the read lock taken in ipc_lock() (the one introduced in 3e148c79938aa39035669c1cfa3ff60722134535). You'll find the results in attachment (kernel is 2.6.25-rc3-mm1). output.25_rc3_mm1.ref.8 --> pmsg output for the 2.6.25-rc3-mm1 plot.25_rc3_mm1.ref.8 --> previous file results for use by gnuplot output.25_rc3_mm1.ridr.8 --> pmsg output for the 2.6.25-rc3-mm1 + rcu-based idrs plot.25_rc3_mm1.ridr.8 --> previous file results for use by gnuplot I think I should be able to send a patch next week. It is presently an uggly code: I copied idr.c and idr.h into ridr.c and ridr.h to go fast, so didn't do any code factorization. Regards Nadia