Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4686912imm; Tue, 14 Aug 2018 12:43:44 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzokJXvUzxsCZKNgYwQhtd2hl4zMsYGeFolLQgCiRZBmenWaIOqPw4KQ3WUzz9ZrwBuxXaj X-Received: by 2002:a63:1d5e:: with SMTP id d30-v6mr22793496pgm.12.1534275824665; Tue, 14 Aug 2018 12:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534275824; cv=none; d=google.com; s=arc-20160816; b=fJyewRFse7+/4VgJxwlajktnVFAzLrePDJk5B8p5wzeRMiwffMXIF6GzqjVlF2+6Aw XqHkloqv1C3/x9vssdGLdw+paI3EWyknxNfWQeY7hbU/q8fgjAlfFzojtw1X39Y/fsbk RDL6IyDO9F/mq9fT0j7ltTxRSKUqu1YqqqzXvbU27onkR2GUFcwStWNcQnGACaRt5iy5 srfbYakk24gZYdSycf5O/4uwkJh+h3a9UaWKn8aNpU8BeV6bWUm7gX/8H/bKo9YPCvSq +Zo3SdGU4YXeKjGWcf4m31JgI9GfCnd8dxp4ijX4/k0+rJhnByrteh4+AzToQ5SaR6XJ 31mg== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=llkQV3WFKy6ip5gEZVZuagcLpC3OP39sC9fqPSMljS0=; b=Zbknd5GtRt96GdaELx6/lTrsIvCt7oY0Mb4ZGma0xJex/8kMEbcBsOugYG20W5bhh2 Zhq7fmXMjSpeACIn+8vTB1oDx+EmU5ltBWFuy/dv5nLL+tLkeEk50JTz1DHvQWsBnrc2 aVfDe1uXpcxP4dWKorJCba1AEz8jWdhLUtaJ4t3Xv+npkWIzhuzpvVFUPKAB1XgB5n0s vnzGChcbEVfJFDDuv14OedvdZecqp6xymVz2vUDgW5Zi6E7egP2fD/5pqrVurLhCNhQO dWKxpUM97ZykzBy/to3o5YqMlnp9QU93bDMX3vfRYY1AKyYvVNy+kQRstSyTxfXJFbpn QREw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TUv10KxW; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si22025501pgd.509.2018.08.14.12.43.29; Tue, 14 Aug 2018 12:43:44 -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; dkim=pass header.i=@linaro.org header.s=google header.b=TUv10KxW; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728603AbeHNWbX (ORCPT + 99 others); Tue, 14 Aug 2018 18:31:23 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:45603 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbeHNWbX (ORCPT ); Tue, 14 Aug 2018 18:31:23 -0400 Received: by mail-lj1-f195.google.com with SMTP id w16-v6so16311201ljh.12 for ; Tue, 14 Aug 2018 12:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=llkQV3WFKy6ip5gEZVZuagcLpC3OP39sC9fqPSMljS0=; b=TUv10KxWnmSOm1iYsApuSd32I4JA2EEMr1It5tpZ3IbpFl5SRBrNLHdp5hTC4ljw0w Y5APpiGK7tGvGl+18rt87O++iw7G7VYsbeJD+OP5mLq7SQhOYKXnjfA0wAC9nj5uT1Zr dVuHn/AcC26w8a25onR1xc5VfqXtYa+/WUeFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=llkQV3WFKy6ip5gEZVZuagcLpC3OP39sC9fqPSMljS0=; b=WInROO/YhhmDRZ5pdh8kiQGwZ7R8Bw5LJLKMFWyU0m9shAX8bF3HxpVfK/jpFECu8D bQCW0Y/XyhtsuhqAqXwOz3ykhgIJxhG9THmNYrrxAfjG/083gGBE0Iw5SFsh5oPRQG59 kTSuJWHRw/zQIkDPhHJuWZKVAJhNECsKwms+anHQgYKPQbPvM4zem7oH5mCC22BzQzzg kvBORSMmSquIciQwQ+vSp39xUNOvoJe7+3roKS1XTsq9hKRjlrAGYS4OsOgVwq8dWu/D KCQ9udV4SD7XsnpCYq5WcSa3xKstB+z/CbW0UYMduPGXJ7PqkB0L8tnaP8P+/0cISHGF F1Qg== X-Gm-Message-State: AOUpUlGkpwXweenB05RIpUXjgnvP6KJMqB2MTnpgjM6zDVDVsmTfdLpx NGw9JzelWtqU2+Y0p0zHc7GQyFzWSp4TpFYcdLRJag== X-Received: by 2002:a2e:5687:: with SMTP id k7-v6mr16991136lje.105.1534275758187; Tue, 14 Aug 2018 12:42:38 -0700 (PDT) MIME-Version: 1.0 References: <1531950487-24554-1-git-send-email-mathieu.poirier@linaro.org> <20180813124642.3d49c082a95fc294d926016e@arm.com> <20180814120910.ed225bbc462c58b09e5d68de@arm.com> In-Reply-To: <20180814120910.ed225bbc462c58b09e5d68de@arm.com> From: Mathieu Poirier Date: Tue, 14 Aug 2018 13:42:27 -0600 Message-ID: Subject: Re: [PATCH v3 0/7] perf: Add ioctl for PMU driver configuration To: Kim Phillips Cc: Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Thomas Gleixner , Alexander Shishkin , schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Will Deacon , Mark Rutland , Jiri Olsa , Namhyung Kim , Adrian Hunter , ast@kernel.org, Greg KH , "H. Peter Anvin" , suzuki.poulosi@arm.com, linux-s390@vger.kernel.org, Linux Kernel Mailing List , linux-arm-kernel 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, 14 Aug 2018 at 11:09, Kim Phillips wrote: > > On Tue, 14 Aug 2018 10:15:56 -0600 > Mathieu Poirier wrote: > > > On Mon, 13 Aug 2018 at 11:46, Kim Phillips wrote: > > > It yields success for the --per-thread case..: > > > > > > $ sudo taskset -c 0 ./perf record -e cs_etm/@20010000.etf/ --per-thread uname -a > > > Linux juno 4.18.0-rc8-00011-gb82af52c4b35-dirty #147 SMP PREEMPT Thu Aug 9 11:20:37 CDT 2018 aarch64 GNU/Linux > > > [ perf record: Woken up 0 times to write data ] > > > Warning: > > > AUX data lost 1 times out of 2! > > > > > > [ perf record: Captured and wrote 0.067 MB perf.data ] > > > $ > > > > > > ..but not for CPU-wide?: > > > > > > $ sudo taskset -c 0 ./perf record -e cs_etm/@20010000.etf/ uname -a > > > failed to mmap with 12 (Cannot allocate memory) > > > $ sudo taskset -c 0 ./perf record -e cs_etm/@20010000.etf/ -C 0 uname -a > > > failed to mmap with 12 (Cannot allocate memory) > > > $ > > > > This patchset is getting very old and a fair amount of things have > > changed since then. I'm hoping to be coming out with a new one > > shortly. Nonetheless the above is returning an error in CPU-wide > > scenarios while the feature is being implemented. Isn't what you > > requested or have I misunderstood your comment? > > No, sigh, I just automatically assumed the patchset would include > CPU-wide support again. If it were being done that way, we'd all know > that the feature(s) this patchset adds would be doing the right thing > for that purpose, guaranteed. The patchset published on this list never had support for CPU-wide scenarios. This is only a preparatory step, the first one in a few more to come. Sending the whole thing in one go would be way too heavy and is not realistic. > > The other thing that's going on here is that I'm becoming numb to the > loathsome "failed to mmap with 12 (Cannot allocate memory)" being > returned no matter what the error is/was. E.g., an error that would > indicate a sense of non-implementation would be much better > appreciated than presumably what the above is doing, i.e., returning > -ENOMEM. That, backed up with specific details in the form of human > readable text in dmesg would be *most* welcome. As part of the refactoring of the code to support CPU-wide scenarios I intend to emit better diagnostic messages from the driver. Modifying rb_alloc_aux() to propagate the error message generated by the architecture specific PMUs doesn't look hard either and I _may_ get to it as part of this work. Mathieu > > Thanks, > > Kim