From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 835BDC7618A for ; Mon, 20 Mar 2023 08:28:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbjCTI2l (ORCPT ); Mon, 20 Mar 2023 04:28:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjCTI2f (ORCPT ); Mon, 20 Mar 2023 04:28:35 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045261E2B9 for ; Mon, 20 Mar 2023 01:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=dIdNXCU/aLvOzApGXESpuuj1FgGqE5K1Fy2RDuWW/Es=; b=DKS+7xQzmGL8hSmwD1DubPLAUG li/99I6dodun161Y4nACc2rT0Q0Jb8lTId7VZlT4ZUcA/9/PJjhMPwfMBFNSclUKWKqTzok6Bn0/0 ZK3N7K+JgDhMpl9JmKRyQF8Xta+KgN3SzIVoJLzJh7/zQWPf3pYmNCuhKv0aR+GF4nmNPxmaaAFrF w+sD/NAoQ/cp+eseGETHE/FC5dvsNGkbuUi0lN06DOgBmskLoKjRKqZwbxt/5wOmi5s59CM8iwltz YdEAPVLPcFpYTLV5S41AOLcxsPSLR6Pb6hwGIay+SDJYxzmQmfmrCge4n0EyxyNNTSMBYSEu+fhEU YHoE1+1Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1peAsG-003rfQ-2Y; Mon, 20 Mar 2023 08:28:13 +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 A115B300392; Mon, 20 Mar 2023 09:28:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5FA4A2024966D; Mon, 20 Mar 2023 09:28:11 +0100 (CET) Date: Mon, 20 Mar 2023 09:28:11 +0100 From: Peter Zijlstra To: wuchi Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/core: Reduce cost of sched_move_task when config autogroup Message-ID: <20230320082811.GD2194297@hirez.programming.kicks-ass.net> References: <20230319075643.28312-1-wuchi.zero@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230319075643.28312-1-wuchi.zero@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 19, 2023 at 03:56:43PM +0800, wuchi wrote: > Some sched_move_task calls of autogroup is useless when the > task_struct->sched_task_group isn't changed because of task_group > of cpu_cgroup overlay task_group of autogroup. The overlay key codes > are as follows: > > sched_cgroup_fork->autogroup_task_group->task_wants_autogroup > sched_change_group->autogroup_task_group->autogroup_task_group > > sched_move_task eg: > task A belongs to cpu_cgroup0 and autogroup0, it will always to > cpu_cgroup0 when doing exit. So there is no need to do {de|en}queue. > The call graph is as follow. > > do_exit > sched_autogroup_exit_task > sched_move_task > dequeue_task > sched_change_group > A.sched_task_group = sched_get_task_group > enqueue_task > > So do some check before dequeue task in sched_move_task. No immediate objection; but the $subject seems to suggest you did this for performance reasons, yet there are no performance results in this Changelog. How much does this save under what load?