linux-mips
[Top] [All Lists]

Re: Tickless/dyntick kernel, highres timer and general time crapectomy

To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: Re: Tickless/dyntick kernel, highres timer and general time crapectomy
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Thu, 07 Jun 2007 17:43:17 +0400
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <cda58cb80706070611t3083f026p769e3e1beee1f11e@mail.gmail.com>
Organization: MontaVista Software Inc.
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070606185450.GA10511@linux-mips.org> <cda58cb80706070059k3765cbf6w7e8907a2f0d83e1d@mail.gmail.com> <20070607113032.GA26047@linux-mips.org> <cda58cb80706070611t3083f026p769e3e1beee1f11e@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.2) Gecko/20040803
Hello.

Franck Bui-Huu wrote:

Actually I'm wondering if we shouldn't create a new file
"arch/mips/kernel/time2.c" which will be a complete rewrite of the
old one (interrupt handler, function pointers, clocksource,
clockevent). This file would be the future replacement of the old
time.c. This new file would be used only if the board have been
updated accordingly. That may help to migrate...

   We've been there and done that -- for George Anzinger's HRT. :-)

Another issue I have is to implement clockevent set_mode() method. You
left it empty but I think we need at least to shut down the timer
interrupt when setting the clock event device. Strangely I haven't
found a "generic" way to stop them through cp0. Have I missed
something ?

You can mask the count/compare interrupt in the status register like any
other interrupt.  Keep in mind that on many CPUs this interrupt is
shared with the performance counter interrupt so cannot always be
disabled.

Well this interrupt could be shared with other devices too, couldn't it ?
If so only the board code can disable it.

There is no other disable bit for this interrupt than the IE bit in the
status register.  So it may just have to be ignored.

That would mean we can't have a tickless system in these cases, wouldn't
it ?

No, it doesn't. Even on dyntick kernels, interrupts do happen several times a second. Dynticks have nothing to do with disabling timer interrupts...

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>