Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755226Ab0BJLXb (ORCPT ); Wed, 10 Feb 2010 06:23:31 -0500 Received: from qw-out-2122.google.com ([74.125.92.27]:47229 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644Ab0BJLXa (ORCPT ); Wed, 10 Feb 2010 06:23:30 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QqcZ0Ns+GGOy7OtXeZbMo+hwy1/HZ4UhIbkFCg2tR1I7pbGPqoKa02ocITqtK4ykLi xZzjzxLmkvV1GDZjK2gCrWqwf4K4cD9pZpn3K3wccI/tG35ySC656UVUHEJ5lvBOOd6H EXwb9AyeMpTTslzR1xsCExqvThRdI770ARM5g= MIME-Version: 1.0 In-Reply-To: <1265799175.11509.271.camel@laptop> References: <20100208184504.GB5130@lenovo> <20100209041739.GA11280@elte.hu> <20100209223909.GE5068@lenovo> <1265796732.11509.260.camel@laptop> <1265799175.11509.271.camel@laptop> Date: Wed, 10 Feb 2010 14:23:27 +0300 Message-ID: Subject: Re: [RFC perf,x86] P4 PMU early draft From: Cyrill Gorcunov To: Peter Zijlstra Cc: Ingo Molnar , Stephane Eranian , Frederic Weisbecker , Don Zickus , LKML Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 35 On 2/10/10, Peter Zijlstra wrote: > On Wed, 2010-02-10 at 13:38 +0300, Cyrill Gorcunov wrote: >> > I'd try BUG_ON(cpu != smp_processor_id()) and scrap passing that cpu >> > thing around. >> > >> >> no, i need cpu to find out if event has migrated from other thread and >> then i switch >> some thread dependant flags in hw::config (ie escr and cccr), or i >> miss something and events in one cpu just can't migrate to another >> cpu? > > Well, if we validate that cpu == smp_processor_id() (looking at > kernel/perf_event.c that does indeed seem true for > hw_perf_group_sched_in() -- which suggests we should simply remove that > cpu argument), and that cpu will stay constant throughout the whole > callchain (it does, its a local variable), we can remove it and > substitute smp_processor_id(), right? > yeah, seems so! > As to migration of the event, its tied to a task, we're now installing > the event for a task it wouldn't make sense to allow that to be > preemptible. > > ok, thanks for explanation, Peter! I'll take a closer look as only get back from office. -- 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/