* Potential corner case in release 5.8
@ 2021-03-05 19:07 Ryan Sharpelletti
2021-04-06 17:53 ` Ryan Sharpelletti
0 siblings, 1 reply; 3+ messages in thread
From: Ryan Sharpelletti @ 2021-03-05 19:07 UTC (permalink / raw)
To: io-uring
Hi,
I suspect there is a corner case for io_uring in release 5.8.
Can you please explain where the associated mmdrop/kthread_unuse_mm
calls for io_sq_thread_acquire_mm in io_init_req(...) are?
Specifically, what would happen if there was an error after calling
io_sq_thread_acquire_mm (for example, the -EINVAL a few lines after)?
From what I can understand, it looks like the kthread_unuse_mm and
mmput might be handled in the call to io_sq_thread_acquire_mm in
io_sq_thread. However, I am not seeing where mmdrop might be called.
Thanks,
Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Potential corner case in release 5.8
2021-03-05 19:07 Potential corner case in release 5.8 Ryan Sharpelletti
@ 2021-04-06 17:53 ` Ryan Sharpelletti
2021-04-07 12:52 ` Pavel Begunkov
0 siblings, 1 reply; 3+ messages in thread
From: Ryan Sharpelletti @ 2021-04-06 17:53 UTC (permalink / raw)
To: io-uring; +Cc: axboe
Hi,
I am following up on the above, do you know where the associated
mmdrop might be called?
Thanks,
Ryan
On Fri, Mar 5, 2021 at 2:07 PM Ryan Sharpelletti
<[email protected]> wrote:
>
> Hi,
>
> I suspect there is a corner case for io_uring in release 5.8.
>
> Can you please explain where the associated mmdrop/kthread_unuse_mm
> calls for io_sq_thread_acquire_mm in io_init_req(...) are?
> Specifically, what would happen if there was an error after calling
> io_sq_thread_acquire_mm (for example, the -EINVAL a few lines after)?
>
> From what I can understand, it looks like the kthread_unuse_mm and
> mmput might be handled in the call to io_sq_thread_acquire_mm in
> io_sq_thread. However, I am not seeing where mmdrop might be called.
>
> Thanks,
> Ryan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Potential corner case in release 5.8
2021-04-06 17:53 ` Ryan Sharpelletti
@ 2021-04-07 12:52 ` Pavel Begunkov
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Begunkov @ 2021-04-07 12:52 UTC (permalink / raw)
To: Ryan Sharpelletti, io-uring; +Cc: axboe
On 06/04/2021 18:53, Ryan Sharpelletti wrote:
> On Fri, Mar 5, 2021 at 2:07 PM Ryan Sharpelletti
> <[email protected]> wrote:
>> I suspect there is a corner case for io_uring in release 5.8.
Did you see any fail?
>> Can you please explain where the associated mmdrop/kthread_unuse_mm
>> calls for io_sq_thread_acquire_mm in io_init_req(...) are?
Look for io_sq_thread_drop_mm(). acquire_mm shouldn't do anything
unless it's SQPOLL mode and so executed by sqpoll task.
>> Specifically, what would happen if there was an error after calling
>> io_sq_thread_acquire_mm (for example, the -EINVAL a few lines after)?
Will be cleaned by io_sq_thread().
>>
>> From what I can understand, it looks like the kthread_unuse_mm and
>> mmput might be handled in the call to io_sq_thread_acquire_mm in
>> io_sq_thread. However, I am not seeing where mmdrop might be called.
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-07 12:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-05 19:07 Potential corner case in release 5.8 Ryan Sharpelletti
2021-04-06 17:53 ` Ryan Sharpelletti
2021-04-07 12:52 ` Pavel Begunkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox