Re: 2.2.9-ac2 locks solid

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 7 Jun 1999 10:53:57 +0100 (BST)


> Which holds the kernel lock and spins waiting for the other processor to
> acknowledge the TLB IPI. However, the other processor (in SMP) does:

Ok

> >>EIP: c0196b87 <stext_lock+f67/3e60>
> Trace: c0127e37 <try_to_free_pages+33/44>
> Trace: c0128683 <__get_free_pages+6b/1d0>
> Trace: c010b183 <handle_IRQ_event+5f/94>
> Trace: c0126818 <kmem_cache_grow+114/3b8>
> Trace: c0113c63 <do_edge_ioapic_IRQ+7f/b0>
> Trace: c0126c1a <kmem_cache_alloc+fa/170>
> Trace: c01156a0 <send_sig_info+1c0/2f8>
> Trace: c0115a8e <kill_something_info+10a/11c>
>
> Which spins on the kernel lock in do_try_to_free_pages() also. Thus, CPU
> #1 has the lock and wants the TLB IPI serviced but CPU #2 needs the lock to
> continue handling its current interrupt before it can handle the TLB IPI.

Unfortunately I can't see how handle_IRQ_event ever directly called
__get_free_pages. So I don't think the IRQ part of the trace is valid.

The rest however is rather obvious 8) _iff_ you are using rt signals.

kernel/signal.c: send_sig_info uses GFP_KERNEL from a bh.

Change

struct signal_queue *q = 0;

if (nr_queued_signals < max_queued_signals) {
q = (struct signal_queue *)
kmem_cache_alloc(signal_queue_cachep, GFP_KERNEL);
}

to use GFP_ATOMIC instead and let me know

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/