From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013030.outbound.protection.outlook.com [52.101.72.30]) (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 50409368970 for ; Thu, 26 Feb 2026 17:35:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.72.30 ARC-Seal:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772127320; cv=fail; b=kGq8kotltmaAgAjOK+ziEle1GSYwVkMk6FFLlZsLWYRA+fQ66D2d++ujOH3zgPHoYI3UcAMO1tnO8cKV71egSly2oT0bMdYdRNxyyOFrL46/Xo19MyA7m8aJh5/8CXu8Gl9NsoCGzyHqe3giL3kakZt7896KTaNjxOlld7RKnUI= ARC-Message-Signature:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772127320; c=relaxed/simple; bh=VVPwiljOhIElgXnXH6Wq454IKOMH8ToxbwX+3ZBQFOM=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=uPtGO3dsichGjP/HnA86MHnon8Nx+44sKjSXe2m1njrQc/P90j+Dm3cVcz6RtBRmRiQvVKjRjQbrE9yXx5vYYF+lflQjAx4sypb139ejDVLOtLs7BN8WT5kSh2+Hb9rb0G1zdfI8aY1tO0CPKJX/uHnbjrn9GE0b7AMAlztYGeY= ARC-Authentication-Results:i=3; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=cX2CkJQO; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=cX2CkJQO; arc=fail smtp.client-ip=52.101.72.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="cX2CkJQO"; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="cX2CkJQO" ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=vUUqiA5DI2Wyqv9VNLmYCGQN7vRZUYjmvwcf1sDi1qCzyCiqR4VEp2jAvytECh/rupdMKOyiy8OWEfTTl2CRcVPPeCKJXFGQ5clb9EhPOQngXW3EM2B2Gr5Gp7aOCbx2yIwVTYyFiPMwMNiMo/KOQhF4FkMoXLYTg3rgQwPvHQdURBcTJpeqalN5kOMHlw15FdM8tNHnTG9KLL53UlgCxk2sfs7I4JSy+I879/4OVvWOvndCflSHmY7mcmioGotyX6tzfPiONAzoZ6Yt7x2vFsCcnmL1Xpqg8Kvyc2eHCn1hdu8mmNAl3q8/rxZWhYqvxAPscQ4W7M7wvktEFLYLUA== ARC-Message-Signature: i=2; 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=S2zGoyaBUUgs7lgkb9APo0KPq793IrX1MqeGAUXQ07I=; b=wHpj+XU+40zdFU3val59EOSZoHmukIiv7qKDW+TdoaHLHROLPAfAXItRqg8MGpJ2ki67UxdHYclPegGOoq4XFnHnswhMfQ8Y5uHgemx6hKRCvyWvgvrKdEHBUXgxtVHNhwsNcUaAhiEa7pGY/wFYqd69dTtxH40Vwb5xbZvVvJ2svjC5QQqvJPQJJwyN2S8ScfDN31snOc7hAS8G872VKo4obZXPdR0Nuif1kOs/LH073lh/PbNONTH8NwHkvSoZ+/E4iF4Mp4KaGkrBqRYiTcdqBEndGjMf25wppKALxwfsjEHkB8R2LSfTcgFyqUy1jsH8YQMQeztqGgAMH1aRrw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=linaro.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S2zGoyaBUUgs7lgkb9APo0KPq793IrX1MqeGAUXQ07I=; b=cX2CkJQOqHjQ4kLI85fBApmSf6VVKdCV+Jw62ma+LWlnG2Vyj+0eo6YSdDKHDtI2SBcnQqk5d8fvWY122RsihFw6xK6ZL2hjjkonCO9thF4UOxvY3dYHwplBimll24FawOn49mglEKmetWgyS34xMooSaqY9MJEjKztb6IN/XAw= Received: from DUZP191CA0029.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f8::17) by AS1PR08MB7497.eurprd08.prod.outlook.com (2603:10a6:20b:4de::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.14; Thu, 26 Feb 2026 17:35:12 +0000 Received: from DB1PEPF00050A01.eurprd03.prod.outlook.com (2603:10a6:10:4f8:cafe::74) by DUZP191CA0029.outlook.office365.com (2603:10a6:10:4f8::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9632.26 via Frontend Transport; Thu, 26 Feb 2026 17:35:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DB1PEPF00050A01.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9611.8 via Frontend Transport; Thu, 26 Feb 2026 17:35:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=R8ZozCSTQJtnz5ZdOoN6ugvBKGJokfFdoFhMaHIsKPj733N8Ccq6NXTzk502EiOkC6eMCEw25Y+Oz2LlDzVsfnvlc+ZMF8sfaAr4ZrmAHe31nYhfaX8WVE12p9+dQDJ+SF9lpRYPsnLInFgSlaGhYri7ZybWPDpIV+t4XGjg0f01+HKXNhoO0n+sO2OUI+Xb0d3mDRRgviqPtw3OeM51Kb0xh3bgxFM3lNZLP3GgeUqweM3arDFuBvLv1NNWGnIHCmL82gOx5KID+uhWs4R6pjyn//Tm1YaCAvk0bz8hUXibXWwkhi6IXPnHcoO74y11XLlDNmUnHTB79prGYzzIKg== 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=S2zGoyaBUUgs7lgkb9APo0KPq793IrX1MqeGAUXQ07I=; b=T9YS7MbmUsU89KVtigmAx+/3l9bmwzoPE53dX+wk9AfdZZbqc25idur9GLMQMlsbbL8qQy4Q42OQAZZjN33UdFiBRo/DnHmVyN3Y0RcrqoiXf6ZOcclHGCgLcjdvFn6WzrAPeMH3Xlcxg8SGg6t9rTKfMZhr4+OgmGQZ7jq0sBpakUn5IS6bcPtBJC65hCI0tugjLCxX+YdumXsWWnzj0mZMN+1v3pPFFQ1SAD1s2EutKl8HZ5HjY1q8eUrWQZDjh3yvDYGdQWgA+hH1iAgDu+ZX8NjQAMiv+/Ez7/NLOa+0p5TL8Yrr0Z9Xe6VA+zVxKyMek2t/0Dyx733U3LFW6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S2zGoyaBUUgs7lgkb9APo0KPq793IrX1MqeGAUXQ07I=; b=cX2CkJQOqHjQ4kLI85fBApmSf6VVKdCV+Jw62ma+LWlnG2Vyj+0eo6YSdDKHDtI2SBcnQqk5d8fvWY122RsihFw6xK6ZL2hjjkonCO9thF4UOxvY3dYHwplBimll24FawOn49mglEKmetWgyS34xMooSaqY9MJEjKztb6IN/XAw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI0PR08MB10391.eurprd08.prod.outlook.com (2603:10a6:800:20c::6) by AS2PR08MB9476.eurprd08.prod.outlook.com (2603:10a6:20b:60f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9632.23; Thu, 26 Feb 2026 17:34:07 +0000 Received: from VI0PR08MB10391.eurprd08.prod.outlook.com ([fe80::fa6b:9ba8:5c2f:ac91]) by VI0PR08MB10391.eurprd08.prod.outlook.com ([fe80::fa6b:9ba8:5c2f:ac91%4]) with mapi id 15.20.9654.013; Thu, 26 Feb 2026 17:34:06 +0000 Message-ID: <520385b2-545a-4ac7-ae05-06d24845f512@arm.com> Date: Thu, 26 Feb 2026 18:34:04 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/6 v8] sched/fair: Add push task mechanism and handle more EAS cases To: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, kprateek.nayak@amd.com Cc: qyousef@layalina.io, christian.loehle@arm.com References: <20251202181242.1536213-1-vincent.guittot@linaro.org> Content-Language: en-US From: Pierre Gondois In-Reply-To: <20251202181242.1536213-1-vincent.guittot@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PA7P264CA0247.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:371::20) To VI0PR08MB10391.eurprd08.prod.outlook.com (2603:10a6:800:20c::6) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI0PR08MB10391:EE_|AS2PR08MB9476:EE_|DB1PEPF00050A01:EE_|AS1PR08MB7497:EE_ X-MS-Office365-Filtering-Correlation-Id: 06d4f324-e872-483b-65a8-08de755d64c6 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|7416014|1800799024|366016|7053199007|921020; X-Microsoft-Antispam-Message-Info-Original: OizbwG5+W7fSAH6vgOm4Dodoqvv9kibgQ8G2w2IGMyfeRmVkm8qLK6p7Aoa2NZQy5Jg+VV7j2ypWDmZRIjrQ9RWPC3i6lzf+oeTWtZQHpqbFJfmjv16pe4zfrGNZmpngw8Ogdvt/8kQBr5TM/QNSPe6BPiTLEjElxRSGXnor+zlCR5Y+J00tihyKPflFlKR9Ghim2md93lN7bdpFkui+tIYf9clUE2gMu3ozB9xpUo+mvpjBHoCgM9mZGWmcOldAoAm6/N8p+/oN9YvsoIXBBF8W9ujzX1SvNXxQXiKDD0sOd/zSeljj425jhuyGOH8kV90JOkW3s/6d6k3ZXOh6dYKc2ZWOwpkW8JYmrOF9UN7zEW/lZ1tREpbx5ElZU+PFAH98IoXdIeGxi2jzrkPLP6LvhPf526KEuObTMTUZOpYQvv+swDs+ulc5CgnnN0k4fHTvwl1LNBsJmn8ggbSSXWtA926e00ATLWUdgN+uuZ+CddPR4wxT6ToNJwqVR6TLBqd5ODiquznPRNeGXyD7QPBAabLJMwPoTc4hjyiQPyUN5F1Ve++0hNK7HzI0N245vGpKCJ2+8Qgg5h9zACT3QP2P/Dws+RZMv0HZQFrgjglQQ3wGe/fBoiFisOvl/Ms9Zegrp/5tWvBFBu1oF5Hax8hNE5t/8nEpIZbFCc24wV/bOH1SxTXo9ziHYKRyijolpttuh7IJNqCVZrEDq1DanNNlQGegHFue7i9VfnVgCJs= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI0PR08MB10391.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(366016)(7053199007)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9476 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF00050A01.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 18f61fa2-fe40-4dc8-184e-08de755d3dbe X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|14060799003|36860700013|82310400026|1800799024|35042699022|13003099007|921020|7053199007; X-Microsoft-Antispam-Message-Info: wUqbKi2vGHHlIwXDK2K/4w9kVKVgyGT2vmFFH7GFVf6liHN+fKKtw49c4i4FjSbpig2/V1IRhhj9UGMhUdUWwolx42Orf1TP/KpK5rOy1hjOQCYvaT6DwaEOuaI2U+wL66+j3pclHueSAAty3zbE4wJmIfFJ7uNtlkTLHYWUNU7lZPlH7yDdnei2zcLH6RICaiB/+CLRcVshdXTRM+LmdwUgZz26QiMPjEZnj9ymq+RxqK4ot0esO523tbB10Fpzak4DeQeJLQ2Zc8yPRljOafg1lpwesxgX0NHPInKu9RORBTZPtRSt+Rvnhk+ZsqB9G6mrl3DXyf7LOiSPKhKxpUt+oh19PxI7jzJ1LqfyDhACs9oCOazt7w95Rs8pbKtPbPiVuU6qThrLjMAq4ryzxbhAb0uYAr7Ws1BggDROKl8ADVgq518WA8dhqS/rqEoHKZEv6lqYyOS4+h7LmzAZvBKXdb1w4qQks8qRMAzBj/LQNjUMrklw0Rs3HKX2ASQvOHXNlmXE6nHws3olpJ8O5bYGR8ooPyZXPr7LXJkvRhefJdjVLQVpzndbRVUs2D9nUL2F68VRPU7J4iSA1qeeb7zDEFBP/2OJ2/MxZIBJlOmk/8y6jz9l5FxWr/4fL7KhhVDVnEjSRgMtqzy+1F8mVMxjUXFvyb30poxU8YTO2dEL0yeZM4kwapr1w5mBSQobQEi3gr2UOI0jI6GBsVy67V1t0wlwjED75MTx0NzdEuzrzkjvB6ln+hL52+DxEOQzR52SZM3Epbl/dM4SEaeiEnRge0XVE6vccQK2m6GPQZeoM96flSltd+p3TQlnYBJt X-Forefront-Antispam-Report: CIP:4.158.2.129;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:outbound-uk1.az.dlp.m.darktrace.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(7416014)(14060799003)(36860700013)(82310400026)(1800799024)(35042699022)(13003099007)(921020)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YtZbaM6wVSsEgWfCpve2G+h9aqzXRW1YtokbI31wUGMrJvI4wVxM00zjcg5eAWvFAX5JwdSlFyA8NnJtb+6nXBfektSbFHow6QJtYPbrXL8YM8UjyIUcCbCvUszzOzLYsLdYWcswoQjBwZnZcOVN5YXKBWaR2G7kvhn1h81goW+suFEJ7QabSsBvIuPBWkMZKrgL56ySusx0OcVtCEIM8kd56O+PB4U/P5Rz0YnQBCbd84kqnDrI2J2DokUT8jJK0wW83joTFAH+uDSKwDnoJJXbeVtAyzXZTgTsov3cYJIzOdWqg9wLgfAf3PgvTPbXjxMLw3vUGNufrX2GeapQLB1x4ARQger9doe1pALevn+6gJiXMuRYq51LeQwc4kPsNcIqqvgBNzoptyor2Yxme9FToF09JDZyL+N6PKVxQmjOMgpc7o0YrOPT7jw/Zc+O X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2026 17:35:11.4296 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06d4f324-e872-483b-65a8-08de755d64c6 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[4.158.2.129];Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00050A01.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7497 On 12/2/25 19:12, Vincent Guittot wrote: > This is a subset of [1] (sched/fair: Rework EAS to handle more cases) > > [1] https://lore.kernel.org/all/20250314163614.1356125-1-vincent.guittot@linaro.org/ > > The current Energy Aware Scheduler has some known limitations which have > became more and more visible with features like uclamp as an example. This > serie tries to fix some of those issues: > - tasks stacked on the same CPU of a PD > - tasks stuck on the wrong CPU. Following some other comments I think, I'm not sure I understand the use case the patchset tries to solve. - If this is for UCLAMP_MAX tasks: As Christian said (somwhere) the utilization of a long running task doesn't represent anything, so using EAS to do task placement cannot give a good placement. The push mechanism effectively allows to down-migrate UCLAMP_MAX tasks, but the repartition of these tasks is then subject to randomness. On a Radxa Orion: - 12 CPUs - CPU[1-4] are little CPUs with capa=290 - using an artificial EM Running 8 CPU-bound tasks with UCLAMP_MAX=100, the task placement can be: - CPU1: 6 tasks - CPU2: 1 task - CPU3: 1 task - CPU4: idle The push mechanism triggers feec() and down-migrate tasks to little CPUs. However doesn't balance the ratio of (load / capacity) between CPUs as the load balancer could do. So the above placement is correct in that regard. Another point is that it is hard to reason about what a 'fair' task placement is for UCLAMP_MAX tasks as their throughput is limited on purpose. The previous version of your patchset was trying to solve that issue, but IMO this issue is inherent to UCLAMP_MAX setting. EAS doesn't consider load during the task placement as all tasks are supposed to be ~periodic and have wake-up events. CPUs are also supposed to have some idle time, which guarantees that tasks are never really starving, but UCLAMP_MAX contradicts this assumption. With: - Task[0-1]: NICE=-19, cpumask = CPUA,CPUB - Task[2-3]: NICE=20, cpumask = CPUA,CPUB The following task placement: - CPUA: Task0 + Task1 - CPUB: Task2 + Task3 is fine for EAS, but sched_balance_find_dst_cpu() would do: - CPUA: Task0 + Task2 - CPUB: Task1 + Task3 to balance the load, which is more 'fair'. ------------ - If this is to have better energy results by running feec() more often You say later in  the cover letter that other numbers would come later, so I m curious to see the improvement. Also I think that Christian mentioned somewhere the fact that feec() is subject to concurrency. I quickly got some numbers and didn't see a huge increase of concurrent decisions with the push mechanism, but this indeed seems like something to worry about. feec() is costly to run. I don't have any numbers to provide. ------------ - If this is to bail out of the OU state faster by migrating tasks to idle CPUs or running feec() before a CPU is considered as overutilized I can understand this point. When testing the patches, it seemed that an inflating task still triggered the OU state. Indeed other CPUs are going through a load balance through: sched_balance_find_src_group() \-update_sd_lb_stats   \-set_rd_overutilized() and trigger the OU state, or through: task_tick_fair() \-check_pushable_task()   \-if (rq->nr_running > 1) -> return False \-check_update_overutilized_status() Also task_stuck_on_cpu() checks whether a single task fills the CPU capacity, not whether the CPU utilization reaches the 80% threshold. So I didn't see that much improvement on the OU front. However as Qais noted, the load balancer is effectively quite slow to migrate misfit tasks. The patchset runs some checks on each sched tick and each time a rq switches to another task. If the goal was to: - non-EAS: push misfit tasks quickly - EAS: avoid going in the OU state this would already be a great improvement. I assume this would also allow to remove the misfit handling code in the load balancer. This would also mean extending the push mechanism to all HMP systems, not just EAS-enabled systems. ------------ Summary: - IMO UCLAMP_MAX tasks will always be an issue for EAS. Even if these tasks were down-migrated, other issues would come up - I'm interested in seeing energy consumption improvement numbers, or other performance numbers. - Following Qais (IIUC), the push mechanism could be useful to improve misfit task migration latency and avoid going in the OU state. I tried to do some modifications in that sense and didn't see any show stopper so far. This would also allow to remove some code in the load balancer. > > Patch 1 fixes the case where a CPU is wrongly classified as overloaded > whereas it is capped to a lower compute capacity. This wrong classification > can prevent periodic load balancer to select a group_misfit_task CPU > because group_overloaded has higher priority. > > Patch 2 removes the need of testing uclamp_min in cpu_overutilized to > trigger the active migration of a task on another CPU. > > Patch 3 prepares select_task_rq_fair() to be called without TTWU, Fork or > Exec flags when we just want to look for a possible better CPU. > > Patch 4 adds push call back mecanism to fair scheduler but doesn't enable > it. > > Patch 5 enable has_idle_core for !SMP system to track if there may be an > idle CPU in the LLC. > > Patch 6 adds some conditions to enable pushing runnable tasks for EAS: > - when a task is stuck on a CPU and the system is not overutilized. > - if there is a possible idle CPU when the system is overutilized. > > More tests results will come later as I wanted to send the pachtset before > LPC. > > I have kept Tbench figures as I added them in v7 but results are the same > with the correct patch 6. > > Tbench on dragonboard rb5 > schedutil and EAS enabled > > # process tip +patchset > 1 29.3(+/-0.3%) 29.2(+/-0.2%) +0% > 2 61.1(+/-1.8%) 61.7(+/-3.2%) +1% > 4 260.0(+/-1.7%) 258.8(+/-2.8%) -1% > 8 1361.2(+/-3.1%) 1377.1(+/-1.9%) +1% > 16 981.5(+/-0.6%) 958.0(+/-1.7%) -2% > > Hackbench didn't show any difference > > Changes since v7: > - Rebased on latest tip/sched/core > - Fix some typos > - Fix patch 6 mess > > Vincent Guittot (6): > sched/fair: Filter false overloaded_group case for EAS > sched/fair: Update overutilized detection > sched/fair: Prepare select_task_rq_fair() to be called for new cases > sched/fair: Add push task mechanism for fair > sched/fair: Enable idle core tracking for !SMT > sched/fair: Add EAS and idle cpu push trigger > > kernel/sched/fair.c | 350 +++++++++++++++++++++++++++++++++++----- > kernel/sched/sched.h | 46 ++++-- > kernel/sched/topology.c | 2 + > 3 files changed, 345 insertions(+), 53 deletions(-) >