From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbdESMGQ (ORCPT ); Fri, 19 May 2017 08:06:16 -0400 Received: from mga01.intel.com ([192.55.52.88]:36655 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbdESMGO (ORCPT ); Fri, 19 May 2017 08:06:14 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,363,1491289200"; d="scan'208";a="104154202" Subject: Re: [PATCH] perf/x86/intel: Drop kernel samples even though :u is specified To: Peter Zijlstra Cc: acme@kernel.org, jolsa@kernel.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Will Deacon , Mark Rutland References: <1495189152-5766-1-git-send-email-yao.jin@linux.intel.com> <20170519092905.yivnfjyhblm5wiap@hirez.programming.kicks-ass.net> From: "Jin, Yao" Message-ID: Date: Fri, 19 May 2017 20:06:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170519092905.yivnfjyhblm5wiap@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SNIP > I would much rather see this in generic code, somewhere around > __perf_event_overflow() I suppose. That would retain proper accounting > for the interrupt rate etc.. > > Also it would work for all architectures. Because I'm thinking more than > just x86 will suffer from skid. Yes, moving to generic code is better. Thanks for the suggestion! I will do that. > If you're really worried, I suppose you can put it behind a PERF_PMU_CAP > flag or something. I guess what you are suggesting is to add checking like: if (is_sampling_event(event)) { if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) { return; } } Is my understanding correct? Thanks Jin Yao