[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29553ecc-3e5e-4c03-8dd0-0ea6fe88c32f@kernel.dk>
Date: Thu, 28 Sep 2023 02:41:20 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Matthew Wilcox <willy@...radead.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: Xiaobing Li <xiaobing.li@...sung.com>, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, bristot@...hat.com, vschneid@...hat.com,
asml.silence@...il.com, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, io-uring@...r.kernel.org,
kun.dou@...sung.com, peiwei.li@...sung.com, joshi.k@...sung.com,
kundan.kumar@...sung.com, wenwen.chen@...sung.com,
ruyi.zhang@...sung.com
Subject: Re: [PATCH 3/3] IO_URING: Statistics of the true utilization of sq
threads.
On 9/28/23 2:37 AM, Matthew Wilcox wrote:
> On Thu, Sep 28, 2023 at 10:01:14AM +0200, Peter Zijlstra wrote:
>> Now, I see what you're trying to do, but who actually uses this data?
>
> I ... don't. There seems to be the notion that since we're polling, that
> shouldn't count against the runtime of the thread. But the thread has
> chosen to poll! It is doing something! For one thing, it's preventing
> the CPU from entering an idle state. It seems absolutely fair to
> accuont this poll time to the runtime of the thread. Clearly i'm
> missing something.
For sure, it should be accounted as CPU time, as it is exactly that. You
could argue that if we needed to preempt this task for something else we
would do that (and the code does check that on every loop), but it's
still using CPU.
I can see maybe wanting to know how much of the total time the thread
spent doing ACTUAL work rather than just polling for new work, but
that's not really something the scheduler should be involved in and
should be purely an io_uring sqpoll stat of some sort if that is truly
interesting for an application.
--
Jens Axboe
Powered by blists - more mailing lists