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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36DF59CE26D8EE47B0655C516E9CE640286C694F@shsmsx102.ccr.corp.intel.com>
Date:	Mon, 22 Feb 2016 10:17:54 +0000
From:	"Chen, Yu C" <yu.c.chen@...el.com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
CC:	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Rafael Wysocki <rjw@...ysocki.net>,
	"Srinivas Pandruvada" <srinivas.pandruvada@...ux.intel.com>,
	Len Brown <lenb@...nel.org>
Subject: RE: [PATCH] intel-pstate: Update frequencies of policy->cpus only
 from ->set_policy()

Hi Kumar,
> -----Original Message-----
> From: linux-pm-owner@...r.kernel.org [mailto:linux-pm-
> owner@...r.kernel.org] On Behalf Of Viresh Kumar
> Sent: Monday, February 22, 2016 12:58 PM
> To: Rafael Wysocki; Srinivas Pandruvada; Len Brown; Viresh Kumar
> Cc: linaro-kernel@...ts.linaro.org; linux-pm@...r.kernel.org; Joonas Lahtinen;
> linux-kernel@...r.kernel.org
> Subject: [PATCH] intel-pstate: Update frequencies of policy->cpus only from
> ->set_policy()
> 
> The intel-pstate driver is using intel_pstate_hwp_set() from two separate
> paths, i.e. ->set_policy() callback and sysfs update path for the files present
> in /sys/devices/system/cpu/intel_pstate/ directory.
> 
> While an update to the sysfs path applies to all the CPUs being managed by
> the driver (which essentially means all the online CPUs), the update via the -
> >set_policy() callback applies to a smaller group of CPUs managed by the
> policy for which ->set_policy() is called.
> 
> And so, intel_pstate_hwp_set() should update frequencies of only the CPUs
> that are part of policy->cpus mask, while it is called from
> ->set_policy() callback.
> 
> In order to do that, add a parameter (cpumask) to intel_pstate_hwp_set()
> and apply the frequency changes only to the concerned CPUs.
> 
> For ->set_policy() path, we are only concerned about policy->cpus, and so
> policy->rwsem lock taken by the core prior to calling ->set_policy() is enough
> to take care of any races. The larger lock acquired by
> get_online_cpus() is required only for the updates to sysfs files.
> 
IIRC,
1.HWP is  hardwarely per-package, CPUs inside one package have one shared HWP.
2.Currently all the CPUs share the same HWP settings according to intel_pstate design.
3.  The policy is per-cpu in intel_pstate driver.(policy->cpus only contains one cpu)

So with this patch applied,  it is likely CPUs may have different HWP settings?
For example:
CPU 0 belongs to package A with policy 0, and CPU 1 belongs to package B with policy 1,
If you change the policy 0 from powersave to performance, then only CPU0 will update its
min/max freq in HWP, however we should also update CPU 2's min/max in HWP settings?
Plz correct me  if I'm wrong..

thanks,
yu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ