On Wed, Apr 30, 2008 at 01:34:57PM +0200, Jens Axboe wrote:Good point!!! Here are some (probably totally broken) ideas: 1. Global lock so that only one smp_call_function() in the system proceeds. Additional calls would be spinning with irqs -enabled- on the lock, avoiding deadlock. Kind of defeats the purpose of your list, though... 2. Maintain a global mask of current targets of smp_call_function() CPUs. A given CPU may proceed if it is not a current target and if none of its target CPUs are already in the mask. This mask would be manipulated under a global lock. 3. As in #2 above, but use per-CPU counters. This allows the current CPU to proceed if it is not a target, but also allows concurrent smp_call_function()s to proceed even if their lists of target CPUs overlap. 4. #2 or #3, but where CPUs can proceed freely if their allocation succeeded. 5. If a given CPU is waiting for other CPUs to respond, it polls its own list (with irqs disabled), thus breaking the deadlock. This means that you cannot call smp_call_function() while holding a lock that might be acquired by the called function, but that is not a new prohibition -- the only safe way to hold such a lock is with irqs disabled, and you are not allowed to call the smp_call_function() with irqs disabled in the first place (right?). #5 might actually work... Thanx, Paul --
| Martin Bligh | Re: Unified tracing buffer |
| Ingo Molnar | [announce] "kill the Big Kernel Lock (BKL)" tree |
| Con Kolivas | [PATCH] [RFC] sched: accurate user accounting |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Krzysztof Oledzki | Error: an inet prefix is expected rather than "0/0". |
| Wenji Wu | A Linux TCP SACK Question |
| Ramachandra K | [PATCH 11/13] QLogic VNIC: Driver utility file - implements various utility macros |
| Jay Cliburn | Re: atl1 64-bit => 32-bit DMA borkage (reproducible, bisected) |
git: | |
| Andrew Morton | Untracked working tree files |
| Pierre Habouzit | Re: libgit2 - a true git library |
| Nicolas Vilz 'niv' | git + ssh + key authentication feature-request |
| Martin Langhoff | Re: pack operation is thrashing my server |
| Steve B | SSH brute force attacks no longer being caught by PF rule |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| rancor | How to copy/pipe console buffert to file? |
| Richard Stallman | Real men don't attack straw men |
| Question on swap as ramdisk partition | 14 minutes ago | Linux kernel |
| Netfilter kernel module | 10 hours ago | Linux kernel |
| serial driver xmit problem | 13 hours ago | Linux kernel |
| Why Windows is better than Linux | 13 hours ago | Linux general |
| How can I see my kernel messages in vt12? | 20 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 |
