I don't like this one. DEFINE_WAIT allocates stuff on the stack.
And aio seems to allocate a lot more on the stack than normal io does.
How about the following instead:
int blk_congestion_wait_wq(int rw, long timeout, wait_queue_t *wait)
{
wait_queue_head_t *wqh = &congestion_wqh[rw];
blk_run_queues();
prepare_to_wait(wqh, wait, TASK_UNINTERRUPTIBLE);
if (!is_sync_wait(wait))
return -EIOCBRETRY;
io_schedule_timeout(timeout);
finish_wait(wqh, wait);
return 0;
}
void blk_congestion_wait(int rw, long timeout)
{
DEFINE_WAIT(wait);
blk_congestion_wait_wq(rw, timeout, &wait);
}
-- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk - 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/