From: Mel Gorman <mgorman@suse.de>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq
Date: Thu, 19 Nov 2020 07:45:39 +0000 [thread overview]
Message-ID: <20201119074539.GE3306@suse.de> (raw)
In-Reply-To: <20201119035230.45330-3-laoar.shao@gmail.com>
On Thu, Nov 19, 2020 at 11:52:28AM +0800, Yafang Shao wrote:
> The 'cfs_rq' in these helpers is only used to get the rq_clock, so we
> can pass the rq_clock directly. After that, these helpers can be used by
> all sched class.
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
This introduces overhead in the general case even when schedstats is
disabled. Previously, update_stats_wait_start was a static inline so
function call overhead was avoided and schedstat_enabled() meant the
overhead was negligible. As it's now a function call, the cost of the
function entry/exit will be unconditionally hit regardless of intrest
in schedstat.
Regardless of the merit of adding schedstats for RT, the overhead of
schedstats when stats are disabled should remain the same with the
static branch check done in an inline function.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2020-11-19 7:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 3:52 [RFC PATCH 0/4] sched: support schedstat for RT sched class Yafang Shao
2020-11-19 3:52 ` [RFC PATCH 1/4] sched: define task_of() as a common helper Yafang Shao
2020-11-19 3:52 ` [RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq Yafang Shao
2020-11-19 7:45 ` Mel Gorman [this message]
2020-11-19 11:24 ` Yafang Shao
2020-11-19 3:52 ` [RFC PATCH 3/4] sched: define update_stats_curr_start() as a common helper Yafang Shao
2020-11-19 3:52 ` [RFC PATCH 4/4] sched, rt: support schedstat for RT sched class Yafang Shao
2020-11-20 2:39 ` jun qian
2020-11-21 4:36 ` Yafang Shao
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=20201119074539.GE3306@suse.de \
--to=mgorman@suse.de \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/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