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] [day] [month] [year] [list]
Message-ID: <20190919172533.GS133864@google.com>
Date:   Thu, 19 Sep 2019 10:25:33 -0700
From:   Matthias Kaehlcke <mka@...omium.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Ingo Molnar <mingo@...hat.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH] devfreq: Add tracepoint for frequency changes


On Thu, Sep 19, 2019 at 12:35:59PM -0400, Steven Rostedt wrote:
> On Wed, 18 Sep 2019 12:15:37 -0700
> Matthias Kaehlcke <mka@...omium.org> wrote:
> 
> > Add a tracepoint for frequency changes of devfreq devices and
> > use it.
> > 
> > Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> > ---
> >  drivers/devfreq/devfreq.c      |  3 +++
> >  include/trace/events/devfreq.h | 18 ++++++++++++++++++
> >  2 files changed, 21 insertions(+)
> > 
> > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> > index ab22bf8a12d6..32de1f6ac776 100644
> > --- a/drivers/devfreq/devfreq.c
> > +++ b/drivers/devfreq/devfreq.c
> > @@ -317,6 +317,9 @@ static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq,
> >  
> >  	devfreq->previous_freq = new_freq;
> >  
> > +	if (new_freq != cur_freq)
> 
> I would make this:
> 
> 	if (trace_devfreq_frequency_enabled() && new_freq != cur_freq)
> 
> Because this would place the second check into the "nop" portion of the
> code, keeping the test from being performed if the devfreq_frequency
> trace point is not enabled. Slight micro optimization, but still enough
> to add it.

Sounds good to me, thanks for the review!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ