Message ID | 20231006164826.335223-1-daniel.m.jordan@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp462347vqo; Fri, 6 Oct 2023 09:49:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTSKdcvF/RpkNDfv8qYD8hYaj1PBC/ccTXF1+/5hhq48011dhVyVQ7BSYaOee9V9sU/s7U X-Received: by 2002:a17:902:700c:b0:1c0:e12e:8e39 with SMTP id y12-20020a170902700c00b001c0e12e8e39mr7781032plk.35.1696610965695; Fri, 06 Oct 2023 09:49:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696610965; cv=pass; d=google.com; s=arc-20160816; b=JArJuWdf6XIwodPiOZy3IJQVTtODSYO5lG+ZstgyxCQRZUvIQQqDGyy03cRShrjicQ oT5tObpEolzQ9Tn2faw9g2pNtoXL00vDJ6llYyhJ++RaoN8UmWPC0ukBzDMczjXxIsiC /fbCKjbiQPThSjI79qIqsBo/Qm7So7msgdlvMDCqmcfPLI+U6Mz7bLuqyEd9c38IIRf5 xSo/IDYjaGxxmwXa7KD/GN13wdVgmDE/iJ09SAAjuY21f92fMApO7l1j+xkdwPVxdC7D 2od7vOBNpcrh9gMqp+fKwuiFxWcB/QJQtia/UaUaMJ+/pvUyIH5/n+nl03YN0GK1xSKa hg/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Nyo/JUteoHWhnrItA+pXfIbkdnBEpDSMID/AHbCFhfI=; fh=mwBXYUk+/7bNUQH4PYrLJeFuUY7rKllAsh5RMPxNJ9s=; b=SO40EpeaUwCCBop+yoDkjNhsnQeX2Z8SkP5tgFEEVqPsmT3RX92NB1yaPi39Ff7CWC i8WVphaV5MOfzGjGH7lBLJGA6enOFXZBx/xDQfDB2FRB52lcFPAoUaXvX9Jj5ys3b9Sb V9Wvhu0/WQDd4r34fMANgqlfpXiklgveiKRcHabtxDiPhalOekVYbSqlqStGQ9L9i+Fg NfOdKUBHSoRYIzaROqGkUKIKHWHb7qHEBSnCTiwOctrksYIwKrw7eTNX+Qk/GdbJCK+3 oKSV968jGcY8kTB2EAB8ciVT7lyRiMmSxVCfMe1mkT7uhqpLP3CfoRi0/4fSCKB8BDEy qAwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=epsZIgRi; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=A8Ry1XHF; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id kc5-20020a17090333c500b001c589ba4a08si3799192plb.1.2023.10.06.09.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 09:49:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=epsZIgRi; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=A8Ry1XHF; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6055E80AC359; Fri, 6 Oct 2023 09:49:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232592AbjJFQtS (ORCPT <rfc822;ezelljr.billy@gmail.com> + 18 others); Fri, 6 Oct 2023 12:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjJFQtQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Oct 2023 12:49:16 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65FAAC2 for <linux-kernel@vger.kernel.org>; Fri, 6 Oct 2023 09:49:14 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 396Cc2C5015185; Fri, 6 Oct 2023 16:48:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Nyo/JUteoHWhnrItA+pXfIbkdnBEpDSMID/AHbCFhfI=; b=epsZIgRiHs5pZfkNzM0215gcTdTARVXwxvTUr1SfuGKe0vWz70HAFcmhEiyKBT5l2YCz ZF3JFB7CRJ3n77vMw72ZMJRydhoV02b72Ds64tlFwsYLt+PrE2u+aOjY139vSKGxg4do K1tI5jlrKhqLL7izsFPRfLMJYmis3LyRHabwXYCIh/bTheO9ZF1ZF+Jdk5cHOUIQT5wb TJ0dSqJPtSQToFx3ddyjsQN0zGJB1RsOet9N2fqGyVj/YyUwkp6M8FvudBjaObv8Uvh8 mDS1k0/YjquPmKaVinFFx1s2V1ivsLYAztikOM7R11AZ46bLu1SN3NiZ78gw0stekmO4 MA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3tebqe4d10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Oct 2023 16:48:33 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 396FfNln000395; Fri, 6 Oct 2023 16:48:32 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3tea4auk6y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Oct 2023 16:48:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sb49YqYsSpILg8ShccJcJrbs/s597QYLY0sPxQquACqSxHfrTb+9/JxLzzWLIlQOKbLoPxM9I/Av0BsR7znJei3X3DaYeik8QMuOfB76bXaaQjLatYYhElaGDRLMTHzYtkki+rufzSB3YSTuFIJuiX1R4ieqHm+tCXxSJu8m1t6q1SOuPS3XvL+DLiM4VmL3huropIjq9gEqBNmLzTjKOqHjt8q3/GQR1BULJ8ZDi10F8dL+lxyi6mGwqgKSSBgfhIpmBk4kWNHGmj0432XF8Rw7/EDnKjU1LbAo8VbFF6bsjVBf3VrHQdM2Js2x1/6mG7IUdPMGFDBaJskfCYFI3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Nyo/JUteoHWhnrItA+pXfIbkdnBEpDSMID/AHbCFhfI=; b=D+FHxMg7+Pa56gPYROpJwWZEool0LnA9pWteVVIOBrQCEuj6PLh8LuZJs+ckVKZa8u/u+ILMLap6aJuiTr2PCzyHWO4v/VR/LuFiOBoWpM6mfZRfSilJEXm9fXNXw3P72yacGQZcfL0kT9O9/zVDNvHuk5ErLPdgG7k1yzCrhXR3O88CkzXXsykzntZz0Ob9RWe5NoroiJ9sUaAx6J3U0YHS4S2W7EoWHy31XZyPOFf4VSPd3zFQCk19vmn1hi6DKyOXBnQWLpkAc76CSPYcQ1WYnosL1zr3jHj+Be6KQyXd3piD7Xo81VDsi0bTWycIMzW8X2uDRYO0YOLpO4fO2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Nyo/JUteoHWhnrItA+pXfIbkdnBEpDSMID/AHbCFhfI=; b=A8Ry1XHFwn2GGAbXCCXBCC8B47yj+a5oo5vI83ldCGw5YtDCtFjIqaabBTVytm5WG8dA9iLh6Z4w5aZS7T7Ub6KSQ/0VrquLAZewjeC0fVnZQPjek7UqPclqpU/EJ2p0Mf9I3lOH5z35Tu2TQtODDevCG+jmhtDc/hDGtyeGu5w= Received: from SA1PR10MB5711.namprd10.prod.outlook.com (2603:10b6:806:23e::20) by BL3PR10MB6115.namprd10.prod.outlook.com (2603:10b6:208:3ba::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.30; Fri, 6 Oct 2023 16:48:29 +0000 Received: from SA1PR10MB5711.namprd10.prod.outlook.com ([fe80::1aa1:e3a9:cfdd:f48]) by SA1PR10MB5711.namprd10.prod.outlook.com ([fe80::1aa1:e3a9:cfdd:f48%4]) with mapi id 15.20.6792.026; Fri, 6 Oct 2023 16:48:29 +0000 From: Daniel Jordan <daniel.m.jordan@oracle.com> To: peterz@infradead.org Cc: bristot@redhat.com, bsegall@google.com, chris.hyser@oracle.com, corbet@lwn.net, dietmar.eggemann@arm.com, efault@gmx.de, joel@joelfernandes.org, joshdon@google.com, juri.lelli@redhat.com, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@kernel.org, patrick.bellasi@matbug.net, pavel@ucw.cz, pjt@google.com, qperret@google.com, qyousef@layalina.io, rostedt@goodmis.org, tglx@linutronix.de, tim.c.chen@linux.intel.com, timj@gnu.org, vincent.guittot@linaro.org, youssefesmat@chromium.org, yu.c.chen@intel.com, daniel.m.jordan@oracle.com Subject: [PATCH] sched/fair: Always update_curr() before placing at enqueue Date: Fri, 6 Oct 2023 12:48:26 -0400 Message-ID: <20231006164826.335223-1-daniel.m.jordan@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230531124604.068911180@infradead.org> References: <20230531124604.068911180@infradead.org> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR04CA0014.namprd04.prod.outlook.com (2603:10b6:208:d4::27) To SA1PR10MB5711.namprd10.prod.outlook.com (2603:10b6:806:23e::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR10MB5711:EE_|BL3PR10MB6115:EE_ X-MS-Office365-Filtering-Correlation-Id: 491913fd-1e0e-4c0a-068e-08dbc68c112e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jXiLwbaVG1AnztI6Yzev3xvv9WPbNkDfkFReATEuVEn481QZN7HtdLSGmcz/EFkfLgpt6ONKES9KGotbsBhlsrW9qBZDz95BfXkKhfMIdAH5nxLoPJrgDUMwEKPqS2qE8aqwUJWX1IdmJrFpwqtyLVoXCR6v046jwWSWzD2M7L2w8BYnTLIUJdoWHXh5lwvMoBY2LMeqsprty2vBXaU63b6I8vSgVKVcWaZjKy9YfqVk2/ZCBSgrgTQZqlAdcSaFwTk2/8NJU1sY3Ohc0qKIruDEvUhICYtNMHJdS+PxUQO+EsL/w7JMbDYr4mG1zLMWBRLLD9ZME1sx+tlu6xj3q9BScHLpGrJyd9YJ03jwNY7vdVJMdUig82427fsK+MvO9J7FRILDYahUioUQcJcMG8pbPB5AVHdUR06kLNEivMKeVQgj4AGpQHiLQyCs2VUYGctY3w3ZGSatZsHQ2eKEA65CbQg38N8+Yw+Chzc/R4BVA7Cm7NaWAo+juGJls84dhY4CjPrcdvrTCHAp9hfKw9AoTYgmmfDq+Cb8Cti6tO1M5ik6uyDHkALVDjCzu0V9Q8Uk8QcqfNkvRJc5wooK/15uz4CqWqSynmUVRXgpNPE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR10MB5711.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(376002)(366004)(396003)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(2906002)(6506007)(6666004)(15650500001)(478600001)(6486002)(83380400001)(26005)(107886003)(2616005)(7416002)(6916009)(41300700001)(66476007)(4326008)(66946007)(8936002)(5660300002)(316002)(8676002)(36756003)(103116003)(66556008)(38100700002)(86362001)(1076003)(6512007)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange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zuv4IbkiE71rdsNaQ2Myno4NhqdGknSl1S4X1QAHDa3fAwOXgqFNcEkpof/8BnsYCtwUKd8hdBa7iw7FG6r232g4aMsHeMFNZU4xPAcdWA0RudKrMJNBzkdeDrvq2It9avo8SYReq8/qxtpXEB4iVkH7DMfPv5m69XtLjO/2sOv68TPZdEfYzBGUKeMveTGitwZVhYbsVrlWVSD18V+GBcssCjWqsD93SYJhGWQOWY2/8BzgPU1dLVsHQedvT7ijQjlD5tdOEyq2FPQwr9XDc8Eq38a9IsH1Rh0tfawNrdgmrbYBVb95I4g3l1YkUxcH4tpT7Qsfig9X5VvAqaCc6jBcur0IH7QtV8kj5z1FIzKIXGvmdPU4K8UMksCpXvynOx+Hx5jqKkBN7cfK/nOj9ubUMRrF/7Z+r79Ipz0OuR7x8hEg97EhBaOUQoFstzq7FxPlRV8fvGimNl3zZTRvywAGfxtgotwYl6rIT5tq18cfzcPr7E+d+QSW6BK2kvOewAYNr4CSakJHiRNAQFAHTROUusN1VAV8pB8uj+MMZEVLOKE9q85JoHPlNbf8u5qkNStlXK06Mf+vSfOpsrS6yHIHZLFHi8s4Vp5D3l6EhfAbQq0dIKiuzipmJPlN8N3R8gLsaihk9E9bARFdjqm7a/bVwy56j8gZdTZjAiDBt+7sC3M9FcJ1kkIx5gT+eNvcZmg83Ivy3ES7Cw9pUXWCv3hCr6Z8/M0PW/+iKcgP6geenYIPUJsMxgpdNC8K1yADRBG1TFkRiVkpXyaV7DgqwY0vpRbsalBkb+j2rBmeCiJoV+25/gp3FCkIGjoI4jSXac707PSeSc0FOiB/XrcyOVcIaP5Bx48aBox4F5IJ4pbaWVbCGAjkqngRPJQhBG2++EyOJZVjKioLokPmk/UQ8vzqBO1qAu6TL4ktJmIN0fL4Zp4nsLcd0nZk2RUGioBQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 491913fd-1e0e-4c0a-068e-08dbc68c112e X-MS-Exchange-CrossTenant-AuthSource: SA1PR10MB5711.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2023 16:48:29.0661 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cy0iwv6GnHbCbN6ZtSbSSyA+W48BGzzTIvvvwfeXfSm9pQyobDv+ggzOuos5nJQBwyJ4ZKaAg6+Ib3Mtg9dZBbj/KEodgZpGD2/K8o5xk80= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR10MB6115 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-06_12,2023-10-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310060126 X-Proofpoint-GUID: 3J0OmotUmCeBpZKPir8eaWAP6sv-VTcd X-Proofpoint-ORIG-GUID: 3J0OmotUmCeBpZKPir8eaWAP6sv-VTcd X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 06 Oct 2023 09:49:23 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779025539950535641 X-GMAIL-MSGID: 1779025539950535641 |
Series |
sched/fair: Always update_curr() before placing at enqueue
|
|
Commit Message
Daniel Jordan
Oct. 6, 2023, 4:48 p.m. UTC
Placing wants current's vruntime and the cfs_rq's min_vruntime up to
date so that avg_runtime() is too, and similarly it wants the entity to
be re-weighted and lag adjusted so vslice and vlag are fresh, so always
do update_curr() and update_cfs_group() beforehand.
There doesn't seem to be a reason to treat the 'curr' case specially
after e8f331bcc270 since vruntime doesn't get normalized anymore.
Fixes: e8f331bcc270 ("sched/smp: Use lag to simplify cross-runqueue placement")
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
---
Not sure what the XXX above place_entity() is for, maybe it can go away?
Based on tip/sched/core.
kernel/sched/fair.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
Comments
Hello Daniel, I see a good and consistent improvement in Stream (with shorter loops) with this change. Everything else is more or less the same. I'll leave the detailed results below. On 10/6/2023 10:18 PM, Daniel Jordan wrote: > Placing wants current's vruntime and the cfs_rq's min_vruntime up to > date so that avg_runtime() is too, and similarly it wants the entity to > be re-weighted and lag adjusted so vslice and vlag are fresh, so always > do update_curr() and update_cfs_group() beforehand. > > There doesn't seem to be a reason to treat the 'curr' case specially > after e8f331bcc270 since vruntime doesn't get normalized anymore. > > Fixes: e8f331bcc270 ("sched/smp: Use lag to simplify cross-runqueue placement") > Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> o Machine details - 3rd Generation EPYC System - 2 sockets each with 64C/128T - NPS1 (Each socket is a NUMA node) - C2 Disabled (POLL and C1(MWAIT) remained enabled) o Kernel Details - tip: tip:sched/core at commit 3657680f38cd ("sched/psi: Delete the 'update_total' function parameter from update_triggers()") + cherry-pick commit 8dafa9d0eb1a sched/eevdf: Fix min_deadline heap integrity") from tip:sched/urgent + cherry-pick commit b01db23d5923 ("sched/eevdf: Fix pick_eevdf()") from tip:sched/urgent update_curr_opt: tip + this patch o Benchmark Results ================================================================== Test : hackbench Units : Normalized time in seconds Interpretation: Lower is better Statistic : AMean ================================================================== Case: tip[pct imp](CV) update_curr_opt[pct imp](CV) 1-groups 1.00 [ -0.00]( 2.69) 1.01 [ -0.71]( 2.88) 2-groups 1.00 [ -0.00]( 1.69) 1.01 [ -0.62]( 1.40) 4-groups 1.00 [ -0.00]( 1.25) 1.01 [ -1.17]( 1.03) 8-groups 1.00 [ -0.00]( 1.36) 1.00 [ -0.43]( 0.83) 16-groups 1.00 [ -0.00]( 1.44) 1.00 [ -0.13]( 2.32) ================================================================== Test : tbench Units : Normalized throughput Interpretation: Higher is better Statistic : AMean ================================================================== Clients: tip[pct imp](CV) update_curr_opt[pct imp](CV) 1 1.00 [ 0.00]( 0.33) 1.01 [ 0.52]( 1.51) 2 1.00 [ 0.00]( 0.22) 1.00 [ -0.01]( 0.37) 4 1.00 [ 0.00]( 0.25) 0.99 [ -0.71]( 0.60) 8 1.00 [ 0.00]( 0.71) 1.00 [ -0.26]( 0.36) 16 1.00 [ 0.00]( 0.79) 0.99 [ -1.21]( 0.77) 32 1.00 [ 0.00]( 0.94) 0.99 [ -0.82]( 1.46) 64 1.00 [ 0.00]( 1.76) 0.99 [ -0.92]( 1.25) 128 1.00 [ 0.00]( 0.68) 0.98 [ -2.22]( 1.19) 256 1.00 [ 0.00]( 1.23) 0.99 [ -1.43]( 0.79) 512 1.00 [ 0.00]( 0.28) 0.99 [ -0.93]( 0.14) 1024 1.00 [ 0.00]( 0.20) 0.99 [ -1.44]( 0.41) ================================================================== Test : stream-10 Units : Normalized Bandwidth, MB/s Interpretation: Higher is better Statistic : HMean ================================================================== Test: tip[pct imp](CV) update_curr_opt[pct imp](CV) Copy 1.00 [ 0.00](11.88) 1.22 [ 21.92]( 7.37) Scale 1.00 [ 0.00]( 7.01) 1.04 [ 4.02]( 4.89) Add 1.00 [ 0.00]( 6.56) 1.11 [ 11.03]( 4.77) Triad 1.00 [ 0.00]( 8.81) 1.14 [ 14.12]( 3.89) ================================================================== Test : stream-100 Units : Normalized Bandwidth, MB/s Interpretation: Higher is better Statistic : HMean ================================================================== Test: tip[pct imp](CV) update_curr_opt[pct imp](CV) Copy 1.00 [ 0.00]( 1.07) 1.01 [ 0.77]( 1.59) Scale 1.00 [ 0.00]( 4.81) 0.97 [ -2.99]( 7.18) Add 1.00 [ 0.00]( 4.56) 0.98 [ -2.39]( 6.86) Triad 1.00 [ 0.00]( 1.78) 1.00 [ -0.35]( 4.22) ================================================================== Test : netperf Units : Normalized Througput Interpretation: Higher is better Statistic : AMean ================================================================== Clients: tip[pct imp](CV) update_curr_opt[pct imp](CV) 1-clients 1.00 [ 0.00]( 0.62) 0.99 [ -1.03]( 0.24) 2-clients 1.00 [ 0.00]( 0.36) 1.00 [ -0.32]( 0.66) 4-clients 1.00 [ 0.00]( 0.31) 1.00 [ -0.17]( 0.44) 8-clients 1.00 [ 0.00]( 0.39) 1.00 [ 0.24]( 0.67) 16-clients 1.00 [ 0.00]( 0.58) 1.00 [ 0.50]( 0.46) 32-clients 1.00 [ 0.00]( 0.71) 1.01 [ 0.54]( 0.66) 64-clients 1.00 [ 0.00]( 2.13) 1.00 [ 0.35]( 1.80) 128-clients 1.00 [ 0.00]( 0.94) 0.99 [ -0.71]( 0.97) 256-clients 1.00 [ 0.00]( 6.09) 1.01 [ 1.28]( 3.41) 512-clients 1.00 [ 0.00](55.28) 1.01 [ 1.32](49.78) ================================================================== Test : schbench Units : Normalized 99th percentile latency in us Interpretation: Lower is better Statistic : Median ================================================================== #workers: tip[pct imp](CV) update_curr_opt[pct imp](CV) 1 1.00 [ -0.00]( 2.91) 0.97 [ 2.56]( 1.53) 2 1.00 [ -0.00](21.78) 0.89 [ 10.53](10.23) 4 1.00 [ -0.00]( 4.88) 1.07 [ -7.32]( 6.82) 8 1.00 [ -0.00]( 2.49) 1.00 [ -0.00]( 9.53) 16 1.00 [ -0.00]( 3.70) 1.02 [ -1.75]( 0.99) 32 1.00 [ -0.00](12.65) 0.83 [ 16.51]( 4.41) 64 1.00 [ -0.00]( 3.98) 0.97 [ 2.59]( 8.27) 128 1.00 [ -0.00]( 1.49) 0.96 [ 3.60]( 8.01) 256 1.00 [ -0.00](40.79) 0.80 [ 20.39](36.89) 512 1.00 [ -0.00]( 1.12) 0.98 [ 2.20]( 0.75) ================================================================== Test : ycsb-cassandra Units : Normalized throughput Interpretation: Higher is better Statistic : Mean ================================================================== metric tip update_curr_opt (%diff) throughput 1.00 1.00 (%diff: -0.45%) ================================================================== Test : ycsb-mondodb Units : Normalized throughput Interpretation: Higher is better Statistic : Mean ================================================================== metric tip update_curr_opt (%diff) throughput 1.00 1.00 (%diff: -0.13%) ================================================================== Test : DeathStarBench Units : Normalized throughput Interpretation: Higher is better Statistic : Mean ================================================================== Pinning scaling tip update_curr_opt (%diff) 1CCD 1 1.00 1.01 (%diff: 0.57%) 2CCD 2 1.00 1.00 (%diff: -0.27%) 4CCD 4 1.00 1.00 (%diff: 0.06%) 8CCD 8 1.00 1.00 (%diff: 0.45%) -- Feel free to include Tested-by: K Prateek Nayak <kprateek.nayak@amd.com> I'll keep a lookout for future versions. > --- > > Not sure what the XXX above place_entity() is for, maybe it can go away? > > Based on tip/sched/core. > > kernel/sched/fair.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 04fbcbda97d5f..db2ca9bf9cc49 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -5047,15 +5047,6 @@ static inline bool cfs_bandwidth_used(void); > static void > enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) > { > - bool curr = cfs_rq->curr == se; > - > - /* > - * If we're the current task, we must renormalise before calling > - * update_curr(). > - */ > - if (curr) > - place_entity(cfs_rq, se, flags); > - > update_curr(cfs_rq); > > /* > @@ -5080,8 +5071,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) > * XXX now that the entity has been re-weighted, and it's lag adjusted, > * we can place the entity. > */ > - if (!curr) > - place_entity(cfs_rq, se, flags); > + place_entity(cfs_rq, se, flags); > > account_entity_enqueue(cfs_rq, se); > > @@ -5091,7 +5081,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) > > check_schedstat_required(); > update_stats_enqueue_fair(cfs_rq, se, flags); > - if (!curr) > + if (cfs_rq->curr != se) > __enqueue_entity(cfs_rq, se); > se->on_rq = 1; > -- Thanks and Regards, Prateek
On Fri, Oct 06, 2023 at 09:58:10PM +0200, Peter Zijlstra wrote: > On Fri, Oct 06, 2023 at 12:48:26PM -0400, Daniel Jordan wrote: > > Placing wants current's vruntime and the cfs_rq's min_vruntime up to > > date so that avg_runtime() is too, and similarly it wants the entity to > > be re-weighted and lag adjusted so vslice and vlag are fresh, so always > > do update_curr() and update_cfs_group() beforehand. > > > > There doesn't seem to be a reason to treat the 'curr' case specially > > after e8f331bcc270 since vruntime doesn't get normalized anymore. > > > > Fixes: e8f331bcc270 ("sched/smp: Use lag to simplify cross-runqueue placement") > > Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> > > --- > > > > Not sure what the XXX above place_entity() is for, maybe it can go away? > > > > Based on tip/sched/core. > > > > kernel/sched/fair.c | 14 ++------------ > > 1 file changed, 2 insertions(+), 12 deletions(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 04fbcbda97d5f..db2ca9bf9cc49 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -5047,15 +5047,6 @@ static inline bool cfs_bandwidth_used(void); > > static void > > enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) > > { > > - bool curr = cfs_rq->curr == se; > > - > > - /* > > - * If we're the current task, we must renormalise before calling > > - * update_curr(). > > - */ > > - if (curr) > > - place_entity(cfs_rq, se, flags); > > - > > update_curr(cfs_rq); > > IIRC part of the reason for this order is the: > > dequeue > update > enqueue > > pattern we have all over the place. You don't want the enqueue to move > time forward in this case. > > Could be that all magically works, but please double check. Yes, I wasn't thinking of the dequeue/update/enqueue places. Considering these, it seems like there's more to fix (from before EEVDF even). Sorry for the delayed response, been staring for a while thinking I'd have it all by the next day. It'll take a bit longer to sort out all the cases, but I'll keep going.
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 04fbcbda97d5f..db2ca9bf9cc49 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5047,15 +5047,6 @@ static inline bool cfs_bandwidth_used(void); static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) { - bool curr = cfs_rq->curr == se; - - /* - * If we're the current task, we must renormalise before calling - * update_curr(). - */ - if (curr) - place_entity(cfs_rq, se, flags); - update_curr(cfs_rq); /* @@ -5080,8 +5071,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) * XXX now that the entity has been re-weighted, and it's lag adjusted, * we can place the entity. */ - if (!curr) - place_entity(cfs_rq, se, flags); + place_entity(cfs_rq, se, flags); account_entity_enqueue(cfs_rq, se); @@ -5091,7 +5081,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) check_schedstat_required(); update_stats_enqueue_fair(cfs_rq, se, flags); - if (!curr) + if (cfs_rq->curr != se) __enqueue_entity(cfs_rq, se); se->on_rq = 1;