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:	Wed, 11 Feb 2009 10:30:29 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jason Baron <jbaron@...hat.com>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	"Frank Ch. Eigler" <fche@...hat.com>, linux-kernel@...r.kernel.org,
	Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>, lenb@...nel.org,
	Frédéric Weisbecker <fweisbec@...il.com>
Subject: Re: PATCH] ftrace: Add a C/P state tracer to help power
	optimization


* Jason Baron <jbaron@...hat.com> wrote:

> On Mon, Oct 27, 2008 at 02:06:30PM -0700, Arjan van de Ven wrote:
> > > Arjan van de Ven <arjan@...radead.org> writes:
> > > 
> > > > [...]
> > > > --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > > > +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > > > [...]
> > > > @@ -427,6 +429,8 @@ static int acpi_cpufreq_target(struct
> > > > cpufreq_policy *policy, }
> > > >  	}
> > > >  
> > > > +	trace_power_mark(&it, POWER_PSTATE, next_perf_state);
> > > > +
> > > >  	switch (data->cpu_feature) {
> > > >  	case SYSTEM_INTEL_MSR_CAPABLE:
> > > >  		cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
> > > > [...]
> > > 
> > > Is there some reason that this doesn't use tracepoints instead
> > > of such a single-backend hook?
> > 
> > because it's a ton simpler this way? do simple things simpe and all
> > that....
> > 
> 
> hi,
> 
> I wrote a patch to make c/p state tracer dependent on tracepoints and
> then realized that the discussion had already been had. However, the
> patch to use tracepoints is fairly simple, allows for other consumers,
> and avoids a function call in the off case. please consider.
> 
> thanks,
> 
> -Jason
> 
> Signed-off-by: Jason Baron <jbaron@...hat.com>
> 
> ---
> 
>  arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |    3 +++
>  arch/x86/kernel/process.c                  |    4 ++++
>  include/linux/ftrace.h                     |   15 ---------------
>  include/trace/power.h                      |   18 ++++++++++++++++++
>  kernel/trace/trace_power.c                 |   28 ++++++++++++++++++++--------
>  5 files changed, 45 insertions(+), 23 deletions(-)
>  create mode 100644 include/trace/power.h

Looks good, but could you please base this on latest -tip? There's a number of 
pending changes in the tracing tree that conflict:

patching file arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Hunk #1 FAILED at 34.
1 out of 2 hunks FAILED -- rejects in file 
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
patching file arch/x86/kernel/process.c
Hunk #1 FAILED at 9.
1 out of 2 hunks FAILED -- rejects in file arch/x86/kernel/process.c
patching file include/linux/ftrace.h
Hunk #1 FAILED at 342.
1 out of 1 hunk FAILED -- rejects in file include/linux/ftrace.h
The next patch would create the file include/trace/power.h,
which already exists!  Applying it anyway.
patching file include/trace/power.h
Patch attempted to create file include/trace/power.h, which already exists.
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- rejects in file include/trace/power.h
patching file kernel/trace/trace_power.c
Hunk #1 FAILED at 14.
Hunk #2 succeeded at 111 (offset 1 line).
Hunk #4 succeeded at 148 (offset -5 lines).
Hunk #5 succeeded at 183 (offset -6 lines).
1 out of 5 hunks FAILED -- rejects in file kernel/trace/trace_power.c

See:

  http://people.redhat.com/mingo/tip.git/README

	Ingo
--
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