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

From: Christian Brauner

Date: Wed Aug 12 2026 - 03:14:07 EST


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.

--