Nick Piggin wrote: > > > William Lee Irwin III wrote: > >> William Lee Irwin III wrote: >> >>>> It will get contention anyway if they're all pounding on the same >>>> futex. >>>> OTOH, if they're all threads in the same process, they can hit other >>>> problems. I'll try to find out more about hackbench. >>>> >> >> >> On Fri, Dec 12, 2003 at 12:30:07AM +1100, Nick Piggin wrote: >> >>> Oh, sorry I was talking about volanomark. hackbench AFAIK doesn't use >>> futexes at all, just pipes, and is not threaded at all, so it looks >>> like >>> a different problem to the volanomark one. >>> hackbench runs into trouble at large numbers of tasks too though. >>> >> >> Volano is all one process address space so it could be >> ->page_table_lock; >> any chance you could find which spin_lock() call the pounded chunk of >> the >> lock section jumps back to? >> >> > > OK its in futex_wait, up_read(¤t->mm->mmap_sem) right after > out_release_sem (line 517). > > So you get half points. Looks like its waiting on the bus rather than > spinning on a lock. Or am I'm wrong? > The following patch moves the rwsem's up_read wake ups out of the wait_lock. Wakeups need to aquire a runqueue lock which is probably getting contended. The following graph is a best of 3 runs average. http://www.kerneltrap.org/~npiggin/rwsem.png The part to look at is the tail. I need to do some more testing to see if its significant.