From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazon11010071.outbound.protection.outlook.com [40.93.198.71]) (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 8780737C91C for ; Tue, 16 Jun 2026 03:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.198.71 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781581953; cv=fail; b=Mqs2Llw9eWKuX3Wc4yJuNEEjE8rhR7ANBb0wMDNhuT+iNk52SDiaBx9VgpEMJz8nDBOzXmPIEvwqRcTdzOIX/hZ/UbNsIxGLKuDA1Gx8OKT6E7gkIq7G+lJ8/OdIlX9oJ0LEdbZzP4QPlAUMcxe1F1IXABjB53l5J/EVPfIF4BQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781581953; c=relaxed/simple; bh=gTupq1vAAd51QGg/GCw9F8SC517CtjJpdxAzJtJjqQg=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=CGDmMGYkZ+jqZ92RB/5yqUJiaZV4qvLS14nTCBeVlJ4rKXTazJA+yAIDqVrjLcnYhTPNGd4b6I3eAntAIYfDhA5QkQWYIkycpaLOY2wqirSqMJK+csdB58EIdIillH7Zw97hqOvCx18D/ipnk1AJc/1c0+vOwwczu3cyQt4sL3U= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=0SHi8pjf; arc=fail smtp.client-ip=40.93.198.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="0SHi8pjf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qcZNWnR6YhxuHXzp0XZP9ROqA0IWkTl24r3v+gWAt7Irvo0L1nkj4lW++wnBY/vtdQ4F60p5m4RR536QqmF0/+34D6OfAR0ATMNadYA8WCYm65NCoMpxW1tmqpjaEPKD1KUCQfn97Sw0FOE9s/SMw+tmBoH1xHWsfgbRrpBAuI68Wi3DMsNDPXMUhtR2RZsu3pElIOmaxDvCSu0lNc7cWRiIwhfvxSi3oRg25h7rVebivRBawswlwXsGzjlJojxPfKWmygxjLPiuI3OOW1bGxrW5780vRwH6ZcqHt2ZduYM3cxKL7H7C8buUWGyzt6E1KNbArblvk02a+H1hCA3zrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=c7s/F1p34N2FgeG7YGlIbYFTihaEzA0gofsIK9uiEXM=; b=s9vLXxx++B7menrVg4MfMkmh3yKT8JvOFSK42DgkFV6e7pfXSBQkC2wynWVJDomitrvTiJFUsUt4FGICdTVQ8XYVi2Idaemf5ICuGPRPaXsuicghsTH0Dmw/8FBjhmsdilIoiukr55AHiabhsy4Mjk99YADAWLPiV+e25Ge0z87bwG2dmcj/MEDCduM7KnlLZtQ/INYiB1+7uUY+yQTrVrQ6+TebqGktUuNV0on8/QzeAFCxvNb6VtMAm4set+FII4ZJccRJGgfI6tih5jdovWaonOo8P1sZuFFouZ6NCfC3/5pk8qLAeP7lbe09AQPDTRyiOXZtff235+3uySQw6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c7s/F1p34N2FgeG7YGlIbYFTihaEzA0gofsIK9uiEXM=; b=0SHi8pjfL5CBYs8ZboBcgkQiG7uIevvF1OfP8evGm14twb4/Q/RFeC68QiDUoDy7P4WW1r2WqUchFC4taYjmilT/clM1470+C+II1eoCVtAcZi7fUGOS2EMeQVE8vrquILgablQYzSCnvOIpMYleIO5XnYp1R4DcXgln87xaJqg= Received: from DS7PR03CA0127.namprd03.prod.outlook.com (2603:10b6:5:3b4::12) by BL1PR12MB5897.namprd12.prod.outlook.com (2603:10b6:208:395::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.113.18; Tue, 16 Jun 2026 03:52:27 +0000 Received: from CY4PEPF0000FCC5.namprd03.prod.outlook.com (2603:10b6:5:3b4:cafe::2e) by DS7PR03CA0127.outlook.office365.com (2603:10b6:5:3b4::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.113.18 via Frontend Transport; Tue, 16 Jun 2026 03:52:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by CY4PEPF0000FCC5.mail.protection.outlook.com (10.167.242.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.139.8 via Frontend Transport; Tue, 16 Jun 2026 03:52:27 +0000 Received: from Satlexmb09.amd.com (10.181.42.218) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 15 Jun 2026 22:52:26 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb09.amd.com (10.181.42.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 15 Jun 2026 20:52:26 -0700 Received: from [10.136.46.240] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Mon, 15 Jun 2026 22:52:23 -0500 Message-ID: Date: Tue, 16 Jun 2026 09:22:17 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/6 v2] sched/eevdf: Take into account current's lag when updating slice protection To: Vincent Guittot , , , , , , , , , , References: <20260615162420.420957-1-vincent.guittot@linaro.org> <20260615162420.420957-3-vincent.guittot@linaro.org> Content-Language: en-US From: K Prateek Nayak In-Reply-To: <20260615162420.420957-3-vincent.guittot@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC5:EE_|BL1PR12MB5897:EE_ X-MS-Office365-Filtering-Correlation-Id: e40163a8-a3f7-494a-6bf6-08decb5aaeee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|7416014|376014|36860700016|82310400026|1800799024|921020|56012099006|11063799006|4143699003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: Bvhq4yfb9zpEn4kpjdBEi8F71z20nkD9Ea04tRHhPoya6nPO2QZihv0hdY7YQtpMaMlIsm2epjU5EGFifu+rdtH15bp2RwkdFijp6Fuw5/DrAitc/eqVbOsRSSjA/Ts+XvkTVnZakVzLvMvbnO/mD2XK9Aqk3t6rp1G2AhaAV2PdJ4zrOLt32ksu78gMpPkEcjEUqmsBmXb0km1FtQ8Kr4PG1s7OrVDfW8bSoZBJcs9LpcRDd6PVFKLHWtW8RBg99cEFczx4TczrWmrLrhbldnLZl9OjlswvTi1lwCOozVb9f5orHp0Bk2x1lbKu6l7fN/j3edgNBL9oMYl4FPHUTKpCcVWosnK4/JSjPLosv+VNxfyM7zFnXJTU3suN4tCCyHie5rDzPzilTwPeAhc4hdDfJkYyGATKf8PXjDWZ4eWdTp4hdxrtZgMWwPC3EQJCqRePHOD8ynZUQXPXKvtVD6z1d23pbvnC3isnY8zgs2fT7Omw4aQdg1pCLtusYtdEdPU6YMKxGUDN28Epwm+pCAG8V06iADwQ8ANb/nUIaaa80YbMhen9bX/01XuXXc/hPw4KHc1h5IMAcEfHrVXgc+8scCbcGyrMDdWQ6MLEX+1e/pNv44cyroWmub+nG30c0pAbmhCn00R2zBCCJDQArhj/y2WMz9g9Sz0Ct9DrtMtx6kK8Kq1KqYsdm9VOKkv/FeY/t1h0kGMbrWS8YRcwxfB8u/HzwHt7LxeQx4sdfxnBWPk3Td2gpfNExdMo2qzXILJtnuN9R9EbZlvi4FugAQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(23010399003)(7416014)(376014)(36860700016)(82310400026)(1800799024)(921020)(56012099006)(11063799006)(4143699003)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: h3sMu7grE8DJf3CleCPjVzfAGqoyOp+KOlSmobEGXoHgeSKK3ZTuJKE3YW0HDNs/ROe0S1DmRN4PDi2hXOBT21GGwg1peVnoO/wIpRjKiDLBiD/GMe3RjrkWSPT9nHwoRSBYhOmw+znVdH1/AlUp7Eiy7DEJpZOW/2sFKUbtS8GPhQ713CfLhPWWSVLSIbz6rHjo7E92JLcXpxYbYpytj43Ox56insaT+mfTPI2gV1X1aGdTWMRkc60+GlNJY+IKsJChJ6Q/ALiMa4jpJ1UWs4lVDVTMlLA8yCCNVndfZ9SDC3bD99PnLMfT/hnMgYv76G+rWDW1QYi68hzUHgEbRjPJBVENEY4IlmKLFpSMKmwIyJVsHsAs4jfNnHQe29cjcTACOHC34gzOYWcAfLaIlCyQLuAod0WuVhDMjCHJXkXi8q05dvsqg2ZfeePNT/Sw X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2026 03:52:27.4660 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e40163a8-a3f7-494a-6bf6-08decb5aaeee X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC5.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5897 Hello Vincent, On 6/15/2026 9:54 PM, Vincent Guittot wrote: > @@ -1083,6 +1083,7 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) > */ > static inline void set_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) > { > + u64 vruntime = min_vruntime(se->vruntime, avg_vruntime(cfs_rq)); set_protect_slice() is only called for set_next_entity(... first = true) which has to come from the pick where the entity has to be eligible and behind the avg_vruntime(cfs_rq) right? Is there a case where se->vruntime is ahead of the average here that I'm missing? > u64 slice = normalized_sysctl_sched_base_slice; > u64 vprot = se->deadline; > > @@ -1090,8 +1091,8 @@ static inline void set_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity > slice = cfs_rq_min_slice(cfs_rq); > > slice = min(slice, se->slice); > - if (slice != se->slice) > - vprot = min_vruntime(vprot, se->vruntime + calc_delta_fair(slice, se)); > + if (vruntime != se->vruntime || slice != se->slice) > + vprot = min_vruntime(vprot, vruntime + calc_delta_fair(slice, se)); > > se->vprot = vprot; > } -- Thanks and Regards, Prateek