Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp512650rdb; Fri, 6 Oct 2023 09:49:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFr9exbXz5BP08VTY0jrVL3EtuYy9wUyK/BAJCXkS+6hDofbjgAcPoVttHt+LD6yK7ia8Db X-Received: by 2002:a17:903:4291:b0:1c6:f56:932b with SMTP id ju17-20020a170903429100b001c60f56932bmr7250918plb.37.1696610972270; Fri, 06 Oct 2023 09:49:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696610972; cv=pass; d=google.com; s=arc-20160816; b=XoBNV6D8eOVrwmpY2E/wgT+zA6e2L52XsCT2cEcEhjoaRwgz5kRk+4r13Wsn0IdW14 3PrPAlM47J12/9pUhqmXCRyICb0JF3TjfnTwVjXvqDG2LUlFM525jLZ+nKeUusfl6a8o KzOEY9QNG6I8YIJWTYsiMcpmxWgyK3khEhnJG9HYSEi0j5en4lqh7R39IULPkP9xaZ73 cvYmVhnc7OdTZipIAR7f2DDrAeIJpXilL3ea5V4yFHHNL8JHVvk62TS3svg/8xxlWoBk iD8MbXSeHKvPDJxs7ToaqGXsD4VlutzEu9YOd+GbLtLzQlhCYvmUj0vVu7MEo5Me5uON C0Sg== 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 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id w13-20020a170902e88d00b001c611f285aasi4388349plg.541.2023.10.06.09.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 09:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; 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 23.128.96.31 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 E2AE780843D2; Fri, 6 Oct 2023 09:49:27 -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 S232476AbjJFQtR (ORCPT + 99 others); Fri, 6 Oct 2023 12:49:17 -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 ); 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 ; 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 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-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DWbHc2jnnhtyAvtqIvub2poR7A62Hw1pPmrUVC5VNX3TEb37ge81dVUPFHVq?= =?us-ascii?Q?469zQTsc2Ndra1f8L7T9oHwnS2eFhvGJ7SIFARFcZwOo6P/GSylTRreOehD4?= =?us-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HQyyRjKPxOW8OfZy?= =?us-ascii?Q?QSEs75GnoVLXj2jf0BmEIAOh27OmkrPJCqH0oRQSZDVmUb5umS7tLOIL4T6W?= =?us-ascii?Q?Lw8ym6cahnfw37EkKwjB/n8TwRQ1NPnwdDHdFTFMFIUY6rxzO0KSMF3Y7Olt?= =?us-ascii?Q?sRxYN/zs0BuvP/fYzIOBo7UiAbqbAbqRKV+OpPLSrq4ud9dGaB2BBtvFbRXT?= =?us-ascii?Q?EWmHmGRAJrGyLcaT/5bXUJS0ajIbYU08uJvzIoI6xptaV378GIlKy3ZTjmG3?= =?us-ascii?Q?cCJ9KigTjQbQAi0eighYlWRcr9gp+GcgehXBs9oyQFY6v2R1Shmubt64/GJi?= =?us-ascii?Q?OeWehy0gF/uRyhWD6g6jqDmG3Zc9rt0Izuj0NPnlplZJj4Pp0YmyuvC38+8I?= =?us-ascii?Q?oEDOlgLHC5rzHsYKAztvWktA+zXH12QYSxPfhPopIk4HbWkqSUxRXhyc3rPN?= =?us-ascii?Q?Mcc1hak5YVLQjxTakOlgvAgZPG7WVrN9+I+c8RLJD/SYiRZESCRpvLH5b1EN?= =?us-ascii?Q?hEtCAj6KhkT9ExyRpjFTpM32Fr4msG+K2PiexzZluRIezkqFxhv0azHFhwI7?= =?us-ascii?Q?axlxE7NBmQm57sP4Z/PaOLo0c9FLYwKbFuu9yo6b75SRTODBvJ75uB9gYZx7?= =?us-ascii?Q?jw=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?us-ascii?Q?ZW5eFcOmiZAXBUwHQOQZSDCEOTnehAlJPSI5esXaTDqEX8mHCX7q0QBBmGkx?= =?us-ascii?Q?xNGDhsG6duoc0rDgMdXX2tzk/SXo8B6AaJ0Ylrs3U4tVg3pune9/9nGSGqiz?= =?us-ascii?Q?3UQrbrc78Ucf4ipqCnxn+dcCPlitmeNgnF20TGdySH7OxZ2GtieDCDP8bzt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PlN8N3R8gLsaihk9E9bARFdjqm7a/bVwy56j8gZdT?= =?us-ascii?Q?ZjAiDBt+7sC3M9FcJ1kkIx5gT+eNvcZmg83Ivy3ES7Cw9pUXWCv3hCr6Z8/M?= =?us-ascii?Q?0PW/+iKcgP6geenYIPUJsMxgpdNC8K1yADRBG1TFkRiVkpXyaV7DgqwY0vpR?= =?us-ascii?Q?bsalBkb+j2rBmeCiJoV+25/gp3FCkIGjoI4jSXac707PSeSc0FOiB/XrcyOV?= =?us-ascii?Q?cIaP5Bx48aBox4F5IJ4pbaWVbCGAjkqngRPJQhBG2++EyOJZVjKioLokPmk/?= =?us-ascii?Q?UQ8vzqBO1qAu6TL4ktJmIN0fL4Zp4nsLcd0nZk2RUGioBQ=3D=3D?= 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: 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:28 -0700 (PDT) X-Spam-Level: ** 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 --- 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; -- 2.41.0