All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: soheil@google.com, willemdebruijn.kernel@gmail.com, stefanha@redhat.com
Subject: [PATCHSET v4 0/7] Add support for epoll min_wait
Date: Thu,  1 Dec 2022 11:11:49 -0700	[thread overview]
Message-ID: <20221201181156.848373-1-axboe@kernel.dk> (raw)

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



             reply	other threads:[~2022-12-01 18:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 18:11 Jens Axboe [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221201181156.848373-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=soheil@google.com \
    --cc=stefanha@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.