From owner-freebsd-alpha Sat Sep 23 10:28: 2 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from berserker.bsdi.com (berserker.twistedbit.com [199.79.183.1]) by hub.freebsd.org (Postfix) with ESMTP id 9E50B37B422; Sat, 23 Sep 2000 10:27:55 -0700 (PDT) Received: from berserker.bsdi.com (cp@[127.0.0.1]) by berserker.bsdi.com (8.9.3/8.9.3) with ESMTP id LAA17839; Sat, 23 Sep 2000 11:27:51 -0600 (MDT) Message-Id: <200009231727.LAA17839@berserker.bsdi.com> To: John Baldwin Cc: smp@freebsd.org, alpha@freebsd.org Subject: Re: Status update In-reply-to: Your message of "Sat, 23 Sep 2000 00:34:22 PDT." From: Chuck Paterson Date: Sat, 23 Sep 2000 11:27:51 -0600 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org John, } }- software interrupts (SWI's) are now MI except for a few constants. } Currently we still only have 8 SWI's on the x86 due to old compatability } nonsense. We should be able to bump this to 32 like it is on the alpha very } easily if it proves beneficial. Also software interrutps are completely } divorced from the x86 hardware interrupt code. The softinterrupt thread is } also now a simple kthread instead of an ithread. I guess I'm a little unclear about this. We certainly don't want any hardware goop with software interrupts, at least in the case where there is no hardware support of software interrupts, but it seems like we do want them to be more than just another kthread, we want to be able to schedule them on the fly like hardware interrupts and do light weight context switches to them. Am I missing something? }- The interrupt state of the sched_lock is now saved in a process's PCB during } cpu_switch(). This way, code before and after a call to either mi_switch() } or cpu_switch() is guaranteed to be run at the same interrupt state. Without } this I was having problems on the alpha where the idle loop was running at } ALPHA_PSL_IPL_SOFT (1) and as a result init's child process was never ran, } among other things. BSD/OS on Sparc actually has interrupt levels that are associated with some mutexs. However the code that uses these levels are always using spin locks so there isn't an issue. Whenever cpu_switch is called all interrupts are blocked, but the spl level, which it think is ~= interrupt state is not raised at all. On sparc these are use for the low level code in for devices like the com driver. I guess the first question is why there is any kernel code calling switch with the interrupt priority up. This sounds like it may be a result of software interrupts being changed into kthreads? If alpha has hardware support for software interrupts then we might be able to treat them fully like hardware interrupts. The case in BSD/OS where a software interrupt is scheduled and the no switch flag is passed in will just work, the reason for the no switch is because the thread currently holds spins locks, which in the case of hardware supported interrupts should be blocked anyway. Chuck Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message