On Wed, Feb 21, 2007 at 09:48:25PM -0800, Bill Studenmund wrote:In that case, CPU2 would busy-wait until it gets the mutex. Blocking unconditionally would be expensive. In order to be able to release a mutex without using atomic instructions, we actually can't easily block while a running LWP holds it. They block in two cases: - the owner is not running on a CPU anywhere in the system - the owner is spinning on the kernel_lock; we yield to prevent deadlock In most cases blocking should be the exception to the rule, but there are situations where that kind of approach would kill us with context switching, so in the interim we still need to ability to do: s = splfoo(); mutex_enter(&foo_mutex); ... do something ... mutex_exit(&foo_mutex); splx(s); Longer term we need to deal with those kinds of concurrency problems on a case-by-case basis. The reader / writer locks always use blocking to synchronize, so they're not really useful for synchronization from an interrupt handler. At a minimum, you don't want to try and grab a write hold on the lock from an ISR; there could be lots of readers to drain out before it's acquired. Andrew
| 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 | 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 | 1 day ago | Linux kernel |
| Difference between 2.4 and 2.6 regarding thread creation | 2 days ago | Linux general |
