lkml.org 
[lkml]   [2006]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 11/13] s390: instruction processing damage handling.
Martin Schwidefsky wrote:
> On Fri, 2006-04-28 at 10:39 +0200, Heiko Carstens wrote:
>
>>>>+++ linux-2.6-patched/drivers/s390/s390mach.c 2006-04-24 16:47:28.000000000 +0200
>>>...
>>>>+#define MAX_IPD_TIME (5 * 60 * 100 * 1000) /* 5 minutes */
^^^^^^^^^^^^^^^^^^^^
Expression A

>>>I'm no s390 expert, but shouldn't the above use something like HZ?
>>
>>Using HZ here feels just wrong to me. MAX_IPD_TIME has nothing to do with the
>>timer frequency. In this case it's used to tell if there were 30 machine
>>checks within the last 5 minutes (in a usec granularity). It's just by
>>accident that this could be expressed using HZ.
>>(5 * 60 * USEC_PER_SEC) would probably look better...
^^^^^^^^^^^^^^^^^^^^^^^
Expression B

I'm no s390 expert either, but just wanted to point out that expression
B is 10 times larger than expression A, so something's fishy here.

> Using HZ would be wrong. The check that uses MAX_IPD_TIME compares it
> against the result of a get_clock() call. That uses the TOD Clock
> directly, there is no dependency on HZ.

Looking at include/asm-s390/timex.h:

#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */

makes me wonder if this should be:

#define MAX_IPD_TIME (5 * 60 * CLOCK_TICK_RATE) /* 5 minutes */

--
Paulo Marques - www.grupopie.com

Pointy-Haired Boss: I don't see anything that could stand in our way.
Dilbert: Sanity? Reality? The laws of physics?
-
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/

\
 
 \ /
  Last update: 2006-04-28 15:45    [W:0.032 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site