Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3197114pxb; Tue, 20 Apr 2021 02:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA1eJxPENqfQUXdGEHG4x/4KjxzMsGppGPOPW1I7zD8+MQQunV+kc03eFVeJZZCNAaT6gO X-Received: by 2002:a63:c49:: with SMTP id 9mr13103396pgm.381.1618912224462; Tue, 20 Apr 2021 02:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618912224; cv=none; d=google.com; s=arc-20160816; b=SwyMIMl4nB0LRBN62bfxQL66q2ctzuydY/HiZpIlUul21KFUIs7+SHPZO527hDm0Ep WSX/FbfKvgwV0tmPQpxcqSOziMapG+aHgGA5CQN4QkUd0s2XaZuRsuhv/EmGET1DOl9K cq1+tqybnaJ/DQsAaBlLZv8OGil/HH3RoVyD9G869RyCQsq6IdDrNRnwRaIK/SpNtc90 zOOu+rIBwSA/rIkNDJcjUqWHJCA9Y7jWwll6DdyYQDPQ8VW8SFklBkdAhqpz0MEBrai/ LH1X4jCS2zFNzf/YIOsQLtwW5bB5wMKMvr77gmo8yqdJPM05c+5Lj+8TcMXp6jHFLXsK r2ww== 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=c/4ebdPoDkXsRQNBUYWS70TUfZuUFjko8Cp0we1f+BM=; b=n9O56OOgTbO5VPgDyHDd6SI/kW2MNd9ZT1rbo3AH9MJajD7W0fxvayW6cY8QJnyBsW gd16vP+Q4RCNNhCZmhw/XaN49pL3/s9EZXErxeSNTcvoBhha225xHgbxSeCo3q1hHPYw k4P/JWf82cvQB6+x6a3GpKyor9946IPKhaeqSAxp8zh89B05STCxM/GgQ2udIuUpj4HU FeyZhOYEX7zehvINvxZI+tr3y7pzoow8Umzwt+EZyh97a8vsiw2ROkuicjCFZRE04kM2 GjtGjsTxAlBwnjDElgHDTAzO8j6+SZFXnFxL7c/ihprUBWQ19fEHGC93Lfi+ZUTvWnu0 aqXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=BulSmplj; 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 y4si21087757pga.71.2021.04.20.02.50.11; Tue, 20 Apr 2021 02:50:24 -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=desiato.20200630 header.b=BulSmplj; 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 S231424AbhDTJte (ORCPT + 99 others); Tue, 20 Apr 2021 05:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhDTJtd (ORCPT ); Tue, 20 Apr 2021 05:49:33 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9695C06174A for ; Tue, 20 Apr 2021 02:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=c/4ebdPoDkXsRQNBUYWS70TUfZuUFjko8Cp0we1f+BM=; b=BulSmpljSK+FX7V38AZr3XoNb6 CylJg8sIm/YyS9UMI9z82G6/ycIVoB1vQmu5dk/kLGkmceZn4UpjRT4zo4gdKSX7M6WwQW9MmG8Ft ZQTHBEI7RT5iiEFnu3nJHmGBSppCeMcXBjWd7Ls3VLLAR0dy/ElHWx8nrM0D+kJKXY6IwID4zHaho rEEOxgoEOyBlY/w5FwZCtypV53bhyWVj+teXoScwmnrdlbh1RwRbZTmMJBk9CvUIZOXdyJ7isAEsh W8EQZX3vlPg/nHJIJ6wrviZvJHVOpMOt6U2PZBIyDhLUHxxnV4WoFcioPLYE0w7yBYcwMKRrhafmv /NV1+A5g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lYmzx-00BoJe-4j; Tue, 20 Apr 2021 09:48:49 +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) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 58725300130; Tue, 20 Apr 2021 11:48:48 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3E6EE2C48E3A3; Tue, 20 Apr 2021 11:48:48 +0200 (CEST) Date: Tue, 20 Apr 2021 11:48:48 +0200 From: Peter Zijlstra To: Stephane Eranian Cc: Namhyung Kim , Ingo Molnar , Arnaldo Carvalho de Melo , Jiri Olsa , Mark Rutland , Alexander Shishkin , LKML , 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 Tue, Apr 20, 2021 at 01:34:40AM -0700, Stephane Eranian wrote: > The sampling approach will certainly incur more overhead and be at > risk of losing the ability to > reconstruct the total counter per-cgroup, unless you set the period > for SW_CGROUP_SWITCHES to > 1. But then, you run the risk of losing samples if the buffer is full > or sampling is throtlled. > In some scenarios, we believe the number of context switches between > cgroup could be quite high (>> 1000/s). > And on top you would have to add the processing of the samples to > extract the counts per cgroup. That would require > a synthesis on cgroup on perf record and some post-processing on perf > report. We are interested in using the data live > to make some policy decisions, so a counting approach with perf stat > will always be best. Can you please configure your MUA to sanely (re)flow text? The above random line-breaks are *so* painful to read.