Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp550947img; Wed, 20 Mar 2019 06:15:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQlWqOZyNHeu7ZkXX39+1Xg2LJqfJ+3sqqBNEurg5f9cXmL6eOAAq1zWS5FKj9VzXO2gW6 X-Received: by 2002:a63:2bd5:: with SMTP id r204mr7454238pgr.48.1553087737633; Wed, 20 Mar 2019 06:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553087737; cv=none; d=google.com; s=arc-20160816; b=GUl3Z6oOWwU6cMTyk2/yEsEP/+QyMy48+QtA54ARlbFzfo5sgfnit0NsmCkiKBmzbm 03MQeQGPAhubLS3/KIvTP7UbY0Fq2rtWgACqLLJjUzTdWvyfTfp28NDOPrmUp4OF5iw7 aWACXuFxcfwEYK9W68Xhpff4yoTHhizaAcy9XPw+/gzh7UKdVAMjnwxCF7tREhZMmzRy 1PlE5ZsUZO2wHRXRMGMudcFdyQMsP7aDL1A8oUAwiRN7KPO5XVk+N+tJGlCZLMpekvia lc0RQqoKx4QRA4UNoD5LeOADO01n+1eJStoS2Dlz5gf/WZImjiNq6HOYw7wVQRdtXSoN IsYw== 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=0Y9UJzgLCZfKamuHvPKJ/dcF8diQvlm9dYrIZuFqaMQ=; b=aTYlq5bUJeN+Wv9OFibujft/r1h35hlHoBU77XHf3tlIBWyZmXbmOBKVuFCDMBJx6L T20GbWs1tNrS3wdLH1h0rhDv4DYymWuKdMWipaef3PJlAgvFBlcwUpO+l9xp+KYfVRFS 98vbFIw28y0XM3q80s7NleabSPvhiwY6P6Nn2hKxZT0LaLFR/6xcaXV5QYQQYUbc7Smn fbLG9sKoyDrZUiF9wtPOvy5+rKQVXl3vKFkbSNIcJ1fqKW9eQHZYPDpSdSMdMGCua2ED NYQNr2F9Di1YpzuCGV/rGMoYV3SsK4Nv8OaDOgmB/cOJVRXqGi5iI680jCyFIIlzfn3R EwBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YICuk7Zv; 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 u14si1623761pgh.561.2019.03.20.06.15.21; Wed, 20 Mar 2019 06:15:37 -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=YICuk7Zv; 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 S1727625AbfCTNOk (ORCPT + 99 others); Wed, 20 Mar 2019 09:14:40 -0400 Received: from merlin.infradead.org ([205.233.59.134]:50662 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfCTNOk (ORCPT ); Wed, 20 Mar 2019 09:14:40 -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=0Y9UJzgLCZfKamuHvPKJ/dcF8diQvlm9dYrIZuFqaMQ=; b=YICuk7Zveju1OZnRt7qLn+i2u JtrQ6jW7YsvAlfpy+hMD8iwn+t+GLrF/xhAd/7KsAIdTLygNS59njk4489XmSIITPfej9uloqShkY gw4C0mrjMFwxlwkGQVu6dOXuxxVldx9+HIuSMQ52dj+eK5buCSLJnSgo6DiSzN62T29tBQ1jsS0VE 2Nv0XlwUYuEPWWuGYMS7MyrQ4ddLq1rK8xr7jDMckbiIklZeYhf7m55A74QXoR13rBUJllUO3vdar vtx28CNHlB00aeim3GRwTR6Rx/RI6O6n42emrZOp9FXRHDP0eyKECt4D1rq/jt8dFqSgTx4T8hiMR xhBqfJqnA==; 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 1h6b3C-0002su-8s; Wed, 20 Mar 2019 13:14:34 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 094312391A9C7; Wed, 20 Mar 2019 14:14:33 +0100 (CET) Date: Wed, 20 Mar 2019 14:14:32 +0100 From: Peter Zijlstra To: Stephane Eranian Cc: Ingo Molnar , Jiri Olsa , LKML , tonyj@suse.com, nelson.dsouza@intel.com Subject: Re: [RFC][PATCH 4/8] perf/x86: Remove PERF_X86_EVENT_COMMITTED Message-ID: <20190320131432.GK6521@hirez.programming.kicks-ass.net> References: <20190314130113.919278615@infradead.org> <20190314130705.750219024@infradead.org> <20190319210018.GP5996@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190319210018.GP5996@hirez.programming.kicks-ass.net> 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 Tue, Mar 19, 2019 at 10:00:18PM +0100, Peter Zijlstra wrote: > On Tue, Mar 19, 2019 at 01:48:18PM -0700, Stephane Eranian wrote: > > On Thu, Mar 14, 2019 at 6:11 AM Peter Zijlstra wrote: > > > > > For x86_pmu_commit_txn(), cpuc->n_events is updated, but we can > > > trivially compute the desired value with cpuc->n_txn -- the number of > > > events added in this transaction. > > > > > I suggest you put this explanation in the code so that it is easier to > > understand. > > Right, I actually attempted writing that comment a few times but every > time it became a mess. I'll try again, because you're quite right, this > is a bit magical. Ha! I found the comment, it's in patch 8 :-)