Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1131103pxu; Wed, 2 Dec 2020 11:50:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJysHTfFPcg5whmfS0D3c69WHisxQNk7H2VHVJ/mSIAruTtVoYAK9a/KlkMJcAZlIct2MEBv X-Received: by 2002:a17:906:6d58:: with SMTP id a24mr1328927ejt.298.1606938611171; Wed, 02 Dec 2020 11:50:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606938611; cv=none; d=google.com; s=arc-20160816; b=Ym1Qd5RLVyLsXHkoF1Pa8WtFwCQwD4odQMal95K+9pc4f7/55vuZWGpm0TguxWs3ja zcciFNc9UzZpHz1LdROBk6d+DXjoEEVQWXc/yNRg29yL0quL6K6mWNR3p9fAC5W/k/p0 /G5UWaz4wl4y+ay6qqx0R3rsM2F2pLkLZv0QEpVO/RCvD0ioBqiygFFwOuY1xtga8zpt IUNwbW8I9HJLaTborU2HSRRMMsa7BzM6PszAn3EldzgXRmYHG7BTIiRQXJUG2gNyfY3Z wId+eC/LRCuupUIFOtI4xHWDip6xlSyS6v+p1kcsRou/XuUxPzmAxtMHwuL7UvtA1NSi dOrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nZkMoo9zU7Z0IHTxK3hjygu7WvHytVEEgLMBaSt4Nzo=; b=wPPdzM5PwGb5goK3EpuRkLQ+mD55NWu4znMdAHZen1IfibNHzKTAMPEOF4z0646gFO julXG0gyTqb8/YFFZR+K8z9UnoAxWj0C8J3WM/SOGubyxD4r48D6C7ZzBydCf30F/Xkj itePONaaQPzXXblECGh8J7DVA200icZbdjhF9x8I+E6ZMUEPzrLeJ6h2q2jFeln3efxM uVqeicIOnDRGzRrqbOYdear1pdUkAdZ8Z6rNOOrnHFe489fM9j70qGI3T+f8WPzwjXh9 NpwLr5T7oKREI4vTmnleM7o7S6pNxlwjbynF8bwCJmqWs3zA6UNgxUOchV/Wgmzj1wwp y98g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gXXJrsfh; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si707260edi.391.2020.12.02.11.49.47; Wed, 02 Dec 2020 11:50:11 -0800 (PST) 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=@google.com header.s=20161025 header.b=gXXJrsfh; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731114AbgLBTsS (ORCPT + 99 others); Wed, 2 Dec 2020 14:48:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbgLBTsR (ORCPT ); Wed, 2 Dec 2020 14:48:17 -0500 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B6FCC0613D6 for ; Wed, 2 Dec 2020 11:47:37 -0800 (PST) Received: by mail-yb1-xb2c.google.com with SMTP id o71so2735262ybc.2 for ; Wed, 02 Dec 2020 11:47:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nZkMoo9zU7Z0IHTxK3hjygu7WvHytVEEgLMBaSt4Nzo=; b=gXXJrsfhF8RIpunNCHJM/lvvBisznd5+vFHH2rfoSWmYSQOpMzfPZPX9wnc/Uw5GIV NLe9cFo3WpGpY/6xZmim04bREhBjikcxSvPBRYUtT5DO5pxppbvAxThdpdpcX63arUrq 1i+EoAWjRVYtdxXnn2i0w+It6KtAJAnCg1YYzgJX+5Ztpp1bCUoG/tACHM1pLYpvDu3v IyYKHA2nQtW3HwSTLjREZ7FbfIQaEVJaos1XVgeqGBR0RoGce6CjNnjpRQFw9bSt5NbH BICjOBOPvdjPzFynNlwKZ9iht4uf4DNe5ImwN3lwZa4cgWMOxFwVRMJUMT6z/1oGEhFw U2uA== 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=nZkMoo9zU7Z0IHTxK3hjygu7WvHytVEEgLMBaSt4Nzo=; b=XUUoLGoB9y+012oXTcLrjBmzFX+IyTnULFOJa7S4TCA9LFxUOnpRFTeBeH124FvYGQ AAJgIPM5WgiezXBtO3XNw8XjjJmIusHe6G3ZLwswjd90rqVgidvomxGDzzWiNot2FMmy WKoUzRAWmSLE0CnSxj3XWqY6R715+GiS751O/anEfx0WBAFQi+xPQuZZ2npCkWSwv8h1 mngSkLReOGUmHjWmnpt/lXqwN6YjAHn5gPANL3jMjRFTY5zfYb9NNXnbeeGVF1QCNWLE c1EXsDiAzQ8Xy35ATaBP834ODpHrO4CEgfV9+8AmvPR4DWFtFOOphhhUHQIY11dqN8VG Sb8g== X-Gm-Message-State: AOAM5334Jt6KYSvuHIdkrWfsXE272YFY02HsgcdF0qPab+gyn7K8OmWG vlKnWiQokyiQ9aAKp4MPdL8PFgHlMkfedGGDo7/RBA== X-Received: by 2002:a25:d46:: with SMTP id 67mr4490893ybn.155.1606938456429; Wed, 02 Dec 2020 11:47:36 -0800 (PST) MIME-Version: 1.0 References: <20201202150205.35750-1-namhyung@kernel.org> <20201202192828.GG1363814@tassilo.jf.intel.com> In-Reply-To: <20201202192828.GG1363814@tassilo.jf.intel.com> From: Stephane Eranian Date: Wed, 2 Dec 2020 11:47:25 -0800 Message-ID: Subject: Re: [RFC 1/2] perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event To: Andi Kleen Cc: Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Ian Rogers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 2, 2020 at 11:28 AM Andi Kleen wrote: > > > + prev_cgrp = task_css_check(prev, perf_event_cgrp_id, 1)->cgroup; > > + next_cgrp = task_css_check(next, perf_event_cgrp_id, 1)->cgroup; > > + > > + if (prev_cgrp != next_cgrp) > > + perf_sw_event_sched(PERF_COUNT_SW_CGROUP_SWITCHES, 1, 0); > > Seems to be the perf cgroup only, not all cgroups. > That's a big difference and needs to be documented properly. > We care about the all-cgroup case. > Probably would make sense to have two events for both, one for > all cgroups and one for perf only. > > > > -Andi