Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2002 18:31:24 -0500
From:      Bosko Milekic <bmilekic@unixdaemons.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Jeff Roberson <jroberson@chesapeake.net>, arch@FreeBSD.ORG
Subject:   Re: Slab allocator
Message-ID:  <20020227183124.B62898@unixdaemons.com>
In-Reply-To: <200202272307.g1RN75T31581@apollo.backplane.com>; from dillon@apollo.backplane.com on Wed, Feb 27, 2002 at 03:07:05PM -0800
References:  <20020227172755.W59764-100000@mail.chesapeake.net> <200202272307.g1RN75T31581@apollo.backplane.com>

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

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




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