From nobody Fri Nov 29 00:49:34 2024 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 674E4175D53 for ; Thu, 26 Sep 2024 02:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727316971; cv=none; b=ME38w2ojbZ+RyDw5HMnOYW9hga6hL7bx1+kf0/jqXqcKXSXFBTqJYWBuF7ABVJOfycUan5iRRn76V0WZoEyz8qI9jNjLEazbaKXHajqNQvKLvBcAhtAK1FoyGPxxlpSTXB33XRAIDzgGVYZGQ6EYwT1qsAhptOUdcMe4rgfaQoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727316971; c=relaxed/simple; bh=FDzYbjk3yqF+YjjFeGBKtj51p0ETpQmwdyfhHAZQ4CM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Wd2d2jntKqhIXyLu5BB1wiZhrHOjwtAfoK2kaMlLeqlojYgZ+a+KwnBYLYvZB19aSrKNW2MmzaTiAw3ytEPrqomNzsUHS+nI1oNdK5XZSTix/RCnGvbZmfEVDBuqF9jC6VQArPKG2GFNAb0XGFI8hFlrB1TAm0jWEUYhMi2axO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.255 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4XDccJ0vC8z1T7tm; Thu, 26 Sep 2024 10:14:40 +0800 (CST) Received: from kwepemg200007.china.huawei.com (unknown [7.202.181.34]) by mail.maildlp.com (Postfix) with ESMTPS id E9CD8140258; Thu, 26 Sep 2024 10:16:05 +0800 (CST) Received: from huawei.com (7.223.141.1) by kwepemg200007.china.huawei.com (7.202.181.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 26 Sep 2024 10:16:04 +0800 From: Zhang Qiao To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Tejun Heo , David Vernet CC: , Subject: [PATCH 1/2] sched/ext: Fix unmatch trailing comment of CONFIG_EXT_GROUP_SCHED Date: Thu, 26 Sep 2024 10:15:04 +0800 Message-ID: <20240926021506.340636-2-zhangqiao22@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240926021506.340636-1-zhangqiao22@huawei.com> References: <20240926021506.340636-1-zhangqiao22@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemg200007.china.huawei.com (7.202.181.34) Content-Type: text/plain; charset="utf-8" The #endif trailing comment of CONFIG_EXT_GROUP_SCHED is unmatched, so fix it. Signed-off-by: Zhang Qiao --- kernel/sched/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 9ee5a9a261cc..66aaca9efa0c 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -588,7 +588,7 @@ struct sched_ext_ops { * Update @tg's weight to @weight. */ void (*cgroup_set_weight)(struct cgroup *cgrp, u32 weight); -#endif /* CONFIG_CGROUPS */ +#endif /* CONFIG_EXT_GROUP_SCHED */ =20 /* * All online ops must come before ops.cpu_online(). --=20 2.33.0 From nobody Fri Nov 29 00:49:34 2024 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FDDE17C988 for ; Thu, 26 Sep 2024 02:16:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727316974; cv=none; b=evQonKiG7Ut4oV7GQiCIho8FcX3xadrAM3gaCbHe+9644pOiF/amlAIALoukAV1bnFcY4ZH5xDdRdStCh5iYq3QnwjFj+SowEjT3gnq2THtZ53cK3lZRJX2tnfsZZw16dBtycLJc5JV+TNJcuGjqktBZ80u2fk3fr6FqhPpsFHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727316974; c=relaxed/simple; bh=Y4iSYXyazSQtKNPvXRtgCg8jOC+NlZvi40CfIg0ky2k=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uGP/Q+pszYf6RLWJhvHYXO4osUYqJEVzwCTD1PI7FLcWe8vi3Hst2Pix84iJsi7aUr5Wxh4QBCVS1LZazstwSvilaDyf90DVK0Mwl6YfquUn2/ax9ljBnZHy1qmn+ZyB3oaBF48BcOQwalhqX8UluxkZ8fSapEp9c7QiFtTa1NE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4XDcf3166rz1ylxj; Thu, 26 Sep 2024 10:16:11 +0800 (CST) Received: from kwepemg200007.china.huawei.com (unknown [7.202.181.34]) by mail.maildlp.com (Postfix) with ESMTPS id 5C96F1400D5; Thu, 26 Sep 2024 10:16:09 +0800 (CST) Received: from huawei.com (7.223.141.1) by kwepemg200007.china.huawei.com (7.202.181.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 26 Sep 2024 10:16:08 +0800 From: Zhang Qiao To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Tejun Heo , David Vernet CC: , Subject: [PATCH 2/2] sched/ext: Use tg_cgroup() to elieminate duplicate code Date: Thu, 26 Sep 2024 10:15:05 +0800 Message-ID: <20240926021506.340636-3-zhangqiao22@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240926021506.340636-1-zhangqiao22@huawei.com> References: <20240926021506.340636-1-zhangqiao22@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemg200007.china.huawei.com (7.202.181.34) Content-Type: text/plain; charset="utf-8" Use tg_cgroup() to eliminate duplicate code patterns in scx_bpf_task_cgroup(). Signed-off-by: Zhang Qiao --- kernel/sched/ext.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 66aaca9efa0c..eabf8705e1e6 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -7054,15 +7054,8 @@ __bpf_kfunc struct cgroup *scx_bpf_task_cgroup(struc= t task_struct *p) if (!scx_kf_allowed_on_arg_tasks(__SCX_KF_RQ_LOCKED, p)) goto out; =20 - /* - * A task_group may either be a cgroup or an autogroup. In the latter - * case, @tg->css.cgroup is %NULL. A task_group can't become the other - * kind once created. - */ - if (tg && tg->css.cgroup) - cgrp =3D tg->css.cgroup; - else - cgrp =3D &cgrp_dfl_root.cgrp; + cgrp =3D tg_cgrp(tg); + out: cgroup_get(cgrp); return cgrp; --=20 2.33.0