Subject: Re: ppsratecheck(9)
To: Atsushi Onoe <onoe@sm.sony.co.jp>
From: None <itojun@iijlab.net>
List: tech-kern
Date: 07/07/2000 16:44:23
>The assumption which are made for optimization can cause the problem
>in the future.  I agree with you we should try to remove such assumptions
>in general, and should consider slow path alternative if such assumtion is
>necessary to improve performance.  Of course, this doesn't mean we should
>put diagnostics code everywhere.

	i don't think there will be that many calls to the function, anyway.

>In this case, if you think the counter never reach the max signed int,
>the wrap-around check should go #ifdef DIAGNOSTICS.  Otherwise, unsigned
>int seems to be better.

	okay, let's go with DIAGNOSTICS and int.

>I'm just curious why you use int instead of unsigned as a counter.

	i don't usually use unsigned variable for counters (unless there's
	other huge reason), to detect overflow cases better.  YMMV.

itojun