On Fri, 9 Feb 2001, Alexander Leidinger wrote:

> On  9 Feb, Bruce Evans wrote:
> 
> > Pagefaults occur in copyin() (called from addupc_task() which is called
> > from ast()) while sched_lock is held.  This is not good.  Incrementing
> > the profiling counters is supposed to be pushed to ordinary process
> > context so that things like copyin() can work (they have to be able
> > to fault in pages, so they have to be able to sleep...), so using
> > sched_lock to lock things here is wrong.
> 
> Are we talking about /sys/kern/kern_clock.c: statclock()? I'm not

No :-).  ast() is in /sys/${MACHINE}/${MACHINE}/trap.c.  Incrementing
the profiling counters is much too hard to do in statclock(), since
statclock() is a fast interrupt handler, so statclock() only schedules
an AST to do the increment.  The scheduling of the AST is rather tangled
and pessimized to support optimizations that aren't possible while
statclock() is a fast interrupt handler.  See addupc_intr(), fuswintr(),
suswintr() and need_proftick().

Bruce



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

Reply via email to