Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755775AbYFYTqv (ORCPT ); Wed, 25 Jun 2008 15:46:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754566AbYFYTql (ORCPT ); Wed, 25 Jun 2008 15:46:41 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:50481 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753856AbYFYTqk (ORCPT ); Wed, 25 Jun 2008 15:46:40 -0400 Date: Wed, 25 Jun 2008 15:46:37 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Oleg Nesterov cc: Thomas Gleixner , Arjan van de Ven , Heiko Carstens , Ingo Molnar , Peter Zijlstra , Andrew Morton , LKML Subject: Re: hrtimers: simplify lockdep handling Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 35 Hi Oleg, I'm currently porting -rt to 26-rc7 and I came across this change: Commit: 8e60e05fdc7344415fa69a3883b11f65db967b47 With the - double_spin_lock(&new_base->lock, &old_base->lock, - smp_processor_id() < cpu); + spin_lock(&new_base->lock); + spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); What's the reason that this is possible? Is it because the migration happens only on CPU hotplugging and that the CPU hotplugging code has locks that would prevent a reversal of the lock taking? I'm not arguing that the code is incorrect, but this looks like a subtlety that can bite us later. In other words, we really need comments around this code to explain to casual viewers why this code is not deadlock prone. The change log here and for 0d180406f2914aea3a78ddb880e2fe9ac78a9372 does not explain why the straight forward taking of the locks is OK. Thanks, -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/