Hi Matt, On Wed, Feb 21, 2007 at 12:08:36AM -0800, Matt Thomas wrote:Fair enough, but why so? I gave this a lot of thought too. As a general solution, I really don't like it because it is unnecessarily expensive, both in terms of execution time and (perhaps more importantly) the effort involved in converting all of our drivers to work this way. Conversely, the changes I have to handle interrupts using LWPs add 29 instructions to a typical interrupt chain on x86, to swap stack and curlwp. It works, and it's a solution that can just be "dropped in". To reiterate, there are two reasons I want to use LWPs to handle interrupts: signficantly cheaper locking primitives on MP systems, and the ability to eliminate the nasty deadlocks associated with interrupts/MP and interrupt priority levels. The intent is *not* to rely heavily on blocking as the main synchronization mechanism between the top and bottom halfs. That's why in the near term I want to preseve the SPL system for places where it really does matter. I did a lot of profiling to see where we would need to do this, and the network stack is once place. To add a bit of information about what I am proposing: the interrupt priority levels continue to exist, and map onto scheduling priorities. Interrupts at or below IPL_VM are provided with LWP context on execution, above that level things would work (for the most part) as they do now, with spinlocks being used to provide MP atomicity where needed. To contrast a bit with the FreeBSD implementation, since it has been said we are going to endure the same kind of performance degredation they have seen: interrupts involve a lengthy path through C code, after which (from my reading) a thread is scheduled to handle the interrupt, and the preempted thread yields the CPU via mi_switch(). That involves taking multiple locks along the way, touching lots of additional cache lines, making multiple context switches and so on. Cheers, Andrew
| David Newall | Re: Slow DOWN, please!!! |
| Renato S. Yamane | Error -71 on device descriptor read/all |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Shawn O. Pearce | libgit2 - a true git library |
| Martin Langhoff | Re: pack operation is thrashing my server |
| Aubrey Li | git proxy issue |
| Pierre Habouzit | git send-email improvements |
| Elad Efrat | Integrating securelevel and kauth(9) |
| Hubert Feyrer | Compressed vnd handling tested successfully |
| Matt Thomas | Interrupt, interrupt threads, continuations, and kernel lwps |
| Michael | Re: yamt-km branch |
| Richard Stallman | Real men don't attack straw men |
| Will Maier | cron doesn't run commands in /etc/crontab? |
| askthelist | Packets Per Second Limit? |
| Harald Dunkel | Packet Filter: how to keep device names on hardware failure? |
| Question on swap as ramdisk partition | 2 hours ago | Linux kernel |
| Netfilter kernel module | 12 hours ago | Linux kernel |
| serial driver xmit problem | 15 hours ago | Linux kernel |
| Why Windows is better than Linux | 15 hours ago | Linux general |
| How can I see my kernel messages in vt12? | 22 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 | 2 days ago | Linux kernel |
| Difference between 2.4 and 2.6 regarding thread creation | 2 days ago | Linux general |
