aio_down() patch series -- cancellation support added
Add linux-kernel to the Cc list...
Quoted 16 lines · Benjamin LaHaise
Hello all,
The patch series at http://www.kvack.org/~bcrl/patches/aio-2.6.12-A1/
now adds support for cancellation of anaio_down()operation. The races should be correctly handled by introducing per-kiocb locking that serialises ->ki_cancel() and ->ki_retry(). The interesting patch additions are 40_lock_kiocb 50_aio_down_cancel.diff. Comments?-ben
Signature · 6 lines
"Time is what keeps everything from happening all at once." -- John Wheeler -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"[email protected]">[email protected]</a>
Signature · 1 line
"Time is what keeps everything from happening all at once." -- John Wheeler
Quoted 13 lines · Benjamin LaHaise
Add linux-kernel to the Cc list...
Quoted 10 lines · Benjamin LaHaise
Hello all,
The patch series at http://www.kvack.org/~bcrl/patches/aio-2.6.12-A1/
now adds support for cancellation of anaio_down()operation. The races should be correctly handled by introducing per-kiocb locking that serialises ->ki_cancel() and ->ki_retry(). The interesting patch additions are 40_lock_kiocb 50_aio_down_cancel.diff. Comments?-ben
One quick question.
Since lock_kiocb() may block, does that mean that the aio worker thread could be put to sleep while an iocb cancellation is in progress, even though there may be other iocbs/ioctx's to process ?
Looking at the rest a little more closely in terms of how everything will fit together, a few questions come to mind - need to think about it a little more. I guess the main reason you need the aio_down_wait callback is to make sure the semaphore is grabbed right in the context of the wakeup rather than at retry time, is that correct ?
Regards
Suparna
Signature · 3 lines
Suparna Bhattacharya ([email protected]) Linux Technology Center IBM Software Lab, India
Quoted 4 lines · Suparna Bhattacharya
One quick question.
Sincelock_kiocb()may block, does that mean that the aio worker thread could be put to sleep while an iocb cancellation is in progress, even though there may be other iocbs/ioctx's to process ?
It's mostly to deal with the case in the other direction: an iocb that is in the process of being cancelled somehow needs to block any retries from occurring. Likewise, if a retry was in progress, the cancellation needs to be blocked until that retry is complete. It should be sufficiently rare that it's not a problem, but we may have to revisit the issue as more cancel methods get written.
Quoted 5 lines
Looking at the rest a little more closely in terms of how everything will fit together, a few questions come to mind - need to think about it a little more. I guess the main reason you need the
aio_down_waitcallback is to make sure the semaphore is grabbed right in the context of the wakeup rather than at retry time, is that correct ?
Yes, that way the retry method is only called if it will make progress, and we will not have a thundering herd problem. I'm debugging the changes needed to implement async pipes using aio_down(), and the patch so far looks pretty straightforward.
-ben
Signature · 1 line
"Time is what keeps everything from happening all at once." -- John Wheeler