Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1120796pxu; Wed, 2 Dec 2020 11:32:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7WicryFVP+cOe7lrxF9uviC7Ux2Hge9yOZRw2znTB5m1g4TGpaOn4EHnD0SHtSGjEgPHd X-Received: by 2002:a17:906:2683:: with SMTP id t3mr1323462ejc.414.1606937577014; Wed, 02 Dec 2020 11:32:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606937577; cv=none; d=google.com; s=arc-20160816; b=DM+ug0s5i+dJE/RT4N/3rJQFA6UZraX/v41szZwNq/xhkVMzijvXZnehJycFVWS1bu uHFcnHjJ1qU1bH7o/08msF0OBJzeIjv12CFaGpw8iDUP7Q8n6d8zdrfrix0o363FlVA0 exduDgPRtyJoVnRLnipz2OhM7axS7GqXcrkdMa9BJp58xI1paoFUZee76s8RwVAUeZGV EkXmoxLRktDq6SlUanajmIfF+/T958/CnT3oJ62bo+XCCwqqtjsClExg64oyIExLp+Lv KKrH0LbLVG76m8wBzGXa2uphmmVSZx1nmQ11ISVKSqOQOBMJYsB+ZUT+Y3YlfJQEJlM2 RmRA== 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=la8pU12Txfzm1i7x6l87Q6HaxZ5nrHXjHYz3P0rI8Do=; b=1Cd7zasreJ9Po/cqrFYwmnZMl6kPqujbjCcHNaSJem+jJKu3ecdIdTIZPvT33Dcj0i QPx+Uvka2kMETqmuz8XrLUapvKyJpJ3tsxv/ZbKQBCwPhL2/3B0cRyEuNi6ad3x2g5/L kCChRMIwzOEJLsmI35lsR7o8dWzkueWUkfPsWKMSzIbp/mroW4PV+KVzfrIhh0LAsmAb DTN6vp54Q085cMCmxrXv7pT+4+CsUQJxrMa1YVnK8M0cbHGF15U+L3cXsNG7pSVvCj2j tEM0fc1tjU9Skat08K2SNeoMlRn39cufoedGcJbxzRd2ST2kw1sbF0NohLDLgYCQ2Tbm tHMA== 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 j26si542699eds.457.2020.12.02.11.32.33; Wed, 02 Dec 2020 11:32:57 -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 S1729028AbgLBTaL (ORCPT + 99 others); Wed, 2 Dec 2020 14:30:11 -0500 Received: from mga01.intel.com ([192.55.52.88]:16554 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgLBTaL (ORCPT ); Wed, 2 Dec 2020 14:30:11 -0500 IronPort-SDR: Uyfi/dOH0U1JHRGkMft5Ya+cBYlQkUejbFFrVHgFGJMlGvAr2QLu8ya7cDjP7uvkQvMV4Cwn+h 8/QV+TdWyGkw== X-IronPort-AV: E=McAfee;i="6000,8403,9823"; a="191295033" X-IronPort-AV: E=Sophos;i="5.78,387,1599548400"; d="scan'208";a="191295033" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2020 11:28:30 -0800 IronPort-SDR: tJqPkaYET2VK+XwPUQMAf0LvzhTpG/zn5zuMDG/l5JrlZ6Dsks/sl7KlHuqlX4123SiFvvVUCq 3JlIblxC0LlQ== X-IronPort-AV: E=Sophos;i="5.78,387,1599548400"; d="scan'208";a="550189635" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2020 11:28:29 -0800 Date: Wed, 2 Dec 2020 11:28:28 -0800 From: Andi Kleen To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Ian Rogers Subject: Re: [RFC 1/2] perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event Message-ID: <20201202192828.GG1363814@tassilo.jf.intel.com> References: <20201202150205.35750-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201202150205.35750-1-namhyung@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + 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. Probably would make sense to have two events for both, one for all cgroups and one for perf only. -Andi