In message <[EMAIL PROTECTED]>, John Polstra writes:
>OK, adding the splhigh() around the body of microuptime seems to have
>solved the problem.  After 45 minutes of running the same test as
>before, I haven't gotten a single message.  If I get one later, I'll
>let you know.

Ok, so we know where the bogotism happens, now to identify it...

>I don't follow that.  As I read the code, the "current" timecounter
>is only advanced every second -- not every 1/HZ seconds.  Why should
>more of them be needed when HZ is large?

No, only if you have set tco_method to one, if tco_method is zero (default)
we update the timecounter every HZ.

>> You didn't say if you ran with standard NTIMECOUNTER right now,
>> but 5 would be awfully short time at HZ=10000: 500 usec...
>
>Well, microseconds aren't what they used to be ... :-) But isn't it
>true that the current timecounter only advances every second?  I think
>I have 5 seconds, not 5/HZ seconds.

Depends on your tco_method...

Could you try this combination:

        NTIMECOUNTER = HZ  (or even 5 * HZ)
        tco_method = 0
        no splhigh protection for microuptime() ?

The reason why tco_method=1 isn't nice is that we loose the ability to use
1/hz precision cached timestamps in the get*() funtions.

Btw, regarding the volatile thing:

If I do
        extern volatile struct timecounter *timecounter;

        microtime()
        {
                struct timecounter *tc;

                tc = timecounter;

The compiler complains about loosing the volatile thing.

How do I tell it that it is the contents of the "timecounter" pointer which
is volatile, but now what it points at ?  I don't want the "tc" pointer to
be volatile because it obviously isn't.  Do I really need to cast it ?

                tc = (struct timecounter *)timecounter;

That looks silly to me...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to