Re: [PATCH v4 4/4] timekeeping: utilize the suspend-nonstopclocksource to count suspended time

From: Feng Tang
Date: Tue Mar 12 2013 - 19:11:15 EST


On Tue, Mar 12, 2013 at 02:09:08PM -0700, John Stultz wrote:
> On 03/11/2013 08:56 PM, Feng Tang wrote:
> }
> >- /* re-base the last cycle value */
> >- tk->clock->cycle_last = tk->clock->read(tk->clock);
> >+
> >+ if (suspendtime_found)
> >+ __timekeeping_inject_sleeptime(tk, &ts_delta);
> >+
> >+ /* Re-base the last cycle value */
> >+ clock->cycle_last = clock->read(clock);
> It seems like since we unconditionally read the clock above, this
> last line could be reworked to be:
> clock->cycle_last = cycle_now;
>
> Which would save re-reading the clocksource.
>
> If you don't have any objections I'll fold that small change into
> your patch.

No objection at all. Thanks!

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