lkml.org 
[lkml]   [2009]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:timers/core] x86: Do not unregister PIT clocksource on PIT oneshot setup/shutdown
On Sat, 22 Aug 2009 12:35:41 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> even after this fix, -tip testing found yet another circular locking
> bug, on a 32-bit Core2 laptop:

You got to love lockdep .. another ugly one:
clocksource_register: has clocksource_mutex, get cpu_add_remove_lock
native_cpu_up: has cpu_add_remove_lock, get clocksource_mutex

To register a clocksource the clocksource_mutex is acquired and if
necessary timekeeping_notify is called to install the clocksource as
the timekeeper clock. timekeeping_notify uses stop_machine which needs
to take cpu_add_remove_lock mutex.
Starting a new cpu is done with the cpu_add_remove_lock mutex held.
native_cpu_up checks the tsc of the new cpu and if the tsc is no good
clocksource_change_rating is called. Which needs the clocksource_mutex
and the deadlock is complete.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.



\
 
 \ /
  Last update: 2009-08-22 23:17    [W:0.650 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site