lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Jun 2018 14:06:20 +0100
From:   Quentin Perret <quentin.perret@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     rjw@...ysocki.net, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        mingo@...hat.com, dietmar.eggemann@....com,
        morten.rasmussen@....com, chris.redpath@....com,
        patrick.bellasi@....com, valentin.schneider@....com,
        vincent.guittot@...aro.org, thara.gopinath@...aro.org,
        viresh.kumar@...aro.org, tkjos@...gle.com, joelaf@...gle.com,
        smuckle@...gle.com, adharmap@...cinc.com, skannan@...cinc.com,
        pkondeti@...eaurora.org, juri.lelli@...hat.com,
        edubezval@...il.com, srinivas.pandruvada@...ux.intel.com,
        currojerez@...eup.net, javi.merino@...nel.org
Subject: Re: [RFC PATCH v3 04/10] PM / EM: Expose the Energy Model in sysfs

On Tuesday 19 Jun 2018 at 14:16:43 (+0200), Peter Zijlstra wrote:
> On Mon, May 21, 2018 at 03:24:59PM +0100, Quentin Perret wrote:
> > This exposes the Energy Model (read-only) of all frequency domains in
> > sysfs for convenience. To do so, a parent kobject is added to the CPU
> > subsystem under the umbrella of which a kobject for each frequency
> > domain is attached.
> > 
> > The resulting hierarchy is as follows for a platform with two frequency
> > domains for example:
> > 
> >    /sys/devices/system/cpu/energy_model
> >    ├── fd0
> >    │   ├── capacity
> >    │   ├── cpus
> >    │   ├── frequency
> >    │   └── power
> >    └── fd4
> >        ├── capacity
> >        ├── cpus
> >        ├── frequency
> >        └── power
> > 
> 
> Given that each FD can have multiple {freq,power} tuples and sysfs has a
> one value per file policy, how does this work?

This is meant to look a little bit like the sysfs entries of CPUFreq
policies, so you get something like this:

$ cat /sys/devices/system/cpu/energy_model/fd0/capacity 
133 250 351 428 462 
$ cat /sys/devices/system/cpu/energy_model/fd0/frequency 
533000 999000 1402000 1709000 1844000 
$ cat /sys/devices/system/cpu/energy_model/fd0/power 
28 70 124 187 245 
$ cat /sys/devices/system/cpu/energy_model/fd0/cpus
0-3


For example, CPUFreq exposes available governors and frequencies as:

$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors 
conservative ondemand userspace powersave performance schedutil

$ cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies 
533000 999000 1402000 1709000 1844000

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ