public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* max_clock of the patch "sched_clock: fix cpu_clock()"
@ 2008-09-16  3:01 Lin Ming
  2008-09-16  4:48 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Lin Ming @ 2008-09-16  3:01 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-kernel

Hi, Peter,

I have a question of the max_clock in below patch,
commit 354879bb977e06695993435745f06a0f6d39ce2b
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date:   Mon Aug 25 17:15:34 2008 +0200

    sched_clock: fix cpu_clock()

The original code to calculate min_clock and max_clock is,
min_clock = scd->tick_gtod + delta_jiffies * TICK_NSEC;
max_clock = min_clock + TICK_NSEC;

Now it's changed to,
min_clock = wrap_max(scd->tick_gtod, scd->clock);
max_clock = scd->tick_gtod + TICK_NSEC;

Is this max_clock still correct if, in a rare case, irq is disabled for
many ticks?

Thanks,
Lin Ming



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-16  4:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16  3:01 max_clock of the patch "sched_clock: fix cpu_clock()" Lin Ming
2008-09-16  4:48 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox