From: iso m <isomorphik.ibm@gmail.com>
To: kernelnewbies@kernelnewbies.org, vincent.guittot@linaro.org
Subject: Insight into Load, Runnable, and Utilization Averages in Linux Scheduler Code
Date: Sat, 16 Dec 2023 03:06:31 +0530 [thread overview]
Message-ID: <f32d199a-a490-40f0-86a1-f1a9ed71d53d@gmail.com> (raw)
Hello there,
Below snippet is taken from file: include/linux/sched.h
>/*
> * The load/runnable/util_avg accumulates an infinite geometric series
> * (see __update_load_avg_cfs_rq() in kernel/sched/pelt.c).
> *
> * [load_avg definition]
> *
> * load_avg = runnable% * scale_load_down(load)
> *
> * [runnable_avg definition]
> *
> * runnable_avg = runnable% * SCHED_CAPACITY_SCALE
> *
> * [util_avg definition]
> *
> * util_avg = running% * SCHED_CAPACITY_SCALE
> *
> * where runnable% is the time ratio that a sched_entity is runnable and
> * running% the time ratio that a sched_entity is running.
what's the denominator that's being considered here? Is it a period? or time
between two scheduler ticks?
> *
> * For cfs_rq, they are the aggregated values of all runnable and blocked
> * sched_entities.
> *
> * The load/runnable/util_avg doesn't directly factor frequency scaling and CPU
> * capacity scaling. The scaling is done through the rq_clock_pelt that is used
> * for computing those signals (see update_rq_clock_pelt())
> *
> * N.B., the above ratios (runnable% and running%) themselves are in the
> * range of [0, 1]. To do fixed point arithmetics, we therefore scale them
> * to as large a range as necessary. This is for example reflected by
> * util_avg's SCHED_CAPACITY_SCALE.
Thanks
Vishal
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
reply other threads:[~2023-12-15 21:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f32d199a-a490-40f0-86a1-f1a9ed71d53d@gmail.com \
--to=isomorphik.ibm@gmail.com \
--cc=kernelnewbies@kernelnewbies.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).