All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fredy P." <fredy.pulido@savoirfairelinux.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Jan Beulich" <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] CPU frequency throttling based on the temperature
Date: Thu, 25 Jul 2019 10:27:47 -0400	[thread overview]
Message-ID: <ab479a6208d2776e0b3f609c534e54900ef0d9d2.camel@savoirfairelinux.com> (raw)
In-Reply-To: <20190725140744.cds7lzqrbozfj66y@Air-de-Roger>

-- 
Fredy Pulido,
Consultant en logiciel libre
Infrastructure, Infonuagique et architecture de systèmes
Savoir-faire Linux, Montréal, Qc
Bureau : (+ 1) 514 276-5468 p.410 

Message de confidentialité :
Ce courriel (de même que les fichiers joints) est strictement réservé à
l'usage de la personne ou de l'entité à qui il est adressé et peut
contenir de l'information privilégiée et confidentielle.
Toute divulgation, distribution ou copie de ce courriel est strictement
prohibée.
Si vous avez reçu ce courriel par erreur, veuillez nous en aviser sur-
le-champ, détruire toutes les copies et le supprimer de votre système
informatique.

On Thu, 2019-07-25 at 16:07 +0200, Roger Pau Monné wrote:
> On Thu, Jul 25, 2019 at 01:43:34PM +0000, Jan Beulich wrote:
> > On 25.07.2019 15:13, Roger Pau Monné  wrote:
> > > On Thu, Jul 25, 2019 at 12:54:46PM +0000, Jan Beulich wrote:
> > > > On 25.07.2019 14:44,  Fredy P.  wrote:
> > > > > On Wed, 2019-07-24 at 17:41 +0200, Roger Pau Monné wrote:
> > > > > > > > What hardware interface does thermald (or the driver in
> > > > > > > > Linux if
> > > > > > > > there's one) use to get the temperature data?
> > > > > 
> > > > > In our initial POC using Xen 4.8.x we where using Linux
> > > > > coretemp driver
> > > > > reading by example /class/sys/hwmon/hwmon0/temp3_input but it
> > > > > got
> > > > > deprecated at commit 72e038450d3d5de1a39f0cfa2d2b0f9b3d43c6c6
> > > > 
> > > > Hmm, I wouldn't call this deprecation, but a regression. I
> > > > would
> > > > say we want to re-expose this leaf to Dom0, the more that the
> > > > commit also only mentions unprivileged domains. Andrew?
> > > 
> > > AFAICT from the documents provided by Fredy the temperature is
> > > read
> > > from a MSR that reports the current temperature of the core on
> > > which
> > > the MSR is read from. When running on Xen this will only work
> > > correctly if dom0 is given the same vCPUs as pCPUs and those are
> > > identity pinned.
> > > 
> > > Not sure how common this MSR interface is in order to read
> > > thermal
> > > values, if the interface it's common maybe it's something that
> > > could
> > > be implemented in Xen, and exported somehow to dom0, maybe using
> > > sysctl?
> > > 
> > > Or else having an hypercall that allows dom0 to request Xen to
> > > execute
> > > MSR read/writes on a given pCPU.
> > 
> > This would look to require just a small extension to
> > XEN_RESOURCE_OP_MSR_READ. Question is whether the Linux driver
> > maintainers would accept a change using this Xen-specific
> > alternative access mechanism (in whatever shape).
> 
> Right, there's also the fact that all pCPUs should be reported in the
> thermal driver, while dom0 might have less vCPUs than pCPUs on the
> system.
> 
> Do you think you can take a look into this Fredy?

I think I can but will takes long, short history I'm "just a sysadmin
doing a security update" then I'll try to find if some one of the guys
that wrote low level code to help me with this.

> It will involve looking into the Linux driver in order to make use of
> an hypercall instead of a rdmsr. I think it should be fine to expose
> the CPUID leaf to dom0 as long as reads are performed from the
> hypercall, in order to assure that Linux gets consistent values.
> 
> Roger.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2019-07-25 14:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 14:01 [Xen-devel] CPU frequency throttling based on the temperature Fredy P.
2019-07-24 14:36 ` Roger Pau Monné
2019-07-24 14:47   ` Jan Beulich
2019-07-24 15:35     ` Roger Pau Monné
2019-07-24 15:51       ` Jan Beulich
2019-07-24 17:10       ` Fredy P.
2019-07-24 15:25   ` Fredy P.
2019-07-24 15:41     ` Roger Pau Monné
2019-07-25 12:44       ` Fredy P.
2019-07-25 12:54         ` Jan Beulich
2019-07-25 13:07           ` Fredy P.
2019-07-25 13:13           ` Roger Pau Monné
2019-07-25 13:29             ` Fredy P.
2019-07-25 13:47               ` Roger Pau Monné
2019-07-25 13:59                 ` Jan Beulich
2019-07-25 14:17                   ` Roger Pau Monné
2019-07-25 14:31                     ` Jan Beulich
2019-07-25 15:34                       ` Roger Pau Monné
2019-07-25 16:29                         ` Fredy P.
2019-07-25 13:43             ` Jan Beulich
2019-07-25 14:07               ` Roger Pau Monné
2019-07-25 14:27                 ` Fredy P. [this message]

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=ab479a6208d2776e0b3f609c534e54900ef0d9d2.camel@savoirfairelinux.com \
    --to=fredy.pulido@savoirfairelinux.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.