[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250905-abtun-nackt-dbd1f5accc55@brauner>
Date: Fri, 5 Sep 2025 15:52:40 +0200
From: Christian Brauner <brauner@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Nam Cao <namcao@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>, Xi Ruoyao <xry111@...111.site>,
Frederic Weisbecker <frederic@...nel.org>, Valentin Schneider <vschneid@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, John Ogness <john.ogness@...utronix.de>,
K Prateek Nayak <kprateek.nayak@....com>, Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev, linux-rt-users@...r.kernel.org, Joe Damato <jdamato@...tly.com>,
Martin Karsten <mkarsten@...terloo.ca>, Jens Axboe <axboe@...nel.dk>, stable@...r.kernel.org
Subject: Re: [PATCH v4 1/1] eventpoll: Replace rwlock with spinlock
On Wed, Sep 03, 2025 at 10:40:12AM +0200, Sebastian Andrzej Siewior wrote:
> On 2025-08-26 10:43:20 [+0200], Nam Cao wrote:
> > On Tue, Jul 15, 2025 at 02:46:34PM +0200, Nam Cao wrote:
> > > The ready event list of an epoll object is protected by read-write
> > > semaphore:
> > >
> > > - The consumer (waiter) acquires the write lock and takes items.
> > > - the producer (waker) takes the read lock and adds items.
> > >
> > > The point of this design is enabling epoll to scale well with large number
> > > of producers, as multiple producers can hold the read lock at the same
> > > time.
> > >
> > > Unfortunately, this implementation may cause scheduling priority inversion
> > > problem. Suppose the consumer has higher scheduling priority than the
> > > producer. The consumer needs to acquire the write lock, but may be blocked
> > > by the producer holding the read lock. Since read-write semaphore does not
> > > support priority-boosting for the readers (even with CONFIG_PREEMPT_RT=y),
> > > we have a case of priority inversion: a higher priority consumer is blocked
> > > by a lower priority producer. This problem was reported in [1].
> > >
> > > Furthermore, this could also cause stall problem, as described in [2].
> > >
> > > Fix this problem by replacing rwlock with spinlock.
> >
> > Hi Christian,
> >
> > May I know your plan with this patch? Are you still waiting for something?
> >
> > You may still understandably be paranoid about epoll due to the last
> > regression. But it's been weeks, and this patch is quite simple, so I start
> > to wonder if it is forgotten.
>
> A friendly reminder.
Sorry, this apparently fell through the cracks. Taken care of now!
Powered by blists - more mailing lists