在 2010-01-21四的 11:57 +0800,Li Yi写道:
> On Wed, 2010-01-20 at 05:56 -0500, [email protected] wrote:
> 
> 
> > --- trunk/arch/blackfin/kernel/time-ts.c    2010-01-20 07:25:31 UTC (rev 
> > 8203)
> > +++ trunk/arch/blackfin/kernel/time-ts.c    2010-01-20 10:56:24 UTC (rev 
> > 8204)
> > @@ -21,6 +21,7 @@
> >  #include <asm/blackfin.h>
> >  #include <asm/time.h>
> >  #include <asm/gptimers.h>
> > +#include <asm/nmi.h>
> >  
> >  /* Accelerators for sched_clock()
> >   * convert from cycles(64bits) => nanoseconds (64bits)
> > @@ -313,6 +314,9 @@
> >  
> >     smp_mb();
> >     evt->event_handler(evt);
> > +
> > +   check_nmi_watchdog(cpu);
> > +
> >     return IRQ_HANDLED;
> >  }
> >  
> Is timer interrupt handler a good place to touch watchdog? In High
> resolution mode, timer irq may be triggered frequently (e.g, 0.1 ms),
> and check_nmi_watchdog() would be a heavy overhead.
I agree.

> 
> It seems the periodic tick handler (i.e, jiffies) is a better place, but
> I am not sure how to add it without changing common code.
Maybe need more investigation.

> 
> And, include/linux/nmi.h defines an API touch_nmi_watchdog(), it can be
> used by common code. I think check_nmi_watchdog() should be renamed to
> touch_nmi_watchdog()?
There is some difference in implementing nmi watchdog on bf561 compare
to x86.
On x86, the touch_nmi_watchdog() only set a per-cpu variable named
touched.
The nmi handler, do_nmi(), will periodical(5 sec) check this variable
and reset the watchdog.
On bf561, all above work is done by check_nmi_watchdog(). The do_nmi()
will never be called until there is a lockup.
Currently, the nmi handler need to save/restore all core registers, turn
off/on D-cache, (I-cache seems not necessary), so I think its a heavy
overhead.
If every one think its acceptable to do_nmi() every 5 seconds, I will
change this behavior.
-Graff
> 
> -Yi
> 
> 
> 
> 


_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to