From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28763 invoked by alias); 24 Nov 2009 19:45:39 -0000 Received: (qmail 28754 invoked by uid 22791); 24 Nov 2009 19:45:39 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f228.google.com (HELO mail-ew0-f228.google.com) (209.85.219.228) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Nov 2009 19:45:34 +0000 Received: by ewy28 with SMTP id 28so3795616ewy.17 for ; Tue, 24 Nov 2009 11:45:31 -0800 (PST) Received: by 10.213.2.73 with SMTP id 9mr3241181ebi.21.1259091931224; Tue, 24 Nov 2009 11:45:31 -0800 (PST) Received: from nowhere (ADijon-552-1-123-3.w92-148.abo.wanadoo.fr [92.148.186.3]) by mx.google.com with ESMTPS id 15sm424254ewy.12.2009.11.24.11.45.27 (version=SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 11:45:29 -0800 (PST) Received: by nowhere (nbSMTP-1.00) for uid 1000 (using TLSv1/SSLv3 with cipher RC4-MD5 (128/128 bits)) fweisbec@gmail.com; Tue, 24 Nov 2009 20:45:30 +0100 (CET) Date: Tue, 24 Nov 2009 19:45:00 -0000 From: Frederic Weisbecker To: Masami Hiramatsu Cc: Ingo Molnar , Ananth N Mavinakayanahalli , lkml , systemtap , DLE , Jim Keniston , Srikar Dronamraju , Christoph Hellwig , Steven Rostedt , "H. Peter Anvin" , Anders Kaseorg , Tim Abbott , Andi Kleen , Jason Baron , Mathieu Desnoyers Subject: Re: [PATCH -tip v5 03/10] kprobes: Introduce kprobes jump optimization Message-ID: <20091124194524.GA5071@nowhere> References: <20091123232115.22071.71558.stgit@dhcp-100-2-132.bos.redhat.com> <20091123232141.22071.53317.stgit@dhcp-100-2-132.bos.redhat.com> <20091124024417.GA6752@nowhere> <4B0BFCF0.3060607@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B0BFCF0.3060607@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00673.txt.bz2 On Tue, Nov 24, 2009 at 10:34:08AM -0500, Masami Hiramatsu wrote: > > And this comment doesn't tell us much what this brings us. > > The changelog tells it stands to avoid a text_mutex deadlock. > > I'm not sure why we would deadlock without it. > > As Mathieu and I discussed on LKML (http://lkml.org/lkml/2009/11/21/187) > text_mutex will be locked on the way of cpu-hotplug. > Since kprobes locks text_mutex too and stop_machine() refers online_cpus, > it will cause a dead-lock. So, I decided to use get_online_cpus() to > locking hotplug while optimizing/unoptimizng. Ah ok :) Could you add a comment in the code that explains it? Thanks.