Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2002 20:07:40 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, dfr@nlsystems.com, current@FreeBSD.ORG
Subject:   Re: Patch for critical_enter()/critical_exit() & interrupt assembly revamp, please review!
Message-ID:  <15481.36444.52026.935742@grasshopper.cs.duke.edu>
In-Reply-To: <200202241912.g1OJCMx95238@apollo.backplane.com>
References:  <20020224131027.I31343-100000@gamplex.bde.org> <200202241912.g1OJCMx95238@apollo.backplane.com>

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

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..


Drew





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?15481.36444.52026.935742>