On Sun, May 11, 2008 at 05:03:06AM -0600, Matthew Wilcox wrote:
[...]
This is exactly it. Or rather, it's even simpler. Three tasks
involved; A and B call xlog_state_get_iclog_space() and end up calling
psema(&log->l_flushsema) [down() by any other name -- the semaphore is
initialised to 0; it's really a completion]. Then task C calls
xlog_state_do_callback() which does:
while (flushcnt--)
vsema(&log->l_flushsema);
[vsema is AKA up()]
It assumes this wakes up both A and B ... but it won't with Ingo's code;
it'll wake up A twice.
So I deem my fix "proven by thought experiment". I haven't tried
booting it or anything.
--
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."
--