public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Subject: [PATCHSET 0/2] Reduce poll based overhead
Date: Wed, 16 Mar 2022 17:03:53 -0600	[thread overview]
Message-ID: <[email protected]> (raw)

Hi,

Networked workloads are intensive on the poll arming side, as most
receive operations will be triggered async by poll. For that kind
of poll triggering, we have allocated req->apoll dynamically and
that serves as our poll entry. This means that the poll->events
and poll->head are not part of the io_kiocb cachelines, and hence
often not hot in the completion path. When profiling workloads,
io_poll_check_events() shows up as hotter than it should be, exactly
because we have to pull in this cacheline separately.

Cache state in the io_kiocb itself instead, which avoids pulling
in unnecessary data in the poll task_work path. This reduces overhead
by about 3-4%.

-- 
Jens Axboe



             reply	other threads:[~2022-03-16 23:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 23:03 Jens Axboe [this message]
2022-03-16 23:03 ` [PATCH 1/2] io_uring: cache req->apoll->events in req->cflags Jens Axboe
2022-03-16 23:03 ` [PATCH 2/2] io_uring: cache poll/double-poll state with a request flag 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox