public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>,
	David Wei <[email protected]>,
	[email protected]
Subject: Re: [PATCH v1 1/4] io_uring: only account cqring wait time as iowait if enabled for a ring
Date: Mon, 26 Feb 2024 08:22:18 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 2/26/24 7:56 AM, Pavel Begunkov wrote:
> On 2/25/24 21:11, Jens Axboe wrote:
>> On 2/25/24 9:43 AM, Jens Axboe wrote:
>>> If you are motivated, please dig into it. If not, I guess I will take a
>>> look this week.
> 
> I tried to split the atomic as mentioned, but I don't think anybody
> cares, it was 0.1% in perf, so wouldn't even be benchmarkeable,
> and it's iowait only patch anyway. If anything you'd need to read
> two vars every tick now, so nevermind

Agree, I did ponder that too, but seems not worth it at all.

>> The straight forward approach - add a nr_short_wait and ->in_short_wait
>> and ensure that the idle governor factors that in. Not sure how
>> palatable it is, would be nice fold iowait under this, but doesn't
>> really work with how we pass back the previous state.
> 
> It might look nicer if instead adding nr_short_waiters you'd
> do nr_iowait_account for the iowait% and leave nr_iowait
> for cpufreq.
> 
> The block iowaiting / io_schedule / etc. would need to set
> both flags...

That's what I meant with the nesting too, but then we need to return
flags from eg io_schedule_prepare(). Not a big issue as I think that's
the only spot, and we can even just keep the type the same. Callers
should treat it as a cookie/token anyway.

I'll make that change.

-- 
Jens Axboe


  reply	other threads:[~2024-02-26 15:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-24  5:07 [PATCH v1 1/4] io_uring: only account cqring wait time as iowait if enabled for a ring David Wei
2024-02-24  5:07 ` [PATCH v1 2/4] liburing: add examples/proxy to .gitignore David Wei
2024-02-24  5:07 ` [PATCH v1 3/4] liburing: add helper for IORING_REGISTER_IOWAIT David Wei
2024-02-24 15:29   ` Jens Axboe
2024-02-24 16:39     ` David Wei
2024-02-24  5:07 ` [PATCH v1 4/4] liburing: add unit test for io_uring_register_iowait() David Wei
2024-02-24 15:28 ` [PATCH v1 1/4] io_uring: only account cqring wait time as iowait if enabled for a ring Jens Axboe
2024-02-24 15:31 ` Pavel Begunkov
2024-02-24 17:20   ` David Wei
2024-02-24 18:55     ` Jens Axboe
2024-02-25  1:39       ` Pavel Begunkov
2024-02-25 16:43         ` Jens Axboe
2024-02-25 21:11           ` Jens Axboe
2024-02-25 21:33             ` Jens Axboe
2024-02-26 14:56             ` Pavel Begunkov
2024-02-26 15:22               ` Jens Axboe [this message]
2024-02-24 18:51   ` Jens Axboe
2024-02-25  0:58     ` Pavel Begunkov
2024-02-25 16:39       ` Jens Axboe
2024-03-05 14:59         ` Christian Loehle

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] \
    [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