From: Peter Zijlstra <peterz@infradead.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: rjw@rjwysocki.net, mingo@kernel.org,
"open list:CPUIDLE DRIVERS" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpuidle: Change ktime_get() with local_clock()
Date: Wed, 20 Apr 2016 14:58:37 +0200 [thread overview]
Message-ID: <20160420125837.GZ3430@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160420123011.GJ5862@linaro.org>
On Wed, Apr 20, 2016 at 02:30:11PM +0200, Daniel Lezcano wrote:
> On Wed, Apr 20, 2016 at 02:13:15PM +0200, Peter Zijlstra wrote:
> > On Thu, Apr 14, 2016 at 09:23:54PM +0200, Daniel Lezcano wrote:
> > > @@ -217,7 +217,11 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
> > > if (!cpuidle_state_is_coupled(drv, entered_state))
> > > local_irq_enable();
> > >
> > > - diff = ktime_to_us(ktime_sub(time_end, time_start));
> > > + /*
> > > + * local_clock() returns the time in nanosecond, let's shift
> > > + * by 10 (divide by 1024) to have microsecond based time.
> > > + */
> > > + diff = (time_end - time_start) >> 10;
> >
> > Changelog fails to explain the ramifications of this change...
>
> Sorry, I don't get the point of your comment. Do you mean I should elaborate
> the comment above in the changelog?
Yeah, why is /1024 good enough?
next prev parent reply other threads:[~2016-04-20 12:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 19:23 [PATCH] cpuidle: Change ktime_get() with local_clock() Daniel Lezcano
2016-04-14 19:23 ` Daniel Lezcano
2016-04-20 12:13 ` Peter Zijlstra
2016-04-20 12:30 ` Daniel Lezcano
2016-04-20 12:58 ` Peter Zijlstra [this message]
2016-04-20 16:47 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160420125837.GZ3430@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.