On Feb 21, 2007, at 12:08 AM, Matt Thomas wrote:Matt and I discussed this at length over lunch yesterday, and I am in full agreement with him on this. The way I see it, interrupt threads are an attempt at solving the synchronization problem from the wrong direction. Instead, I think the right approach is to fully split every driver into a "top half" (runs with thread context, possibly as a high-priority kernel thread) and "bottom half" (runs in interrupt context). Furthermore, I believe that the bottom half should manipulate state that is local only to the instance of the driver associated with the device that is interrupting (and have that state be spin-mutex protected). This approach would have a few advantages: 1- Simplicity. Interrupt dispatch would be largely as it is today. 2- Speed. Because the low-level interrupt dispatch code could be simple and avoid magic, it could be very fast, which would help devices that are particularly sensitive to interrupt latency. 3- Portability. Because the low-level interrupt dispatch would work basically like it does today, we know it will work on all of our extant platforms. I think there are some particularly nasty "gotchas" with interrupt-dispatch-as-continuation-or-thread that can be hard to fix on platforms like VAX (especially) or even SPARC and m68k. 4- Consistency. We already have this sort of model "sort of" today; consider serial drivers that have hard-interrupt handlers that run at extremely high priority to read data into a local ring buffer and then schedule a soft interrupt to do the TTY processing. What I'm looking for here is to formalize this for EVERY kind of device. This will make it easier to write drivers for NetBSD. We could even provide some API to help people write drivers that conform to the model. -- thorpej
| Karl Meyer | PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out" |
| David Miller | Slow DOWN, please!!! |
| Mark Fasheh | [PATCH 0/39] Ocfs2 updates for 2.6.28 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Shawn O. Pearce | Re: pack operation is thrashing my server |
| Pierre Habouzit | git send-email improvements |
| Matthieu Moy | git push to a non-bare repository |
| Shawn O. Pearce | libgit2 - a true git library |
| Elad Efrat | Integrating securelevel and kauth(9) |
| Hubert Feyrer | Re: Compressed vnd handling tested successfully |
| Lord Isildur | Re: Fork bomb protection patch |
| Matt Thomas | Re: FFS journal |
| Will Maier | cron doesn't run commands in /etc/crontab? |
| Richard Stallman | Real men don't attack straw men |
| Harald Dunkel | Re: Packet Filter: how to keep device names on hardware failure? |
| Jordi Espasa Clofent | Resolving dependencies with pkg_add |
| Question on swap as ramdisk partition | 1 hour ago | Linux kernel |
| Netfilter kernel module | 12 hours ago | Linux kernel |
| serial driver xmit problem | 14 hours ago | Linux kernel |
| Why Windows is better than Linux | 14 hours ago | Linux general |
| How can I see my kernel messages in vt12? | 21 hours ago | Linux kernel |
| Grub | 1 day ago | Linux general |
| vmalloc_fault handling in x86_64 | 1 day ago | Linux kernel |
| epoll_wait()ing on epoll FD | 1 day ago | Linux kernel |
| Framebuffer in x86_64 causes problems to multiseat | 1 day ago | Linux kernel |
| Difference between 2.4 and 2.6 regarding thread creation | 2 days ago | Linux general |
