Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp159909lfo; Wed, 25 May 2022 18:43:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSmGzo5fPr3wMYDX2Q++evOdZGok9EE6ZJoVteoHCNn5yBh7LXuA1vXNysWH8TBxqHOg7Z X-Received: by 2002:a17:907:62a1:b0:6da:7952:d4d2 with SMTP id nd33-20020a17090762a100b006da7952d4d2mr31589189ejc.260.1653529386525; Wed, 25 May 2022 18:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653529386; cv=none; d=google.com; s=arc-20160816; b=zGWta2cbkd1EoigfwxsOrpchwtotZLmlvDlswwoD4zZXM4kMivqj0CRhjS9N0iquMY cC0xgMClXNRQ8UfHbgRkVaFQksszMxs8IfLK6xe7mdJYCk9WdZWYmUfZYSfHw/AbC2Nh CbFS9CT2bX0i5J+TPhgd6a29Tpw3tjvPm19ffihwHD8LRcd5fUlr7J+VVzhtFF61Cc20 S3MtoR7/g3Inl/2ikAK4+M9WGKtqOxDrmM3uDIIzcH7qZkehdtPIUcvDV6uuOmfnizVF ZcYdKado4Fqg8t/3qE5YjZ/rfwfw5qcJJ9iz7/dZhF/ngbZQblnUT2uos6GsjRAzaO8S D1LA== 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=QP07LDyVTEoT20uTedwg+UGDjLkX645oy3+oI/k9KRs=; b=ty0ZuiJ1eknHg2kawHMiw2NPy6XfuLhEJwk81XVbdxC6OlxIt5he7RvL+KDsCC440o zSQouDoViy6Ty0k+vP0X+zTnTu9yD0N1krer5SGKBce3vSjJfcJRTcAWNuDDOBY5WSC7 D7mA6UADw6mQOLHmgc6BG0dBHVBIytcWu81r8iLnBv3IANAxhG2T5HmQ0WyL1YI0Df0K Miu6CSV4a7xH1Q5zrTEHOP23oP4mvYaMZ14Ul/JCHPXY++6+oZWMVbxQ01MzUsqS1Tg3 eZ+6nPVW6azUJMrE7FruAyF89OMhilvrnwbIXAw2F07a4LHkVZdrLjzjzwGxDJlpFQez /vrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Un5rEjXd; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz4-20020a1709072ce400b006f385307f95si209426ejc.649.2022.05.25.18.42.40; Wed, 25 May 2022 18:43:06 -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=@suse.com header.s=susede1 header.b=Un5rEjXd; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344218AbiEYWv4 (ORCPT + 99 others); Wed, 25 May 2022 18:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbiEYWvy (ORCPT ); Wed, 25 May 2022 18:51:54 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FF492409F; Wed, 25 May 2022 15:51:54 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B5CB31F91C; Wed, 25 May 2022 22:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1653519112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QP07LDyVTEoT20uTedwg+UGDjLkX645oy3+oI/k9KRs=; b=Un5rEjXdkXJRg/7BDQ4WUW/5PsCCqQ5kj5pJaQp7Co5y558JEvVWkwTggBiPxw9IsU/Jgz VkB5iahLfTOZjyEDs8pggBJHpKHHjfSOlosX/O9wN7Tobvg5sArOIb3hJ9uVgCoKf2SLP6 rx7GDfcaa0DgZ9PwdWMgZNWZGf5fT90= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7EB2813487; Wed, 25 May 2022 22:51:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p/zbHAizjmLuLgAAMHmgww (envelope-from ); Wed, 25 May 2022 22:51:52 +0000 Date: Thu, 26 May 2022 00:51:46 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: shisiyuan19870131@gmail.com Cc: Tejun Heo , Li Zefan , Johannes Weiner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup: Return if dst_cgrp equals to src_cgrp Message-ID: References: <1653066120-21262-1-git-send-email-shisiyuan@xiaomi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1653066120-21262-1-git-send-email-shisiyuan@xiaomi.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_PASS,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 Hello. On Sat, May 21, 2022 at 01:02:00AM +0800, shisiyuan wrote: > In function cgroup_migrate_add_src(), if dst_cgrp > equals to src_cgroup which the tasks link, dont > go on migrating tasks to another css_set. Do you have an example which operations lead to this situation? > This can save the cost of unnecessary migration. How much are the savings visible? (Note, I suspect the shortcut on `src_cgrp == dst_cgrp` might not be always correct when called from cgroup_update_dfl_csses() but not 100% sure now.) Thanks, Michal