Received: by 10.223.176.5 with SMTP id f5csp250875wra; Tue, 30 Jan 2018 10:54:12 -0800 (PST) X-Google-Smtp-Source: AH8x226/1UMFMyEpPd/ZIzxLxOYNt0Dbq91BPlOFV4Dtmh0cfb1adbmG4xMfdTPJwkl5tCOA2M5E X-Received: by 2002:a17:902:6945:: with SMTP id k5-v6mr16614522plt.389.1517338452730; Tue, 30 Jan 2018 10:54:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517338452; cv=none; d=google.com; s=arc-20160816; b=O7Yy0YrievJ8RExUd2ujKHAGmBbO1ZDvA3T+ddoOspyQNTV+7/XE9eqTaUI76qiC01 ieNxJ567yWaiySDmYcmQmAavYrzJkX6kXyU4olw+O6JlxAdsJOBED4DR/0Gszf5ACp5Q kbeK+IgoArfbCpTQRAzEZ4AuoCQVSG27FMA3BnGnhRlDhHg1oZCkHrbljaXYQs5AIuOc wTxXw/UhvJn6LbBpHLRTLhGx8RZ+21mP1dfLEtiHPovdZs4L6rD1l6Q/Ai9EsBBLKyro /O13xK3zK4u/l5XMIMaaP8Klm0UFUBEE7B/4wIZxztOpeN4IqHBVgxZ0RqGCWA6wkdbv xHJQ== 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=IUhMSrmI1nhed57KYv+US/98bCwwPvipXdk7nMgtZcc=; b=VvuwK+/lfCMgL3w73an9XvE3oYqGj+5rVaQRu+c1US+tqCSyfr+V9dbvklrr2DXiDp JAw7JDkf5Obr6STyGJyPtBLk95m46WEsc0P0qTLiPDKq7yCTS+E9YcEJPuGlsGESekad 8c9qxAsFXFd0/AKKDjbmlO3onf//0KH0WMcgLMX3jgP6subcxmaOm1uAT3e66r9q0pF8 K16qoeOro1xKeLw/+taDbq2K/G1Rf51q9/VKXCV3JmaiEy9H+qwi+eq3mmFv7Iu220Wo M3zMiALHeTYezslqqamt6kOiwvw2IVPpFOiWAblrl5KmTdjFZXhszOUGynGvyjQz/+RS QrVw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si9680882pgt.109.2018.01.30.10.53.58; Tue, 30 Jan 2018 10:54:12 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbeA3SwU (ORCPT + 99 others); Tue, 30 Jan 2018 13:52:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47976 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752555AbeA3SwS (ORCPT ); Tue, 30 Jan 2018 13:52:18 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B2FE9090D; Tue, 30 Jan 2018 18:52:18 +0000 (UTC) Received: from krava (ovpn-204-17.brq.redhat.com [10.40.204.17]) by smtp.corp.redhat.com (Postfix) with SMTP id EB4E95D6A8; Tue, 30 Jan 2018 18:52:13 +0000 (UTC) Date: Tue, 30 Jan 2018 19:52:12 +0100 From: Jiri Olsa To: "Liang, Kan" Cc: Stephane Eranian , Peter Zijlstra , Ingo Molnar , LKML , Arnaldo Carvalho de Melo , Thomas Gleixner , Andi Kleen Subject: Re: [PATCH V3 0/5] bugs fix for large PEBS mmap read and rdpmc read Message-ID: <20180130185212.GA16806@krava> References: <1517243373-355481-1-git-send-email-kan.liang@linux.intel.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24210bcb-0e4b-58fe-bcda-da30019f6e7e@linux.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 30 Jan 2018 18:52:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 11:48:18AM -0500, Liang, Kan wrote: SNIP > > > > > > The events in fixed mode could enable large PEBS. Events in freq mode should > > > not enable large PEBS. > > > I think that could be a problem if some events try to enable large PEBS, > > > while others not. > > > > > You only enable large PEBS if 100% of the events use fixed periods, > > either via -c period > > or because they all use individual period=p. The --no-period could > > also be used to remove > > the period for measurements where the period is not needed. > > > Oh, right, the kernel has already guaranteed that. > if (cpuc->n_pebs == cpuc->n_large_pebs) { > threshold = ds->pebs_absolute_maximum - > x86_pmu.max_pebs_events * x86_pmu.pebs_record_size; > } else { > > Sorry for the noise. > > jirka's patch looks good to me. cool, I'll post it later this week thanks, jirka