Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2912022pxp; Tue, 22 Mar 2022 08:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws2eBkqd5C9If0mBDiLe4kS9m2GyxxjxzQWQKNB4UDVyyN72BSdryxqVTnoGFzaLR0xM8I X-Received: by 2002:a17:906:1411:b0:6da:f354:fb83 with SMTP id p17-20020a170906141100b006daf354fb83mr26027830ejc.539.1647962436458; Tue, 22 Mar 2022 08:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647962436; cv=none; d=google.com; s=arc-20160816; b=SvQSugA2ST4s30hXZe+as3e6QHA/15IQt4jXL2Bz+u9CJJvS6nLpWF3N7h2jBY1MIC fMHexWOOMHKA7T2hhUrZT3tvRJf/8v9H23XFISuLRsswxzIp4q52Ao65kSiD2zsRAM5D XERoiYuNSAkZnzo/6uRAzYPk07Kqp+hKzsY7/HaXY24FfNxdhihvWtnxT0V+5kUBZtDi uFe9ZoXnYt+fCF+aBPRdx9wHBYCYFRTxR7NuYUazIJh1ykSpX5QFlMIdtnwB5C7ebfjE vZcydCI8pnBsRVwvqygnljW+WPINrIEMl35+ie/yxwbt0VzQ4tYncNp8kTdxhBdQf9LQ LhjQ== 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=q3UmGy9gJ4qXtSsXi97sPJvmm7Dxp16jk7JFceH7qMk=; b=BHlof7BKuzyM8gGQvg2AOdir4mZ9Znk0pY2+DhkljtOIeUgj/n50EwjS0sygdWLljQ vvzUoNUK7rAHi9nyj3MmR3a+lRpyAPRWXu7XKlI4/DvmCJKrEMuU9IJFrCVStnytR6vM 1n7prU4m8+ZHK+SGYLWEuH/wk5Cj+vGmOD08bAs1oeo40NJ8vxNx9rL0WLpUpwkKUwRF 3lqQ939Ul/8FvUBhXWzx9CHqYyqr8DJKpYn8zl6gI0lQaN8nMIPLh8VGpL0icdUrDi3A T8dzaNQQm3x6vdmW/DIl9h4FqrhpXKRS4a7ByGfswDtdg9Uw2Zuc4MBJos8i9ZyN0as6 7h5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="XmN2gR/g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a50d492000000b00418f551af69si12030437edi.232.2022.03.22.08.20.10; Tue, 22 Mar 2022 08:20:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="XmN2gR/g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232239AbiCVNDN (ORCPT + 99 others); Tue, 22 Mar 2022 09:03:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235221AbiCVNDB (ORCPT ); Tue, 22 Mar 2022 09:03:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8C065E75A; Tue, 22 Mar 2022 06:01:33 -0700 (PDT) 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=q3UmGy9gJ4qXtSsXi97sPJvmm7Dxp16jk7JFceH7qMk=; b=XmN2gR/gltwKPSLIxPxGgTpf/S vuNKoyLTCWbTtCGlHPOhxtheIQdWVRYEIU2imY/zK1tIv8TnWrPagWUyFaBc6m1wN+R+04l9NruWF CipCBKecNZqDEK7lOj4dzIQexgkbTQzT68ygwxtti9kMJWcpaUj+kURSEuAgZIpDrboKkbMNOXaga eCmagxK0ascFucUZSqJqkBQLTvTfBaBwHYDx2GA6zM/J7UsEVl82KP3xclRblNkzmhXz+jGMgNCbq XGoRzPW2bqUDSsQVwOpx1cdcT+0j4Lsi2nURvg1/osgQqelVDCI5r1nuOaMJTwYQ56EwPBhkH++Gb txff5Rdw==; 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.94.2 #2 (Red Hat Linux)) id 1nWe8d-00BbRC-Dz; Tue, 22 Mar 2022 13:01:27 +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 (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0F70A30007E; Tue, 22 Mar 2022 14:01:27 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EA1392019FD09; Tue, 22 Mar 2022 14:01:26 +0100 (CET) Date: Tue, 22 Mar 2022 14:01:26 +0100 From: Peter Zijlstra To: Chengming Zhou Cc: mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, eranian@google.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, duanxiongchun@bytedance.com, songmuchun@bytedance.com Subject: Re: [PATCH v2 2/6] perf/core: Introduce percpu perf_cgroup Message-ID: References: <20220322120834.98637-1-zhouchengming@bytedance.com> <20220322120834.98637-3-zhouchengming@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220322120834.98637-3-zhouchengming@bytedance.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 22, 2022 at 08:08:30PM +0800, Chengming Zhou wrote: > Although we don't have incosistency problem any more, we can > have other problem like: > > CPU1 CPU2 > (in context_switch) (attach running task) > prev->cgroups = cgrp2 > perf_cgroup_sched_switch(prev, next) > cgrp2 == cgrp2 is True > Again, I'm not following, how can you attach to a running task from another CPU ?