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:	Fri, 15 May 2015 08:34:18 +0200
From:	Heinrich Schuchardt <xypron.glpk@....de>
To:	Ruchi Kandoi <kandoiruchi@...gle.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Vladimir Davydov <vdavydov@...allels.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Kees Cook <keescook@...omium.org>,
	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
	Davidlohr Bueso <dave@...olabs.net>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/2] Adds cpu power accounting per-pid basis.

On 15.05.2015 02:12, Ruchi Kandoi wrote:
> These patches add a mechanism which will accurately caculate the CPU power
> used by all the processes in the system. In order to account for the power
> used by all the processes a data field "cpu_power" has been added in the
> task_struct.

Hello Ruchi,

could you, please, explain why the CPU power consumption per task
information is needed. Please, consider that the CPU causes only part of
the total system power consumption which also comprises GPU, cooling,
RAM, etc.

The patch series increases the memory size of the kernel, the memory
consumption per thread and the thread switching time. So, please,
introduce a configuration switch to enable/disable the function.

> This field adds power for both the system as well as user
> time. cpu_power contains the total amount of charge(in uAmsec units) used
> by the process.

Is there any reasonable way to assign the power consumption to a single
task if multiple tasks are executed on the same core at the same time
(e.g. using hyperthreading)?

> This model takes into account the frequency at which the
> process was running(i.e higher power for processes running at higher
> frequencies). It requires the cpufreq_stats module to be initialized with
> the current numbers for each of the CPU core at each frequency. This will
> be initialized during init time.

This does not account for power consumption depending on anything else
but frequency, e.g. floating point commands consuming more power than NOPs.

Best regards

Heinrich Schuchardt
> 
> Ruchi Kandoi (2):
>   cpufreq_stats: Adds sysfs file    
>     /sys/devices/system/cpu/cpufreq/current_in_state
>   sched: cpufreq: Adds a field cpu_power in the task_struct
> 
>  drivers/cpufreq/cpufreq_stats.c | 191 +++++++++++++++++++++++++++++++++++++++-
>  include/linux/cpufreq.h         |   8 ++
>  include/linux/sched.h           |   2 +
>  kernel/fork.c                   |   1 +
>  kernel/sched/cputime.c          |   7 ++
>  5 files changed, 207 insertions(+), 2 deletions(-)
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ