Re: [PATCH][2.5] hangcheck-timer

From: Joel Becker (Joel.Becker@oracle.com)
Date: Mon Jan 20 2003 - 21:00:16 EST


On Mon, Jan 20, 2003 at 05:42:16PM -0800, john stultz wrote:
> get_cycles() is a poor method for determining "real time".
> Please use do_gettimeofday().

        Does do_gettimeofday() exist on all platforms? Does it indeed
give actual wall clock time, instead of the inaccurate time jiffies can
give?

> I believe you mean "udelay for 60 micro-seconds"

        No, I mean 60 *seconds*. There have been drivers and such that
do pause the entire box that long.

> Wait, so 180 seconds is the margin of error?

        Yup, for the default. I'm not beholden to these specific
defaults. They're just the defaults we use in our environment.

> > + if (tsc_diff > hangcheck_tsc_margin) {
>
> but now we're using it to compare cycles! 180sec != 180 cycles

        Look at the calculations. I'm comparing cycles to cycles,
calculated from the original seconds.

> Additionally, this code doesn't take systems that have unsync'ed TSCs,
> or systems that change cpu frequency into account. Again, please use
> do_gettimeofday(). Then you can then talk about the values returned in
> secs and usecs, and I believe things will be much more clear.

        I'll look into it, but it must absolutely be in terms of wall
clock time as measured from outside the system.

Joel

-- 

Life's Little Instruction Book #99

"Think big thoughts, but relish small pleasures."

Joel Becker Senior Member of Technical Staff Oracle Corporation E-mail: joel.becker@oracle.com Phone: (650) 506-8127 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:25 EST