Received: by 10.223.176.5 with SMTP id f5csp341211wra; Tue, 30 Jan 2018 12:23:31 -0800 (PST) X-Google-Smtp-Source: AH8x225vRmcE2Ng4Gt0RHAEZ6vDFa+3imxkZbIg/PZ1tzOoOR/+hQ6gfKWuUNOIyNhAJOdRUOf4j X-Received: by 2002:a17:902:595d:: with SMTP id e29-v6mr26814517plj.436.1517343811549; Tue, 30 Jan 2018 12:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517343811; cv=none; d=google.com; s=arc-20160816; b=IFNxqeJ53WwQgt+Qr0mC9NE6QswjplieO7MJC8iFhm6dpDpDznQY+yAtaeAwbs3G9p jPWQEQRJb3qSSomXwiIIWJSVxL2p109l7OOJ+kX21wAmEXsqCzcFBB/lY7Kg3gAWmtSs 8MrN55qYHkIsg2rwxo4w1Df9p5wLLzKE6aKfXlExesnBJhLRiVjs+VVipin3QPDWoRgP zn0ofs/jDaroiTEeypFQXE2icZHGr24wVRXGKYiIQiMclUZwpFVj1vK0ROU3u4Yz4PRz G4dZk2i8h4nHkF0uqarFYGoaI0IMreZOmkKTYo7dBCdslsgINDwvyG/DNGxp0DhmAXMN /IoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=uFSb1r9k25bV4d5nzk/foanMXJ6XYuDj564WHMArDKE=; b=aFVxrLsfPHMOcqlJYUMU427OtdzF6EXNJTrQFut6pG2vZgVRp7fpOsSEVhg5GNZxaR a4UNYV2vyg0n8me/M7iAoedBHnr0CFKJ+ORlQM14Se+tVupugbywInFwY1Zjd2WIAPJV AKVrid+/yK6wGsEdJik257nE0xTb5CaNu8HjAcu4uczhqSl7j27RXL2jQerU6zebk0j0 c1Zg2ypu3fshk6/9EuX6NttQj1SnCP1bUxiU381SYOpXE1lEFK6VwnK7q88m3gCfqX6y khKYfEG7RN3bNwkgQ7qpV+2f/Ox45YaddNw8csK21fsaAZ6zph9SnrrBgCPuREIwJePB Qtog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dKqi0tWj; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si2953231plt.652.2018.01.30.12.23.16; Tue, 30 Jan 2018 12:23:31 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=dKqi0tWj; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbeA3T4g (ORCPT + 99 others); Tue, 30 Jan 2018 14:56:36 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:36694 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbeA3T4f (ORCPT ); Tue, 30 Jan 2018 14:56:35 -0500 Received: by mail-it0-f68.google.com with SMTP id n206so1988911itg.1 for ; Tue, 30 Jan 2018 11:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uFSb1r9k25bV4d5nzk/foanMXJ6XYuDj564WHMArDKE=; b=dKqi0tWjhQcmqEAaGGBSJ25xm+rVQQmFN8XxBcLaB1G+V9wi6a3UfID3nec6ja+vXr yK/OpMBNgaCwYGgj6IkryInIdNb5F0G8ZoMN9Dkhd/j7RUKO5+ft3Ox9tZMfpKI4jPVG 6jMA5J9HUQfSHb6FdmPieslkjGi5TZFdlaKY2hRP8USv/mtntc1Sb1MSakPv5mRPI6aG iB7L0hDmX3j7GCT983dRsKeIQ+KSZu01tWhFE1ZctS9C+mumkRsuCBMR2ZWVnabAw87g xRbgqzgeAAas68J/4+MeZgRG+o24OssFVBTwXxdmaLPge83Ij2LP1/+FMqvZ+H8Fhp59 2jdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uFSb1r9k25bV4d5nzk/foanMXJ6XYuDj564WHMArDKE=; b=daRiSOtoFL8sqJ3qAU97Kj68g8onzbs4CSS/FhIPmwlRvXs8z3uXV9veodKgQMMi5t R38RvIgYGG/mGDXq8F8dtimYPQPjvua1+wpSSzJB5XKQBfMmtwvclOYQXysd2RY+R3ko zXkqkjGble+dpCUxptFbiE7DpYGi87TPSP8v0Lg0B+A9bLqmMbcJwySVLjK7HekU6MHA HeYRlSpPtOPnoRcpM15NwKMiLjKfVHNj/D6uqT80QkDL2N4helpHKuEEUiw0nAfB/rFF 0sXwAW8Srn4mLFzJ8RrPVG3Pck/oPyCPXKONv2que2UpBKPOAvE5SIp66zHQH2W+HeAg cXZQ== X-Gm-Message-State: AKwxytcSasN41/S0ELm4Vj7dSAn4tQZfm9+F/XDrGBeJSuQxIQRypPry P54gUFRtltte3zyVssBKBvvvxGISi7BrGKjonV2n6Q== X-Received: by 10.36.88.83 with SMTP id f80mr34373702itb.66.1517342194648; Tue, 30 Jan 2018 11:56:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.170.39 with HTTP; Tue, 30 Jan 2018 11:56:33 -0800 (PST) In-Reply-To: <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> <20180130185212.GA16806@krava> From: Stephane Eranian Date: Tue, 30 Jan 2018 11:56:33 -0800 Message-ID: Subject: Re: [PATCH V3 0/5] bugs fix for large PEBS mmap read and rdpmc read To: Jiri Olsa Cc: "Liang, Kan" , Peter Zijlstra , Ingo Molnar , LKML , Arnaldo Carvalho de Melo , Thomas Gleixner , Andi Kleen Content-Type: text/plain; charset="UTF-8" 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 10:52 AM, Jiri Olsa wrote: > > 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 > Still, the part I am missing here, is why asking for PERF_SAMPLE_PERIOD voids large PEBS.