Messages in this thread | | | Date | Wed, 13 Mar 2013 07:09:50 +0800 | From | Feng Tang <> | Subject | Re: [PATCH v4 4/4] timekeeping: utilize the suspend-nonstop clocksource to count suspended time |
| |
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
| |