| From | Sent On | Attachments |
|---|---|---|
| Warner Losh | Oct 23, 1999 11:08 pm | |
| Wes Peters | Oct 24, 1999 12:06 am | |
| Matthew Jacob | Oct 24, 1999 8:25 pm | |
| Nate Williams | Oct 25, 1999 9:46 am | |
| Warner Losh | Oct 25, 1999 11:22 am | |
| Nate Williams | Oct 25, 1999 11:27 am | |
| Warner Losh | Oct 25, 1999 11:40 am | |
| Warner Losh | Oct 25, 1999 11:50 am | |
| Matthew Jacob | Oct 25, 1999 11:52 am | |
| Nate Williams | Oct 25, 1999 11:57 am | |
| Nate Williams | Oct 25, 1999 12:02 pm | |
| Matthew Jacob | Oct 25, 1999 12:12 pm | |
| Nate Williams | Oct 25, 1999 12:14 pm | |
| Matthew Jacob | Oct 25, 1999 12:15 pm | |
| Nate Williams | Oct 25, 1999 12:20 pm | |
| Matthew Jacob | Oct 25, 1999 12:35 pm | |
| Warner Losh | Oct 25, 1999 12:46 pm | |
| Matthew Jacob | Oct 25, 1999 12:49 pm | |
| Terry Lambert | Oct 25, 1999 5:55 pm | |
| Terry Lambert | Oct 25, 1999 6:03 pm | |
| Nate Williams | Oct 25, 1999 6:04 pm | |
| Terry Lambert | Oct 25, 1999 6:09 pm | |
| Terry Lambert | Oct 25, 1999 6:12 pm | |
| Terry Lambert | Oct 25, 1999 7:20 pm | |
| Nate Williams | Oct 25, 1999 8:55 pm | |
| Wes Peters | Oct 25, 1999 9:54 pm | |
| Randell Jesup | Oct 26, 1999 4:13 am | |
| Nate Williams | Oct 26, 1999 8:24 am | |
| Randell Jesup | Oct 26, 1999 8:37 am | |
| Bill Fumerola | Oct 26, 1999 9:06 am | |
| Wes Peters | Oct 26, 1999 11:27 am | |
| Nate Williams | Oct 26, 1999 1:07 pm | |
| Wes Peters | Oct 26, 1999 1:08 pm | |
| Terry Lambert | Oct 26, 1999 6:40 pm | |
| Terry Lambert | Oct 26, 1999 6:48 pm | |
| Nate Williams | Oct 26, 1999 7:01 pm | |
| Nate Williams | Oct 26, 1999 7:03 pm | |
| Warner Losh | Oct 26, 1999 7:58 pm | |
| Christopher Masto | Oct 27, 1999 1:04 am | |
| Daniel O'Connor | Oct 27, 1999 1:11 am | |
| Warner Losh | Oct 27, 1999 9:27 am | |
| Nate Williams | Oct 27, 1999 10:03 am | |
| Warner Losh | Oct 27, 1999 10:11 am | |
| Wes Peters | Oct 27, 1999 10:16 am | |
| Nate Williams | Oct 27, 1999 10:17 am | |
| Warner Losh | Oct 27, 1999 10:20 am | |
| Nate Williams | Oct 27, 1999 10:32 am | |
| Warner Losh | Oct 27, 1999 10:39 am | |
| Wes Peters | Oct 27, 1999 10:48 am | |
| Christopher Masto | Oct 27, 1999 11:34 am | |
| Warner Losh | Oct 27, 1999 11:57 am | |
| Daniel O'Connor | Oct 27, 1999 5:33 pm | |
| Warner Losh | Oct 27, 1999 8:35 pm | |
| Daniel O'Connor | Oct 27, 1999 8:38 pm | |
| Wes Peters | Oct 28, 1999 1:23 pm | |
| Terry Lambert | Oct 29, 1999 9:56 am | |
| Nate Williams | Oct 29, 1999 11:51 am | |
| Terry Lambert | Oct 30, 1999 2:23 pm | |
| Terry Lambert | Oct 30, 1999 2:26 pm | |
| Nate Williams | Oct 30, 1999 3:09 pm | |
| Wes Peters | Oct 30, 1999 5:04 pm | |
| Warner Losh | Oct 30, 1999 10:31 pm | |
| Terry Lambert | Nov 1, 1999 12:11 pm | |
| Warner Losh | Nov 1, 1999 2:35 pm |
| Subject: | Re: Racing interrupts | |
|---|---|---|
| From: | Wes Peters (we...@softweyr.com) | |
| Date: | Oct 24, 1999 12:06:13 am | |
| List: | org.freebsd.freebsd-arch | |
Warner Losh wrote:
Consider the following situation. There is a driver talking to a device. An unmasked interrupt happens and the device is now gone. How does the driver know to stop what it is doing and respond to this disappearance in a sane way?
This sort of situation comes up in the pccard code. When someone ejects the card, an interrupt fires. If I were to remove the device from the tree in the interrupt handler, I can invalidate the softc that the driver is still using by freeing it. At that point the driver is running out of freed memory and all bets are off.
I can schedule a timeout to happen in 0 clock ticks so that it is then "safe" to remove the device, but the hardware is either gone or very close to being gone when the first interrupt happens, so we've moved the problem from memory corruption to a hardware hang.
It would be nice if there was some way to ref/unref the use of softc so I could remove the device right away, but defer the actual removal of the device and softc until the last deref of softc. This strikes me as a major PITA and may still result in a hardware hang.
It is my understanding that the pccard hardware still still exist for a period of time after the card is ejected (since it takes some period of time to move from the pins that caused the interrupt to the power/control/data pins being disabled). I don't know if this is true, or if true what the period of time is.
What I really want is a kernel signal mechanism which will start a rundown of the driver thread which is not allowed to touch hardware, but can only free resources used by the driver. We have lots of tight loops in drivers in the kernel and it seems unwise to pessimize those so that this race can be dealt with...
Comments?
This has recently been dealt with by the Linux group at Motorola, adding support for Compact PCI. I don't know if it's been incorporated into the Linux kernel yet, but I can find out. If not, I'm pretty certain I can get you a look at the code if it will be helpful at all.
-- "Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC we...@softweyr.com http://softweyr.com/
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message





