All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v4 0/7] Add support for epoll min_wait
@ 2022-12-01 18:11 Jens Axboe
  2022-12-01 18:11 ` [PATCH 1/7] eventpoll: cleanup branches around sleeping for events Jens Axboe
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jens Axboe @ 2022-12-01 18:11 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: soheil, willemdebruijn.kernel, stefanha

Hi,

tldr - we saw a 6-7% CPU reduction with this patch. See patch 6 for
full numbers.

This adds support for EPOLL_CTL_MIN_WAIT, which allows setting a minimum
time that epoll_wait() should wait for events on a given epoll context.
Some justification and numbers are in patch 6, patches 1-5 are really
just prep patches or cleanups, and patch 7 adds the API to set min_wait.

I've decided against adding a syscall for this due to the following
reasons:

1) We, Meta, don't need the syscall variant.
2) It's unclear how best to do a clean syscall interface for this. We're
   already out of arguments with the pwait/pwait2 variants.

With the splitting of the API into a separate patch, anyone who wishes
to have/use a syscall interface would be tasked with doing that
themselves.

No real changes in this release, just minor tweaks. Would appreciate
some review on this so we can get it moving forward. I obviously can't
start real deployments at Meta before I have the API upstream, or at
least queued for upstream. So we're currently stuck in limbo with this.

Also available here:

https://git.kernel.dk/cgit/linux-block/log/?h=epoll-min_ts

Since v3:
- Split the ctl addition into separate patch
- Gate setup of min_wait on !ewq.timed_out
- Add comment on calling ctl with wait == 0 is a no-op

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-01 18:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 18:11 [PATCHSET v4 0/7] Add support for epoll min_wait Jens Axboe
2022-12-01 18:11 ` [PATCH 1/7] eventpoll: cleanup branches around sleeping for events Jens Axboe
2022-12-01 18:11 ` [PATCH 2/7] eventpoll: don't pass in 'timed_out' to ep_busy_loop() Jens Axboe
2022-12-01 18:11 ` [PATCH 3/7] eventpoll: split out wait handling Jens Axboe
2022-12-01 18:11 ` [PATCH 4/7] eventpoll: move expires to epoll_wq Jens Axboe
2022-12-01 18:11 ` [PATCH 5/7] eventpoll: move file checking earlier for epoll_ctl() Jens Axboe
2022-12-01 18:11 ` [PATCH 6/7] eventpoll: add support for min-wait Jens Axboe
2022-12-01 18:11 ` [PATCH 7/7] eventpoll: add method for configuring minimum wait on epoll context Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.