[PATCH] now < last_tick problem

From: Ian Wienand <ianw_at_gelato.unsw.edu.au>
Date: 2003-10-10 10:52:21
I started hitting this problem when using httperf, upon investigation
it seems to be easily triggered when you make gettimeofday() calls in
very close succession (just doing them in a tight loop easily
replicates the problem).
I think the problem is that in itc_get_offset() there is a race
between getting the now value and calculating the last_tick from
itm_next; if we are interrupted between the two itm_next will be set
after now.
Suggested patch attached; note the fsyscall implementation does not
appear to have this problem.
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Thu Oct 9 20:54:17 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST