Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp52432pxu; Wed, 2 Dec 2020 14:48:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrr0BZEZat0Ir0F4Ocfd0AFzQ2IeFH3ppa2uynwOctZJn1dU8XUEY7X6nx9uwMW3E6jl65 X-Received: by 2002:a17:906:af79:: with SMTP id os25mr11335ejb.275.1606949298098; Wed, 02 Dec 2020 14:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606949298; cv=none; d=google.com; s=arc-20160816; b=poDWuDBJNPPJ4xLOxHPt7gtXfuL16WW2GtwkCiRKf8dKEWI1PV+by9buOCKG1FeHWq zyDAbDS4ldxzxozVwrQ0pvikvCkR1kXs5ZWvWCaVSAgOSUh2b+Z8kAjLtjDqj+Kr7tzP JWLj1QyQ0RSg3/lVbE/QrmEqjkLQ1iODv2eZBdDUpDXGvDcfkP3IjUfTf8XL25p5aG/m O+OFx7UQaZMPpsNRh8nq0hqt5O1osVc+usnGtHiQJQmHjN/kj3LPXviwHS9qDsEYzPhB iiYVvKMIBsdKw9KdJTa775TgbWUQelSePc1rVzyE1YxUNXA1POa2xfXyJiulAlwntYXH gapg== 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:ironport-sdr :ironport-sdr; bh=SSbnPBwcLnJaAAHLABi/QRsSzBPjmGWkdTiqbX/Hc7Y=; b=HmW4qmqojPs5/JhIFbph4BsxfE/TGeF8DGruRsoxs8xlJtRf9oeDHz7oVMqvAcJu7P slRNekD5aHMtYrGnQYzDAe24Q3wjvMaa2OIZzIIrB1K65+wmMQSS7qPjluL6rTb/JmfL vFFHWWKyH3vd+D+JLI+4EDR9Isr5hF6z+NG4E1/d2j214TXn10+F8/p4QLxWQikB/ghE 5C5YkPuBhmi/q0twMmBDZSlo7VqXnJ8fuB+TMo1HFTTB4uEUPaWAaEZHBzWTOdx8LTMl VIf9vg+c0WegrYQvnS/Nq4yvgntCk3UbJbCfzUClp0ZoQH9IKXPFYmnyqbzj193l4LVx jV+A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf26si130681edb.120.2020.12.02.14.47.55; Wed, 02 Dec 2020 14:48:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387514AbgLBWoW (ORCPT + 99 others); Wed, 2 Dec 2020 17:44:22 -0500 Received: from mga03.intel.com ([134.134.136.65]:16721 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728951AbgLBWoV (ORCPT ); Wed, 2 Dec 2020 17:44:21 -0500 IronPort-SDR: 3zZN1DhlkFqYM+LpeCy/znaoqVCRM/9YTKv5II4J2Y7+LznZLZkCAUoXXH7bJSDrnVHDxzs9u1 fNqzgAjvsoyQ== X-IronPort-AV: E=McAfee;i="6000,8403,9823"; a="173196293" X-IronPort-AV: E=Sophos;i="5.78,388,1599548400"; d="scan'208";a="173196293" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2020 14:42:41 -0800 IronPort-SDR: X4V5BzLtOSZ7Bcgs0+Yro3VupStgDab0e/L1UZZATXUGJqPNxD9YGocZa3wYZ7yS9VvwXPAroI 98OGbqWgjskA== X-IronPort-AV: E=Sophos;i="5.78,388,1599548400"; d="scan'208";a="481731189" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2020 14:42:40 -0800 Date: Wed, 2 Dec 2020 14:42:39 -0800 From: Andi Kleen To: Stephane Eranian Cc: Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Ian Rogers Subject: Re: [RFC 1/2] perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event Message-ID: <20201202224239.GJ1363814@tassilo.jf.intel.com> References: <20201202150205.35750-1-namhyung@kernel.org> <20201202192828.GG1363814@tassilo.jf.intel.com> 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 Wed, Dec 02, 2020 at 11:47:25AM -0800, Stephane Eranian wrote: > 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. Then it's not correct I think. You need a different hook point. -Andi