Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jul 2000 10:57:40 -0600
From:      Chuck Paterson <cp@bsdi.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Greg Lehey <grog@lemis.com>, David Greenman <dg@root.com>, freebsd-smp@freebsd.org
Subject:   Re: ipending (was: SMP progress (was: Stepping on Toes)) 
Message-ID:  <200007221657.KAA20309@berserker.bsdi.com>

next in thread | raw e-mail | index | archive | help
Greg,

	When I read you mail I didn't answer because what you said
sounded right. But, what was I thinking. The short answer is Matt
is correct.

	When running in APIC mode BSD/OS uses auto EIO for
the io APIC and counts on the level which gets set in the local
APIC to mask interrupts while the handler is running. The
local APIC gets and EIO when the handler is finished. If
the thread blocks then the interrupt get masked in hardware
if it is a level triggered and in all cases it gets EIO'd. Given
that you are just doing heavy weight interrupts this is the 
equivalent of blocking on an interrupt and you will always
need to mask at least level triggered interrupts and EIO them.

	Matt's comment about bunches of extra level triggered
interrupts being a problem is something that is going to have to
be looked into with BSD/OS. The reason we don't mask the interrupts
now is that doing the actual masking operation is soooo expensive.
I suspect we will want to mark which edge triggered interrupts
we which to mask.

Chuck


}
}    I think you still have to mask level interrupts, otherwise you won't
}    be able to sti.   Some subsystems may generate a phenominal number
}    of interrupts while the interrupt routine is running -- for example,
}    the serial ports.  I think the masking was put in there as an
}    optimization not only for that, but also so the interrupt could be
}    EOI'd early so as to allow a new interrupt to become pending while
}    the interrupt routine was running (thus closing a potential window of
}    opportunity where an interrupt might otherwise be missed).
}
}    If you remove the masking you have to delay the EOI and that is probably
}    a huge mistake because it may lead to lost interrupts.  Another example:
}    if a keyboard interrupt is lost you can lose the keyboard entirely.  If
}    the EOI is delayed there is a much greater chance of losing the keyboard
}    interrupt.
}
}					-Matt
}					Matthew Dillon 
}					<dillon@backplane.com>
}
}


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




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