Received: by 10.223.176.5 with SMTP id f5csp1494235wra; Wed, 31 Jan 2018 07:16:17 -0800 (PST) X-Google-Smtp-Source: AH8x227R14Z01sS+QB6mdqkVNoj/92WN74m+IQIf67MACaCw48feKJKVCB6PeLeXzLXGDH45LWbb X-Received: by 10.99.125.74 with SMTP id m10mr27492203pgn.354.1517411777181; Wed, 31 Jan 2018 07:16:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517411777; cv=none; d=google.com; s=arc-20160816; b=0zcWpSpCkIC8be48IYdlmHskf9ZheXwz0vCLUIrRdiAAZfwnHKxbMFZwp7B+BCAct5 XL0m85X8JZ5/MqafxO0CxELGX9mU7tdeiKH6aFMtE8yTIAp3xgAuaKK/3bFfTo6By1T9 xeZeO0+b7+FhiG9dON6eMTC1gSDvoryVByFQcJsgJoHuJvjt6xB82r6JU6l5y9wNrmhM tdWJPZdsPIIfkplwt0ZoeDw05TqEo8KClJDHffkKsU6U4M8a26dAKUdLIfCK6batNV3m D4W4dKC9UM0VfwcSmS9MisQr3gdyXG54SadCwDfu7PAtW3L7dPkjGJ6rSN5oH2bZ3PF8 4pMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=mNiDGIP2oumEMCAvv15eqqCg1rdpykNzIB6mLXUFnWA=; b=z5wATKWy2c50D+3eG+3DSGqCtCZV+oLnyHVUcmNqU0dn1Vam1NW5KzgE0opgty6ihy TtB9FR8q8qcd/9MnMsgzyqtEcF9GXkCVyHEPJ3T1BUjy8UEvTVdZE17CRVc0Z7BGqJIT FYTWDTO6Bgj8RrBOUYnWon+BMN48l0qM2NbEHNO9Wp9sXdtgk801dyBwrH+XKhuZY/bt nVktuiQcWx7kyfeNHPjvdjbqSQ09p+6Pt5IpuwbMffidIJ5O3mXVCjBo5ORn82MV1Iqs aL/w1qYdtIyStN+v0Qr8yu+KWEIah4+XtljwYPqbJdw5e7aUpWnrT5sW2EX8BDcVcW/D Y4Zg== 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 q14si2259659pfh.17.2018.01.31.07.16.01; Wed, 31 Jan 2018 07:16:17 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbeAaPPh (ORCPT + 99 others); Wed, 31 Jan 2018 10:15:37 -0500 Received: from mga18.intel.com ([134.134.136.126]:7443 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751447AbeAaPPg (ORCPT ); Wed, 31 Jan 2018 10:15:36 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 07:15:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,440,1511856000"; d="scan'208";a="14856906" Received: from linux.intel.com ([10.54.29.200]) by orsmga006.jf.intel.com with ESMTP; 31 Jan 2018 07:15:35 -0800 Received: from [10.252.199.6] (unknown [10.252.199.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 812D45801AC; Wed, 31 Jan 2018 07:15:34 -0800 (PST) Subject: Re: [PATCH V3 0/5] bugs fix for large PEBS mmap read and rdpmc read To: Jiri Olsa , Andi Kleen Cc: Stephane Eranian , Peter Zijlstra , Ingo Molnar , LKML , Arnaldo Carvalho de Melo , Thomas Gleixner References: <20180130133917.GC29098@krava> <6d708c09-52a7-a906-b651-b133a7b4f189@linux.intel.com> <20180130150454.GE29098@krava> <35090c62-466a-aec8-b1a3-69def959c1c6@linux.intel.com> <24210bcb-0e4b-58fe-bcda-da30019f6e7e@linux.intel.com> <20180130185212.GA16806@krava> <20180131035941.GW26209@tassilo.jf.intel.com> <20180131091539.GA3313@krava> <20180131131505.GB31614@krava> From: "Liang, Kan" Message-ID: Date: Wed, 31 Jan 2018 10:15:33 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180131131505.GB31614@krava> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/31/2018 8:15 AM, Jiri Olsa wrote: > On Wed, Jan 31, 2018 at 10:15:39AM +0100, Jiri Olsa wrote: >> On Tue, Jan 30, 2018 at 07:59:41PM -0800, Andi Kleen wrote: >>>> Still, the part I am missing here, is why asking for >>>> PERF_SAMPLE_PERIOD voids large PEBS. >>> >>> I think it was disabled together with frequency mode >>> (which we could support too, but it's a bit more work) >>> >>> But yes PERIOD could probably be allowed. >> >> looks like it's just a matter of adding PERF_SAMPLE_PERIOD >> into PEBS_FREERUNNING_FLAGS, we already populate period >> in setup_pebs_sample_data >> >> jirka >> >> >> --- >> diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h >> index 8e4ea143ed96..78f91ec1056e 100644 >> --- a/arch/x86/events/perf_event.h >> +++ b/arch/x86/events/perf_event.h >> @@ -93,7 +93,8 @@ struct amd_nb { >> PERF_SAMPLE_ID | PERF_SAMPLE_CPU | PERF_SAMPLE_STREAM_ID | \ >> PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \ >> PERF_SAMPLE_TRANSACTION | PERF_SAMPLE_PHYS_ADDR | \ >> - PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER) >> + PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER | \ >> + PERF_SAMPLE_PERIOD) > > seems to work, getting large PEBS event for following command line: > > perf record -e cycles:P -c 100 --no-timestamp -C 0 --period > > Yes, I tried the patch. The large PEBS can be enabled with the PERIOD flag. Everything looks good. Jirka, could you please post the patch as well? Thanks, Kan