Messages in this thread | | | Date | Sun, 11 May 2008 07:26:36 -0600 | From | Matthew Wilcox <> | Subject | Re: [git pull] scheduler fixes |
| |
On Sun, May 11, 2008 at 07:02:26AM -0600, Matthew Wilcox wrote: > > + list_move_tail(&waiter->list, &sem->wait_list); > > Seems like extra cache line dirtying for no real gain over my solution.
Actually, let me just go into this a little further.
In principle, you'd think that we'd want to wake up all the tasks possible as soon as possible. In practice, Dave Chinner has said that the l_flushsema introduces a thundering herd (a few hundred tasks can build up behind it on systems such as Columbia apparently) that then run into a bottleneck as soon as they're unleashed.
Current XFS CVS has a fix from myself and Christoph that gets rid of the l_flushsema and replaces it with a staggered wakeup of each task that's waiting as the previously woken task clears the critical section.
Obviously, generic up() can't possibly do as well, but by staggering the release of tasks from __down_common(), we mitigate the herd somewhat.
-- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."
| |