Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp443882pxu; Thu, 3 Dec 2020 04:25:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy29Kmr+Qrxi/P8/N62bOqbU3Plw/rUdtpRXRoE8rzq6YitMJIVi2niq5prjTbqL7xr5mB6 X-Received: by 2002:aa7:c753:: with SMTP id c19mr2594514eds.358.1606998304888; Thu, 03 Dec 2020 04:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606998304; cv=none; d=google.com; s=arc-20160816; b=C5+r/tKfIpRJCqHwJzsFQjUoSUP/NXc2C+vsMDRuwQCBtcj/cTVqX2rMvm8dmDvNdt eOZFMBRqK8KegtWXIrPWhlL1ube0Ezt9M5hDHIW/4SKQxLKBwVKDoGAQpcgFkqw/IVhz R/N1QexVLdkU94ezQOF89IhzjYyTsII8g46RmxfHp/AqVNXSW1ojZhwBMIM7sSfSmC5c TNYhKiag85hoS2IQAr2eL+aCyxjUbSHC09jGnkN3FLYOZRwjPfBk8cvK756tX7Pib3St MffU3eo4T/3eVoBHSKhSKD2USWrfyqZDUbsTfIDJgq9BXksCyY43XyCV+HYWli01DiTk ZlAg== 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=9zUFKXJHVhzH96g7NGAMXYc3BeOdBcaev2tbX+KB8xI=; b=aDnK54lBBH/bU5Qa2/VxuWcHCg6am9qZVc0mtD2f5NwbnNEBc6ar8yYAGXMZavOp/l AcWyfHxe+kSTvjyAsicytFm4rYLXP9QMtjzQVeuRnYXGFXdd6i2j5lu51F/iaTLsShzE 7Z6ZWJAmSGrLLz7xFMHTpMTx33Sy032Z5rDGep8DvysdpHpq7eD3BwUg3TUE5eHC/hrI /s0uvjckT5zsGVJkbRkJLKWyh5IJ4KtZK9DkE/YLHCTV/r1/usCQ4A6Kkd53xlWCczqJ R8VbAOBNur/JtlPAevSkjBv5dkd+q3ritVkwAmkSzuiMQsZ0rzUs8bSMrQn5SChvJtcQ Tahg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=p1A0qtoG; 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 yr3si968628ejb.190.2020.12.03.04.24.41; Thu, 03 Dec 2020 04:25:04 -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=@infradead.org header.s=casper.20170209 header.b=p1A0qtoG; 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 S2387681AbgLCMVd (ORCPT + 99 others); Thu, 3 Dec 2020 07:21:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgLCMVc (ORCPT ); Thu, 3 Dec 2020 07:21:32 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20FDEC061A4E for ; Thu, 3 Dec 2020 04:20:52 -0800 (PST) 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=9zUFKXJHVhzH96g7NGAMXYc3BeOdBcaev2tbX+KB8xI=; b=p1A0qtoGwppA7hWqxk6zCAqS3B T+wfwCgYISmVnf262FjCDRsHKJNrqiygpHpZcr/a2TLJ8KOsGqgYhBotigDnPlIIdk4wC/9x7I8FO KnF6mp+L65rIDbvAvSB0D5rVgUa/y1msESPBtnohJgIELeuC5hQXltL5Q451x8z/mQdc5RZcIjQoC 6MU8K7gDpzLckYfGn8FReUiwnUpZbLMwWV/hRVN1VoLGtP8BbXOyhAiWpmvwt+kDXcwcmNrdPh0I4 UR97WFDNYwW/CdoBzJN5hNUfHC+mor17yt8SftEjRINksVHGdk+uJgXz2SmKCAHqB0NBsqGBiqloX lBLjbPHA==; 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.92.3 #3 (Red Hat Linux)) id 1kknbG-0006e1-6M; Thu, 03 Dec 2020 12:20:42 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 99C783059DD; Thu, 3 Dec 2020 13:20:40 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6A9EB235F86BC; Thu, 3 Dec 2020 13:20:40 +0100 (CET) Date: Thu, 3 Dec 2020 13:20:40 +0100 From: Peter Zijlstra To: Andi Kleen Cc: Namhyung Kim , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , 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: <20201203122040.GO3021@hirez.programming.kicks-ass.net> 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: <20201202192828.GG1363814@tassilo.jf.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 02, 2020 at 11:28:28AM -0800, 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. With cgroup-v2 that's all the same, no?