Re: [PATCH 05/18] Add io_uring IO interface
flat view
From: Jens Axboe <axboe@kernel.dk>
Date: 2019-01-29 01:01:22
Also in:
linux-block, linux-man
On 1/28/19 5:58 PM, Jann Horn wrote:
On Tue, Jan 29, 2019 at 1:55 AM Jens Axboe [off-list ref] wrote:quoted
On 1/28/19 5:34 PM, Jann Horn wrote:quoted
On Tue, Jan 29, 2019 at 1:32 AM Jens Axboe [off-list ref] wrote:quoted
On 1/28/19 5:03 PM, Jens Axboe wrote:quoted
quoted
But you only do that teardown on ->release, right? And ->release doesn't have much to do with the process lifetime.Yes, only on ->relase().OK, so I reworked the files struct to just grab it, then we ensure that doesn't go away. For mm, it's a bit more tricky. I think the best solution here is to add a fops->flush() and check for the process exiting its files. If it does, we quiesce the async contexts and prevent further use of that mm. We can't just keep holding a reference to the mm like we do with the files. That should solve both cases.You still have to hold a reference on the mm though, I think (for example, because two tasks might be sharing the fd table without sharing the mm).Yes good point, except we can't hold a reference to it.Why not? kvm_create_vm() does it, too: mmgrab(current->mm); kvm->mm = current->mm;
I missed that helper, was only looking at mmget(). But yeah, that'll do it! -- Jens Axboe -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>