Messages in this thread | | | Date | Wed, 10 Mar 2004 16:23:17 +1100 | From | Nick Piggin <> | Subject | Re: blk_congestion_wait racy? |
| |
Martin Schwidefsky wrote:
> > > >Hi Nick, > > >>Another problem is that if there are no requests anywhere in the system, >>sleepers in blk_congestion_wait will not get kicked. blk_congestion_wait >>could probably have blk_run_queues moved after prepare_to_wait, which >>might help. >> >I tried putting blk_run_queues after prepare_to_wait, it worked but it >didn't help. The test still needs close to a minute. > >
OK. This was *with* the memory barrier changes too, was it? Not that they should make that much difference. The test is still racy, but the window just gets smaller.
But I'm guessing that you have no requests in flight by the time blk_congestion_wait gets called, so nothing ever gets kicked.
I prefer something more like this model: if 'current' submits a request to a congested queue then it gets put on the congestion waitqueue. You can then run blk_congestion_wait afterwards and it won't block if the queue you've written to has come out of congestion at any time.
This also means that you can (should, in fact) stop uncongested queues from waking up the waiters every time they complete a request. Hmm, I like it.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |