Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp668697imm; Fri, 12 Oct 2018 04:56:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV617YCWAvaaeGRWOVMIqXpNnCu37dC2p40Fw4R/LMcLvcCOcwwJzUwPr1EMtYVH8elDjRzmW X-Received: by 2002:a63:cc51:: with SMTP id q17-v6mr5183681pgi.291.1539345399282; Fri, 12 Oct 2018 04:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539345399; cv=none; d=google.com; s=arc-20160816; b=ljk+JYtqigV0KgZwKYvDcCWfgNNfcJUUHITUila1VNurL+O7ZAU2TN/RkRTfoZFV9l ppkrrDszghU9TWE76bWyraVRwB2twjxdWbb2hbdYqCpg/Fq3OD7QijA9pnT2zNftPEwC OJNcDou6r0bg4kICPUgYqvnGndjN+rB4gFqgWyLcr1Ll1QUBNgFrzOH0GdV7YAYTmmfU tvywYhwh8P06b+T7QzM0zrgWgK8swVoD7/tF1MzlqcXKqGckJlihp+H4xoBceASrPBFi pJGJ4PwlMZbufl/T0wn5cMwSkNO2yIkkb4I/LU0iG32iYFfhiN3qS/vHYEBAfHrNNCEu yyZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9GbQBQh97a2ERQ2mi/oMoQYqXMC6ygxsYstHUdaTbus=; b=wk0kcmH44r5uyqdOOz+N43mxJBvywrGzWkXLi9/u7GodZPl0EmXhdHA75hKRs9l4bN ktkE8wO1ss7r9NpS8RzjfmePlRK8wHBayUvo+blZYQWSWJXCjgfCdXzEZDVS1J1JT39d 5xweYun9uVrw5dzycW4f2kHZw3axySfdxVkyAng+G9ltF8smhxwkEqMhc149uK6p74Gc vxigxBt3wLTp6GXDzdi578o4cWlWKIDzQ0dZHHRl5VxScSUUTg6gnst252IRRJueB0My BcoQjqsdf8+S/8gEUSykaB+3gb5K3QgRAIED0v5K43PEBmlSja/h4H3gh3IFl849wneq 6fkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=uJdlmoKe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi11-v6si1090633plb.62.2018.10.12.04.56.24; Fri, 12 Oct 2018 04:56:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=uJdlmoKe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728449AbeJLT0s (ORCPT + 99 others); Fri, 12 Oct 2018 15:26:48 -0400 Received: from merlin.infradead.org ([205.233.59.134]:33654 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbeJLT0s (ORCPT ); Fri, 12 Oct 2018 15:26:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9GbQBQh97a2ERQ2mi/oMoQYqXMC6ygxsYstHUdaTbus=; b=uJdlmoKeyCXrhxUWuL333djHr cFoF1UzE6DUNPlvgkUkUHKN0I8eN/Yur5fUBHU3EKWF/JveEsKcToR3Sox1Aa5DihwLgMilkYhUpg WAQuYyxHu8fQJ9lwT58tdvpGAeGxHDCfWo5IvA96AFoKgT4Bxuy3nDkt2Q6MTToZhae2ro+vdYO1v 5fXNpI5nn2lt5qayKxre+kVy/BHIgaVgwLJW1nd6jTzhS/NpKmqZC82qECq/Fda/MBcFq+4wKwSnD mrf4ZcRwPuFxafPrSoIPBN1vJRlFbUwkZEgLKRVrVcno6I3Ykh43GK9SAIimzymrg0hprPmDBkk3K fUIb1KS2g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAw1P-0000nV-8F; Fri, 12 Oct 2018 11:54:23 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8B1C520292D10; Fri, 12 Oct 2018 13:54:20 +0200 (CEST) Date: Fri, 12 Oct 2018 13:54:20 +0200 From: Peter Zijlstra To: Alexey Budankov Cc: Song Liu , Ingo Molnar , lkml , "acme@kernel.org" , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "eranian@google.com" , "tglx@linutronix.de" , "mark.rutland@arm.com" , "megha.dey@intel.com" , "frederic@kernel.org" Subject: Re: [RFC][PATCH] perf: Rewrite core context handling Message-ID: <20181012115420.GH9867@hirez.programming.kicks-ass.net> References: <20181010104559.GO5728@hirez.programming.kicks-ass.net> <20181011092913.GA9848@hirez.programming.kicks-ass.net> <162cce00-745c-6e30-f859-497d9307059d@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162cce00-745c-6e30-f859-497d9307059d@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 12, 2018 at 10:04:36AM +0300, Alexey Budankov wrote: > On 11.10.2018 12:29, Peter Zijlstra wrote: > > On Thu, Oct 11, 2018 at 07:50:23AM +0000, Song Liu wrote: > >> Or step back a little... I see two big changes: > >> > >> 1. struct perf_ctx_context is now per cpu (instead of per pmu per cpu); > >> 2. one perf_event_ctxp per task_struct (instead of 2). > > > > Correct, we reduce to 1 cpu context and 1 task context at all times. > > This in fact simplifies quite a bit of things. > > And what is currently missing is > some markup of the per cpu event list into per pmu sublists and > capability to rotate or not rotate the sublists independently, > right? Yes, that is what the new perf_event_pmu_context is. That tracks the per pmu sublist state.