Neel Natu wrote:
> Author: neel
> Date: Thu May 27 01:27:25 2010
> New Revision: 208585
> URL: http://svn.freebsd.org/changeset/base/208585
> 
> Log:
>   Simplify clock interrupt handling on mips by using the new KPI - 
> timer1clock()
>   and timer2clock().
>   
>   Dynamically adjust the tick frequency depending on the value of 'hz'. Tested
>   with hz values of 100, 1000 and 2000.
> 
> Modified:
>   head/sys/mips/mips/tick.c

> -             if (profprocs != 0)
> -                     profclock(TRAPF_USERMODE(tf), tf->pc);
> -     }
> +     timer1clock(TRAPF_USERMODE(tf), tf->pc);
> +     timer2clock(TRAPF_USERMODE(tf), tf->pc);
>       critical_exit();
> -#if 0 /* TARGET_OCTEON */

You are not setting timer2hz, so timer2clock() will be emulated
automatically. It should not be called explicitly, or statclock() will
be called twice.

Also, as soon as you run timer1 on frequency higher then hz - it is
strange to see
        stathz = hz;
        profhz = hz;
there. It is just useless. Better would be to do same as for x86:
        profhz = timer1hz;
        if (timer1hz < 128)
                stathz = timer1hz;
        else
                stathz = timer1hz / (timer1hz / 128);

-- 
Alexander Motin
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to