[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ff5d891-2120-475d-be8e-82bf20a8b7b7@kernel.dk>
Date: Tue, 2 Apr 2024 07:41:37 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Jiri Slaby <jirislaby@...nel.org>, Sasha Levin <sashal@...nel.org>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 6.8 015/715] io_uring: remove unconditional looping in
local task_work handling
On 4/2/24 2:12 AM, Jiri Slaby wrote:
> On 24. 03. 24, 23:23, Sasha Levin wrote:
>> From: Jens Axboe <axboe@...nel.dk>
>>
>> [ Upstream commit 9fe3eaea4a3530ca34a8d8ff00b1848c528789ca ]
>>
>> If we have a ton of notifications coming in, we can be looping in here
>> for a long time. This can be problematic for various reasons, mostly
>> because we can starve userspace. If the application is waiting on N
>> events, then only re-run if we need more events.
>
> This commit breaks test/recv-multishot.c from liburing:
> early error: res 4
> test stream=1 wait_each=0 recvmsg=0 early_error=0 defer=1 failed
>
> The behaviour is the same in 6.9-rc2 (which contains the commit too).
>
> Reverting the commit on the top of 6.8.2 makes it pass again.
>
> Should the test be updated or is the commit wrong?
The commit is fine, it's the test that is buggy. Sometimes test cases
make odd assumptions that are just wrong but happen to work, for some
definition of work. Eg it would work fine on an idle system, but not
necessarily if not. For this one, the fix is in liburing:
https://git.kernel.dk/cgit/liburing/commit/test/recv-multishot.c?id=a1d5e4b863a60af93d0cab9d4bbf578733337a90
--
Jens Axboe
Powered by blists - more mailing lists