Re: [RFC PATCH RESEND] eventpoll: add lockless fast-path for eventfd

Christian Brauner <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <20260812-zitat-neueinstellung-ruckartig-727e55f45cc1@brauner>
Hi Siyuan,

> This PATCH introduces a lockless fast-path in ep_poll_callback() that
> avoids acquiring ep->lock when the target epitem is already owned by the
> ready-processing path (on rdllist or in a scan batch). The optimization
> is applied to eventfd-backed epitems only currently, but the mechanism
> is general and could be applied to other level-triggered files that opt
> in by setting FOP_EPOLL_LOCKLESS.

I think this is misguided. Not just the special-casing of eventfd but
also letting file operations opt-in how locking is done in another
subystem. That's almost guaranteed to wreak havoc... and sashiko is
already proving this.

--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.