Skip to contentSkip to conversation

Converting ia64 kernel unwinder to lock free code

DISCUSSION Keith Owens 2 participants 2 messages Oct 22, 2004

lore
Share & tools
lore
#0 lore raw

MCA and INIT events are not irq safe, they can interrupt the kernel at any point, including with spin_lock_irqsave() set. We currently call the ia64 kernel unwinder from MCA and INIT handlers, which has the potential to deadlock or to return invalid results. I want to convert the kernel unwinder to be lock free, so it can be called from any state. That means no locks, and no calls to kernel sevices that might deadlock, including printk and kmalloc.

Before I start on this task, are there any other plans for the kernel unwinder code? In the past davidm has hinted at replacing it with libunwind.

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Keith Owens

Keith> Before I start on this task, are there any other plans for Keith> the kernel unwinder code? In the past davidm has hinted at Keith> replacing it with libunwind.

I definitely want to do that. I'm not sure you can make it entirely lock-free with caching enabled, but libunwind already works such that if the lock is already taken, it bypasses the cache and hence doesn't need to acquire the lock.

	--david