[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c141101-035f-4ff6-a260-f31dca39fdc8@gmail.com>
Date: Tue, 22 Apr 2025 09:00:14 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Zhiwei Jiang <qq282012236@...il.com>, axboe@...nel.dk
Cc: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] io_uring: Add new functions to handle user fault
scenarios
On 4/22/25 04:01, Zhiwei Jiang wrote:
...
> I tracked the address that triggered the fault and the related function
> graph, as well as the wake-up side of the user fault, and discovered this
> : In the IOU worker, when fault in a user space page, this space is
> associated with a userfault but does not sleep. This is because during
> scheduling, the judgment in the IOU worker context leads to early return.
> Meanwhile, the listener on the userfaultfd user side never performs a COPY
> to respond, causing the page table entry to remain empty. However, due to
> the early return, it does not sleep and wait to be awakened as in a normal
> user fault, thus continuously faulting at the same address,so CPU loop.
>
> Therefore, I believe it is necessary to specifically handle user faults by
> setting a new flag to allow schedule function to continue in such cases,
> make sure the thread to sleep.Export the relevant functions and struct for
> user fault.
That's an interesting scenario. Not looking deeper into it, I don't see
any callers to set_userfault_flag_for_ioworker(), and so there is no one
to set IO_WORKER_F_FAULT. Is there a second patch patch I lost?
--
Pavel Begunkov
Powered by blists - more mailing lists