Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp423950pxb; Fri, 16 Apr 2021 08:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl07dfcW/i9+O4sgABp9sqrbti37ol2u/FvjibK/ZSxuU2L9JDyzjm1duJN6fTPas578gK X-Received: by 2002:a63:1347:: with SMTP id 7mr8354239pgt.112.1618588462032; Fri, 16 Apr 2021 08:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618588462; cv=none; d=google.com; s=arc-20160816; b=ps6Aeb/VLVQVj/xiaESBevZUT6yLd12FyWh4eWzRw0xq3kWYTl0NfOUcMIO9SDNF/B l/7/ADGg/G2bgAUwlxzq84vCueWIjnKSUnzjC0+HvJIOzy6N/FMiMKFjjp6sK3Eb8NFH lgIWxphdtToLrfyPIYSvhvifsjTCXjIpXci6ZB7qThxZI6Suq9Y1bNrgbZVoj5G/p8xq AvfuWpYCkiHO4ILq50+NVNNucSVw+abIRTaHWJsJMbvYlddxfiexgNFcCHnJSMHSagx/ +A8ncIYFER1vmCgfcpoxQo+WDe2tFbceeIBlG2O9nU8gTbttzw62CoqwufUZLT566+tY CeJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R6QwyoIHLujEky6poAogx4uw5mzz6A2pMKg7WGcrQRo=; b=I2uE+zznnLrbPS2kziaOsqJX68bkGaW9um2AEB2SFBy4kZWgPciKTJcwHTrYvoEAkc jUKh9wGtB2kc74tcyMQjhAN/Z7lmOAhDDS3I4yjchojvkueL6V5Q514XTZC0mS3OxZKB g2EVPO4zSWRT/v58FYao/umhN4h7G1GE6NnMHT+7hih2lmGVqmzj67jbYa+yGi90/mku TI7kJK/nuVZTcykdkrdTWycHc6bmlnYYUj7vh4lS25M/KUiSNvObPqCHP3YGCM7RFl1p omycVG3Fd6EWjtCwKuEeSEwrrl1BWRiwFluyv975k+0wS6TZKuKZEUXKeU1ri6ieRlWT DGYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uqCVr2k6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si7211842plm.369.2021.04.16.08.54.09; Fri, 16 Apr 2021 08:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uqCVr2k6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240946AbhDPNlm (ORCPT + 99 others); Fri, 16 Apr 2021 09:41:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233606AbhDPNll (ORCPT ); Fri, 16 Apr 2021 09:41:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17FA8C061574 for ; Fri, 16 Apr 2021 06:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=R6QwyoIHLujEky6poAogx4uw5mzz6A2pMKg7WGcrQRo=; b=uqCVr2k6T9SY+UIUGXhafWZQey mJJXfZ4s5qyQMYJquAoUcAT2kpHmyiFXQRLBymEgc5RynJcG5N43vUs2HXG/jqQoL+sOWoV1QqNsF yU6wjugP5+r5DUAH/LbjZkC4ULfszxxhrwCkvVCrIsYm0DKUL/01W4qATs2m98I4xwn/wZzMyaQx7 NW6pNKHTIyQ9AJFgsjxnvDAuSmntqO9ohOYXikaJmaAcnUXKuem+opA68j6kj5Y3oFbQgABX9Tyrd s3pWn+L9TyttXkJzwyTV4oc4Cwh8OtRi2pFsrGzhojwAFZQS8ZZcH4opog2VEmOENkg8is7WV3dFj TpjFnVuA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lXOh8-00A0RE-HL; Fri, 16 Apr 2021 13:39:55 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 87A32300212; Fri, 16 Apr 2021 15:39:35 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 53D962BE84B4D; Fri, 16 Apr 2021 15:39:35 +0200 (CEST) Date: Fri, 16 Apr 2021 15:39:35 +0200 From: Peter Zijlstra To: Namhyung Kim Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Jiri Olsa , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Andi Kleen , Ian Rogers , Song Liu , Tejun Heo , kernel test robot , Thomas Gleixner Subject: Re: [PATCH v3 1/2] perf/core: Share an event with multiple cgroups Message-ID: References: <20210413155337.644993-1-namhyung@kernel.org> <20210413155337.644993-2-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 16, 2021 at 09:19:08PM +0900, Namhyung Kim wrote: > > Are you actually using mmap() to read? I had a proposal for FORMAT_GROUP > > like thing for mmap(), but I never implemented that (didn't get the > > enthousiatic response I thought it would). But yeah, there's nowhere > > near enough space in there for PERCPU. > > Recently there's a patch to do it with rdpmc which needs to mmap first. > > https://lore.kernel.org/lkml/20210414155412.3697605-1-robh@kernel.org/ Yeah, I'm not sure about that, I've not looked at it recently. The thing is though; for RDPMC to work, you *NEED* to be on the same CPU as the counter. The typical RDPMC use-case is self monitoring.