kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: dakra137@gmail.com
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Hacking the schedutil governor to upshift to maximum clock rate at every process dispatch.
Date: Thu, 26 May 2022 10:20:16 -0400	[thread overview]
Message-ID: <1456834.1653574816@turing-police> (raw)
In-Reply-To: <CAK+J3FU84ZCiPked2+wX65-TeLRyjd1iafXh5AyT-=yxca8VUA@mail.gmail.com>

On Mon, 23 May 2022 17:37:09 +0300, David Kra said:

> I am considering modifying the scheduler and governor to get a jackrabbit
> start whenever a process is dispatched. Before learning how to, I would
> like some advice on whether to, and how much to do.

Step 0: gather actual data, and see if you will get any significant observable boost.

(If you don't know how to test if you will get any improvement,  you probably don't
know how to test for improvement after the patch is done.  So you may as well do
that part up front, unglamorous as it may be)

Hint:  powertop is your friend (or are the cool kids using something else this week?)

> * Is there a better way to achieve the same result?

It would probably be a lot easier to just set the CPU governor to "performance" mode.

> * Is this a dumb thing to do?
Probably, but it will depend on your use case.

> * Is it safe to rely on the existing code, firmware, and microcode to handle the
>  subsequent downclocking, and for my hack to only do the upclocking?

Well, you're just going to turn around and upclock it at the end of that process's
tiimeslice, so it's unclear what real benefit you'd get from downclocking.



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

           reply	other threads:[~2022-05-26 14:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAK+J3FU84ZCiPked2+wX65-TeLRyjd1iafXh5AyT-=yxca8VUA@mail.gmail.com>]

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=1456834.1653574816@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=dakra137@gmail.com \
    --cc=kernelnewbies@kernelnewbies.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 NNTP newsgroup(s).