Re: [PATCH] xtime_lock vs update_process_times

From: Paul Mundt
Date: Wed Feb 13 2008 - 21:32:22 EST


On Wed, Feb 13, 2008 at 09:33:16PM +0100, Peter Zijlstra wrote:
> Subject: xtime_lock vs update_process_times
> From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
>
> ( repost from: http://lkml.org/lkml/2008/1/28/101 )
>
> Commit: d3d74453c34f8fd87674a8cf5b8a327c68f22e99
> Subject: hrtimer: fixup the HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback
>
> Broke several archs, since only Russel bothered to merge the fix,
> and Greg to ACK his arch, I'm sending this for merger.
>
> I have confirmation that the Alpha bit results in a booting kernel.
> That leaves: blackfin, frv, sh and sparc untested.
>
> The deadlock in question was found by Russell:
>
> IRQ handle
> -> timer_tick() - xtime seqlock held for write
> -> update_process_times()
> -> run_local_timers()
> -> hrtimer_run_queues()
> -> hrtimer_get_softirq_time() - tries to get a read lock
>
> Now, Thomas assures me the fix is trivial, only do_timer() needs to be
> done under the xtime_lock, and update_process_times() can savely be removed
> from under it.
>
The SH bits also work fine. I've already merged that part in to my tree.
Thanks, Peter.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/