Re: [ANNOUNCE] v5.14-rc4-rt4

From: Jens Axboe
Date: Wed Aug 04 2021 - 11:39:37 EST


On 8/4/21 9:33 AM, Sebastian Andrzej Siewior wrote:
> On 2021-08-04 08:23:55 [-0600], Jens Axboe wrote:
>> Totally untested, but I think the principle is sound. I'll run it through
>> some testing.
>
> This is needed:
>
> diff --git a/fs/io-wq.c b/fs/io-wq.c
> index 1192ee2abd982..77ec6896edaa5 100644
> --- a/fs/io-wq.c
> +++ b/fs/io-wq.c
> @@ -428,9 +428,9 @@ static struct io_wq_work *io_get_next_work(struct io_wqe *wqe)
> }
>
> if (stall_hash != -1U) {
> - raw_spin_unlock(&wqe->lock);
> + raw_spin_unlock_irq(&wqe->lock);
> io_wait_on_hash(wqe, stall_hash);
> - raw_spin_lock(&wqe->lock);
> + raw_spin_lock_irq(&wqe->lock);
> }
>
> return NULL;
>
>
> otherwise the spinlock_t lock in io_wait_on_hash() is acquired with
> disabled interrupts which is a no-no on -RT.
> With that it all looks good as far as I can tell.
> Thank you.

I'm confused, the waitqueue locks are always IRQ disabling.

--
Jens Axboe