RE: 2.6.18.4: flush_workqueue calls mutex_lock in interruptenvironment
Trond Myklebust wrote on Friday, December 15, 2006 6:01 AM > Oops. Missed the fact that you are removed the put_ioctx from > aio_put_req, but the first sentence is still true. If you try to wake up > wait_for_all_aios before you've changed the condition it is waiting for, > then it may end up hanging forever. The easy fix to that is to put wake_up in aio_complete inside the ctx spin lock. > Why not fix this by having the context freed via an RCU callback? That > way you can protect the combined call to aio_put_req() + > wake_up(ctx->wait) using a simple preempt_off/preempt_on, and all is > good. That has been suggested before on a different subject. I will whip up something. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: 2.6.18.4: flush_workqueue calls mutex_lock in interruptenvironment
Trond Myklebust wrote on Friday, December 15, 2006 6:01 AM Oops. Missed the fact that you are removed the put_ioctx from aio_put_req, but the first sentence is still true. If you try to wake up wait_for_all_aios before you've changed the condition it is waiting for, then it may end up hanging forever. The easy fix to that is to put wake_up in aio_complete inside the ctx spin lock. Why not fix this by having the context freed via an RCU callback? That way you can protect the combined call to aio_put_req() + wake_up(ctx-wait) using a simple preempt_off/preempt_on, and all is good. That has been suggested before on a different subject. I will whip up something. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/