Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2002 11:46:42 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, John Baldwin <jhb@FreeBSD.ORG>, <current@FreeBSD.ORG>
Subject:   Re: Patch for critical_enter()/critical_exit() & interrupt assembly revamp, please review!
Message-ID:  <Pine.BSF.4.33.0202251143470.10062-100000@herring.nlsystems.com>
In-Reply-To: <15481.36444.52026.935742@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 24 Feb 2002, Andrew Gallatin wrote:

>
> I'm not fluent in x86 asm, so can you confirm for me what you're
> attempting to do here?
>
> I think you're making critical_enter()/critical_exit() cheaper by not
> actually messing with the interrupt hardware when they're called.
> Very much like what we do in 4-stable.
>
> Instead, you set/clear a per-cpu flag (or incr/decr a counter). If an
> interrupt comes in when you're inside a critical section, you make
> note of it & mask interrupts on that cpu.  In critical_exit(),
> you run the interrupt handler if there's a pending interrupt, and
> unmask interrupts.  If there's not a pending interrupt, you just clear
> the flag (or devrement a counter).
>
> Is that basically it?
>
> If so, I'm wondering if this is even possible on alpha, where we don't
> have direct access to the hardware.  However, according to the psuedo
> code for rti in the Brown book, munging with the saved PSL in
> trapframe to set the IPL should work.  Hmm..

I think we can tweak the saved PSL and it should be able to mask
interrupts in the same way as for x86. This should be quite easy for ia64
too.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160



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?Pine.BSF.4.33.0202251143470.10062-100000>