From owner-freebsd-current Fri Sep 21 14:54:15 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail.wrs.com (unknown-1-11.windriver.com [147.11.1.11]) by hub.freebsd.org (Postfix) with ESMTP id 870C037B40B; Fri, 21 Sep 2001 14:54:12 -0700 (PDT) Received: from laptop.baldwin.cx ([147.11.46.201]) by mail.wrs.com (8.9.3/8.9.1) with ESMTP id OAA16441; Fri, 21 Sep 2001 14:54:07 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 21 Sep 2001 14:53:54 -0700 (PDT) From: John Baldwin To: John Baldwin Subject: Re: Problems with interrupts on -current. Cc: Josef Karthauser , Dag-Erling Smorgrav , Jun Kuriyama , Julian Elischer , current@FreeBSD.org, Julian Elischer Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 -- 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