From: Alan S. <st...@ro...> - 2006-05-08 18:34:57
|
On Mon, 8 May 2006, Jes Sorensen wrote: > > All right then. How do you feel about combining a global raw_notifier > > chain (for drivers interested in all tasks) that is protected by a > > "no-cache-bounce-for-readers" rw-semaphore together with a per-task > > raw_notifier chain that is protected by nothing (accessed only from within > > the task's context)? > > How do you anticipate that no-cache-bounce-for-readers? Whenever a > reader takes a semaphore they still have to go and update the semaphore, > when the next reader comes in on a different CPU that reader still has > to pull over the cacheline to update it. In a word: per-cpu reader counts. > This is why I keep pointing out > that rw locks are no better when it comes to cache impact! Per-cpu data structures were devised specifically to reduce or eliminate cache impact. > > The "no-cache-bounce" rw-sem, on the other hand, is a candidate for > > mainlining. We could see what Andrew Morton and others think about it. > > I am very curious how you expect to achieve this .... An initial implementation is attached. Let me know what you think of it. Alan Stern |