Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2001 14:53:54 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Josef Karthauser <joe@tao.org.uk>, Dag-Erling Smorgrav <des@ofug.org>, Jun Kuriyama <kuriyama@imgsrc.co.jp>, Julian Elischer <julian@FreeBSD.org>, current@FreeBSD.org, Julian Elischer <julian@elischer.org>
Subject:   Re: Problems with interrupts on -current.
Message-ID:  <XFMail.010921145354.jhb@FreeBSD.org>
In-Reply-To: <XFMail.010921120014.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 21-Sep-01 John Baldwin wrote:
> 
> On 21-Sep-01 Julian Elischer wrote:
>> I must say I'm worried, but stumped..
>> I cannot see this problem here, and I cannot think of a change in the 
>> KSE support stuff that would have this effect.
>> 
>> There was soem small change in the statistics gathering code that
>> is done at clock time, but nothing so low-level as to
>> effect the further generation of clock ticks.
>> 
>> It does sound as thuogh statclock has been stopped though.
> 
> Really bad things can happen if another interrupt comes in during statclock
> and
> causes a preemption.  In the preemptive kernel I had to wrap fast interrupt
> handlers in a critical section.  I'll see if I can't resurrect that.
> The problem is that during a fast interrupt handler, we don't acknowledge the
> interrupt until we return from the interrupt handler, so if we preempt it may
> be a while before we get back to the interrupted process so it can finish the
> interrupt handler and ack the interrupt in the PIC.

Bah, we leave interrupts disabled during fast interrupt handlers, so this
should be fine in -current since the softclock swi_sched() uses SWI_NOSWITCH
(there is no NOSWITCH flag in a preemptive kernel, it's automatic and that is
what bit the preemption kernel).

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010921145354.jhb>