Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp473129imu; Tue, 27 Nov 2018 15:37:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/V3fQgxPI+PKAT75TPBLw26f8wgSz069sTR2guIkz5EevkhRSFFS9KCP/Re+6W3hnkqDqdm X-Received: by 2002:a62:6d84:: with SMTP id i126mr3125806pfc.109.1543361829374; Tue, 27 Nov 2018 15:37:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543361829; cv=none; d=google.com; s=arc-20160816; b=ifw8IIZG2MluNZtS5hAIi4QcO0t7Onu9R0GDdVU1RV9G5aXhRfgI5IYCZQT9EISiHZ wkkADIhukhK/fx2TLcTX6ZyPZqYwd7JUf3c6fjzCqXsufps9hE5mjaGrjj8NnRKR/FKO hbt9y50ngwoZYhHVL6nPHf/FnM8bxIfVekXXn+xpVXT2VoRh5znCltUp8g0XZ9m0wPIb M7BBj9L6iYRgFOVXxZ7tBjVTF0YQg78jJ0eleVTD1tN8hmPjUJ4g5CnZytD2KZyeKilJ 5yqfS6+151Y8ApYDH5JqnZeaZTUmD7ToAYYORJf6rDt9K63YrtolT3y6FHXVyJ9z2sKO Wt0g== 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; bh=zqAPE2f8HUNdgA5Z8FyuXXnRpmBBRzFZvcBhTdoi5r0=; b=euN1KdTTxOkcv2gJcMsSEFUwndCXN9BBEQ8okIfsL00U3O0AsiQgnz72yTACUR7m10 8fB/IPdT7+8zacWSylQlPcm3iCJP7MrLt1uZ5HbcTdX3x6qZA7VMqvSJUJ5aX68dsY4g rRGsU4JqgFVh1yCw5oNKqehAK1gO0pf+AJ/z6QyPV7ZAGe9gH/YeDJb3hQWLwlKFw3BK S16fRG/Ahr1mdn6/q1aGtlClSIe/AV+YD89memUIxgfg0szvTdmjGesfUVnXi2uHJaAi G6aHLaAnX8I1rOD2IlHKNYPdORw+68TSUW8YsoMk+qufwGlzkR79CFUzutYk1vodFdT/ 2nzQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si4978680pgs.94.2018.11.27.15.36.54; Tue, 27 Nov 2018 15:37:09 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbeK1Kfr (ORCPT + 99 others); Wed, 28 Nov 2018 05:35:47 -0500 Received: from mga18.intel.com ([134.134.136.126]:43762 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbeK1Kfr (ORCPT ); Wed, 28 Nov 2018 05:35:47 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2018 15:36:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,288,1539673200"; d="scan'208";a="116120835" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.126]) by fmsmga001.fm.intel.com with ESMTP; 27 Nov 2018 15:36:15 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 4B0D23011E3; Tue, 27 Nov 2018 15:36:15 -0800 (PST) Date: Tue, 27 Nov 2018 15:36:15 -0800 From: Andi Kleen To: Kyle Huey Cc: "Peter Zijlstra (Intel)" , Kan Liang , Ingo Molnar , Robert O'Callahan , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Stephane Eranian , Thomas Gleixner , Vince Weaver , acme@kernel.org, open list Subject: Re: [REGRESSION] x86, perf: counter freezing breaks rr Message-ID: <20181127233615.GY13936@tassilo.jf.intel.com> References: <20181120194129.GC13936@tassilo.jf.intel.com> <20181120201144.GD13936@tassilo.jf.intel.com> <20181120221642.GE2131@hirez.programming.kicks-ass.net> <20181120222549.GA2149@hirez.programming.kicks-ass.net> <20181120223854.GH13936@tassilo.jf.intel.com> <20181121081420.GF2131@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > It does seem that FREEZE_PERFMON_ON_PMI (misnamed as it is) is of > rather limited use (or even negative, in our case) to a counter that's > already restricted to ring 3. It's much faster. The PMI cost goes down dramatically. I still the the right fix is to add an perf event opt-out and let it be used by rr. V3 is without counter freezing. V4 is with counter freezing. The value is the average cost of the PMI handler. (lower is better) perf options ` V3(ns) V4(ns) delta -c 100000 1088 894 -18% -g -c 100000 1862 1646 -12% --call-graph lbr -c 100000 3649 3367 -8% --c.g. dwarf -c 100000 2248 1982 -12% -Andi