From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754301Ab0KZPaT (ORCPT ); Fri, 26 Nov 2010 10:30:19 -0500 Received: from casper.infradead.org ([85.118.1.10]:51006 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752286Ab0KZPaS convert rfc822-to-8bit (ORCPT ); Fri, 26 Nov 2010 10:30:18 -0500 Subject: Re: [PATCH 3/4] perf-events: Add support for supplementary event registers v3 From: Peter Zijlstra To: Andi Kleen Cc: eranian@google.com, linux-kernel@vger.kernel.org, x86@kernel.org, Andi Kleen , Ingo Molnar In-Reply-To: <1290785313.2145.150.camel@laptop> References: <1290077254-12165-1-git-send-email-andi@firstfloor.org> <1290077254-12165-4-git-send-email-andi@firstfloor.org> <1290078779.2109.1341.camel@laptop> <20101118111630.GB12667@basil.fritz.box> <1290080774.2109.1378.camel@laptop> <1290785313.2145.150.camel@laptop> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Fri, 26 Nov 2010 16:30:24 +0100 Message-ID: <1290785424.2145.151.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2010-11-26 at 16:28 +0100, Peter Zijlstra wrote: > On Thu, 2010-11-18 at 12:46 +0100, Peter Zijlstra wrote: > > On Thu, 2010-11-18 at 12:16 +0100, Andi Kleen wrote: > > > > > > > > + * Runs later because per cpu allocations don't work early on. > > > > > + */ > > > > > +__initcall(init_intel_percore); > > > > > > > > I've got a patch moving the whole pmu init to early_initcall(), which is > > > > after mm_init() so it would actually work. > > > > > > So do you want to make this patchkit depend on that patch? > > > Or just integrate it and then change later? > > > > Doesn't really matter, I can fix it up afterwards, just wanted to let > > you know.. I can also flip that enable thing. > > > > I'll take these 4 patches and fixup these things and then see what falls > > out ;-) > > OK, that initcall patch hit -tip and Ingo wants that allocation stuff > fixed up before committing those patches. > > Could you run another version of these patches (you can ignore the > checkpatch output that results from the non-std struct initialization > layout)? > > Just make the allocation path like the AMD NB stuff, use the cpu_prepare > and cpu_dead hooks to alloc/free and add a refcount in the percpu > object. While looking at the AMD code, I think we can do away with amd_nb_lock, all the hotplug stuff is serialized on the hotplug mutex anyway.