[lkml]   [2002]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] multithreaded coredumps for elf exeecutables

IIRC there was an observation that spin_lock_irq seems to first disable
interrupts and then start spinning on the lock, which is why such a
situation could arise (even though the code in schedule doesn't appear to
explicitly disable interrupts).

However, in Mark's implementation, its only the first IPI that happens
under the runqueue lock, and that actually doesn't wait for the other CPUs
to receive the IPI. (The purpose of the first IPI was more a matter of
trying to improve accuracy by notifying the other threads as soon as
possible). So there shouldn't be a deadlock. The synchronization/wait
happens in the case of the second IPI (i.e. the smp_call_function), and by
that time the runqueue lock has been released, and cpus_allowed has been


Suparna Bhattacharya
Linux Technology Center
IBM Software Lab, India
E-mail :
Phone : 91-80-5044961

Mark Gross
< To: Alan Cox <>> cc: (Alan Cox), (Daniel Jacobowitz),
03/21/02 08:29 PM, (Pavel
Please respond to Machek),,
S Vamsikrishna/India/IBM@IBMIN, Richard J
Suparna Bhattacharya/India/IBM@IBMIN,,,,,
Subject: Re: [PATCH] multithreaded
coredumps for elf exeecutables

On Thursday 21 March 2002 12:34 pm, Alan Cox wrote:
> > This why I grabbed all those locks, and did the two sets of IPI's in
> > tcore patch.  Once the runqueue lock is grabbed, even if that process
> > the
> If you IPI holding a lock whats going to happen if while the IPI is going
> across the cpus the other processor tries to grab the runqueue lock and
> is spinning on it with interrupts off ?

Then the at least 2 CPU's would quickly become dead locked on the
synchronization IPI this patch sends at the end of the
function call.

Interrupts shouldn't be turned off when grabbing the runqueue lock. Its
a bad thing if they would happen to be off while calling into to schedule.

I think schedule was designed to be called only while interrupts are turned

on. It BUG's if "in_interrupt" to enforce this.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.055 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site