linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Psyborg <pozega.tomislav@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [RFC] why do sensors break CPU scaling
Date: Wed, 20 Nov 2019 21:42:12 +0100	[thread overview]
Message-ID: <CAKR_QVLJZPDfjbQ4CBDv62ok0qG4jq_M_Baq6eaot6GzrKMMwA@mail.gmail.com> (raw)

Hi

Recently I've needed to set lowest CPU scaling profile, running ubuntu
16.04.06 I used standard approach - echoing powersave to
/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor.
This did not work as the
/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq kept returning
max scaling freq.

During testing of ubuntu 19.10 I've found that the above approach
actually does work, but as long as there are no xsensors (or just
sensors from cli) being run.
cpuinfo_cur_freq in this case was returning variable values +- 1% of
around 1.4GHz.
As soon as I issue sensors command cpuinfo_cur_freq jumps to 3.5GHz
for a fraction of second and returns back to 1.4GHz afterwards. If
running xsensors it keeps bouncing between 1.4 and 3.5GHz all the
time.

Rebooted back to 16.04.6 and was able to set lowest CPU scaling freq
as well, but issuing sensors command here once just breaks CPU scaling
that now remains at about 3.5GHz.
It can be set to lowest scaling freq again without rebooting but it
needs to change scaling_governor for all cores to something else and
then back to powersave.

Why is this happening, shouldn't sensors command just read temp/fan
values without writing to any of the CPU control registers?

             reply	other threads:[~2019-11-20 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 20:42 Tom Psyborg [this message]
2019-11-21  1:51 ` [RFC] why do sensors break CPU scaling David Niklas
2019-11-23 13:44   ` Tom Psyborg
2020-01-31 22:35 ` Pavel Machek
2020-02-01  0:16   ` Tom Psyborg

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=CAKR_QVLJZPDfjbQ4CBDv62ok0qG4jq_M_Baq6eaot6GzrKMMwA@mail.gmail.com \
    --to=pozega.tomislav@gmail.com \
    --cc=linux-kernel@vger.kernel.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).