From owner-freebsd-arch Wed Feb 27 15:31:38 2002 Delivered-To: freebsd-arch@freebsd.org Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by hub.freebsd.org (Postfix) with ESMTP id 0198737B417 for ; Wed, 27 Feb 2002 15:31:34 -0800 (PST) Received: from angelica.unixdaemons.com (bmilekic@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.2/8.12.1) with ESMTP id g1RNVOh4065953; Wed, 27 Feb 2002 18:31:24 -0500 (EST) Received: (from bmilekic@localhost) by angelica.unixdaemons.com (8.12.2/8.12.1/Submit) id g1RNVOdL065952; Wed, 27 Feb 2002 18:31:24 -0500 (EST) (envelope-from bmilekic) Date: Wed, 27 Feb 2002 18:31:24 -0500 From: Bosko Milekic To: Matthew Dillon Cc: Jeff Roberson , arch@FreeBSD.ORG Subject: Re: Slab allocator Message-ID: <20020227183124.B62898@unixdaemons.com> References: <20020227172755.W59764-100000@mail.chesapeake.net> <200202272307.g1RN75T31581@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200202272307.g1RN75T31581@apollo.backplane.com>; from dillon@apollo.backplane.com on Wed, Feb 27, 2002 at 03:07:05PM -0800 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 27, 2002 at 03:07:05PM -0800, Matthew Dillon wrote: > For SMPng I am confident that at the very least we will be able to > schedule ithreads even while in a critical section, as long as > sched_lock is not being held or is being held in a safe zone, > and we will probably be able to execute certain FAST interrupts > as well. So I would not worry too much about critical sections > blocking interrupts. They should be thought of as a mechanism > to prevent unexpected preemption or cpu migration and, insofar as > FAST interrupts do not usually call into other subsystems, to > prevent unexpected alterations of the per-cpu data. They should > not be thought of as a mechanism that blocks interrupts. Well, we're going to be doing context-stealing soon, don't forget about that. That means that if we're in a critical section, we won't be able to take advantage of stealing by taking the context and running the handler immediately. So, to schedule an ithread we will need to get some sort of sched_lock. Sure, perhaps it won't be _the_ sched_lock, but it will have to be some sort of lock for the run queue we will be placing our ithread on when not performing context stealing. Personally, I don't believe that having the fast-path allocation be a critical section. We're headed in the pre-emption path and disabling pre-emption every time I want to allocate something is pretty unreasonable [*]. [*] Yes, I know that you don't like pre-emption. > -Matt -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message