Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4779819imm; Mon, 18 Jun 2018 23:03:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK3MPKiFFjWOGfhfgwFNfTVxcPIwJj4ooExrnKSonPIRK60pIkZcIy4hAxMYiSrTZod3Fek X-Received: by 2002:a62:418b:: with SMTP id g11-v6mr16669805pfd.51.1529388235489; Mon, 18 Jun 2018 23:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529388235; cv=none; d=google.com; s=arc-20160816; b=GRD4775H9i1pcs8pRaMS5hrGQzJOTlnhvM66dCetSZVBDGqzMqLNqlM+UTn4FN1CwJ q6Gg75N2oI9ORwUIilChxtfWWOa2fLwQ3Cy3GMFqLOeWFah9CyMnWqcETOO9zhIembAQ CaZyzo8mKpDYlUx7ZpPGIZtdLNo/RNKBZL5EDK3LQ0sPNvnodksqvRLFcTJadWQ+yp9Y 5zwDM0GWrkrpo6qO6LvoObMnwp5XFSXL6nBkmnC1id5MTnpXXoypiPkqiIhqL8B+E6L1 vxiI5kAuw1bTkreG3SUs2o9F/Vzu5S+BqqavxgI7TbZWwIqr7tp8OF2EhmJu7Kcg+WOU ziZQ== 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:arc-authentication-results; bh=yW8t3fSr44Vw/eBxH2AGwX3xq46WUj/FUHcYLtCg4AU=; b=OB0JjoNh8YplxHhjvwva8AaklaaINnh4nktjdiYRpTWk0mtyqFKn7zKlabOfznoZHP 4IdIDUf+w+7A9Vyw9ZTVoADbnwr7+zJK2xVXdeHmdciehaHzY2Fq+sXxAEb8RxU75NeP cE6Y2hn19JGpn6BeoA3Jpn6IamrCykece2cFyCwywHMDEonixyO0Ne+U9KQyHdI6RscF rVcQbk+614FPuaFLLChxSQRz7iz3hpTGT03pU2xCpP84qbw7rlJVU8+cMf0HPIiIkzxh D48inpdSUZ8lRkSE4NmKj+XiUUiZrp2fj5MDUhS6bH6k056vvjIeHayueNbfguW/6+B3 4j2A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24-v6si17043501plo.489.2018.06.18.23.03.41; Mon, 18 Jun 2018 23:03:55 -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; 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 S937356AbeFSGBy (ORCPT + 99 others); Tue, 19 Jun 2018 02:01:54 -0400 Received: from foss.arm.com ([217.140.101.70]:42812 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937085AbeFSGBx (ORCPT ); Tue, 19 Jun 2018 02:01:53 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D933E1529; Mon, 18 Jun 2018 23:01:52 -0700 (PDT) Received: from salmiak (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D04063F25D; Mon, 18 Jun 2018 23:01:49 -0700 (PDT) Date: Tue, 19 Jun 2018 07:01:42 +0100 From: Mark Rutland To: "Jin, Yao" Cc: Peter Zijlstra , acme@kernel.org, jolsa@kernel.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, me@kylehuey.com, Linux-kernel@vger.kernel.org, vincent.weaver@maine.edu, will.deacon@arm.com, eranian@google.com, namhyung@kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping leaked kernel samples Message-ID: <20180619060142.62nppodwkauhnm5j@salmiak> References: <1529057003-2212-1-git-send-email-yao.jin@linux.intel.com> <1529057003-2212-2-git-send-email-yao.jin@linux.intel.com> <20180615113608.6m74sm7gpl5p6oqe@lakrids.cambridge.arm.com> <52c75f12-1f91-405d-0b05-0aa6a9c09306@linux.intel.com> <20180618104522.GI2458@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 19, 2018 at 09:39:02AM +0800, Jin, Yao wrote: > > > On 6/18/2018 6:45 PM, Peter Zijlstra wrote: > > On Mon, Jun 18, 2018 at 02:55:32PM +0800, Jin, Yao wrote: > > > Thanks for providing the patch. I understand this approach. > > > > > > In my opinion, the skid window is from counter overflow to interrupt > > > delivered. While if the skid window is too *big* (e.g. user -> kernel), it > > > should be not very useful. So personally, I'd prefer to drop the samples. > > > > I really don't get your insitence on dropping the sample. Dropping > > samples is bad. Furthermore, doing what Mark suggests actually improves > > the result by reducing the skid, if the event happened before we entered > > (as it damn well should) then the user regs, which point at the entry > > site, are a better approximation than our in-kernel set. > > > > So not only do you not loose the sample, you actually get a better > > sample. > > > > OK, that's fine, thanks! > > I guess Mark will post this patch, right? I'll try to spin something shortly -- I'm just figuring out how this should work with guest sampling. Thanks, Mark.