Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp166300lqr; Wed, 5 Jun 2024 02:16:49 -0700 (PDT) X-Forwarded-Encrypted: i=4; AJvYcCXgnZ/VHTLA3hJNWo8ZbWowXOqOKy7yFRNjRrwYSbcRYDGr7SNBJQgDbOectqOnEeNT4W6R0ffvqMDztUXakkSLyh3bgq4rbJjQSm4aqQ== X-Google-Smtp-Source: AGHT+IFztYSbR+bYLHpEq5KDQkFQYSL4t9Pa3oFd1Lh7F9bA49UHGGtT5ddlIspDGDtAPUfFDAZa X-Received: by 2002:a05:6a21:998c:b0:1ac:3b6e:3e4a with SMTP id adf61e73a8af0-1b2b6e59a54mr2286058637.9.1717579009050; Wed, 05 Jun 2024 02:16:49 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c280633751si905659a91.7.2024.06.05.02.16.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 02:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arm.com header.s=selector1 header.b=DrkGuHOc; dkim=pass header.i=@arm.com header.s=selector1 header.b=DrkGuHOc; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-202066-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202066-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2A1422823D1 for ; Wed, 5 Jun 2024 09:15:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDD7E18F2DE; Wed, 5 Jun 2024 09:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="DrkGuHOc"; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="DrkGuHOc" Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2088.outbound.protection.outlook.com [40.107.249.88]) (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 2F8CF49645 for ; Wed, 5 Jun 2024 09:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.88 ARC-Seal:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717578921; cv=fail; b=UkphtJvqiwd1mFlko2KqoD2rMQ4V7pudSBFv2aSnbrJfiGAp/G/ikwHkVctIiZOxpLNtgSoXhIP5M1wdHJtB4yMnNdGUn6F1/bK8v1YFukTJThj+hu3k1EaegIR/EQiG+6zwgoOZM4/XsvTjV5fi7KfXXGoPGj9LjTu25qnrf9w= ARC-Message-Signature:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717578921; c=relaxed/simple; bh=1Fea4MNBUZnI1QqPgnf0usKyc20GL0jpuGfZoW3OKJE=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=APviJ9oRXbkvqkVFNw6oEbMeZJpNIwZuL5VgGNPYKYCw3Ch/Mgvd+bRu4isYfCXd86OmNlXZJzaV5RfQ88MAtrBNl+TxVMGzj4lJebl2i2fDRmnoDHU+HtiQvhMGN1IRgqGIN8VUgMfsqwUziSzC0xpjJ4SSUgFjhsWbfDLAwu4= 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=DrkGuHOc; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=DrkGuHOc; arc=fail smtp.client-ip=40.107.249.88 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 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=gF4glLPnQ+LkhZdhVsK3WZb3Z20KGVN34sThyU61T9b4yQsD0fkJxafi3oK8VbGaPE2H60iKPbyXthb2F7uxUkTySPm0UXRpMX7iBxAljifP+8EhteSHjZx4Inp9q9gTbRwYx+OM9OC6hco63aTB5+mwo7PV0ACd+WmpBzIHuAkp10BmAwPdNiIGfzW1IW8aTeEsyhmFfWpgv9rQhnTHp/yAlsetb/tdxYEgA//+d3zqStfhxwqcXOejMtC0T1ZUcWHjGH/gWwlzhuqxujqXM5jiu5mHy/byA1n+j64FudrdVc76gWPiKOmrU/Xb00kDsWZx9zuFzKrmm26BOdHYfQ== ARC-Message-Signature: i=2; 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=J24h4iGdK2gmb++hGaQmeFdqgb8hYzFHTR1KzTXmgdw=; b=eI88n8AMRizNyK4KHD3eiw0vTBsgrHuqz7NmypUcmPSu94qXl4aaQavPjkzhxQ4VIAVCfoPe/zpRhRyduvLGvNrQHKetncEHtbTaZwKegsgPvVDd+UPBZblz27mnkZY0U9knz8qwwVH2WeVIJGDaGYQbUU+Yanr6ooTyPZa26S19EfV/Nx2PLNLpY2MrMuLeMLbd20ZZJYshwGQfxXvTOooA9HbqlyMNr1DwJkAg1fJpIqofPrBKNpCQbIhojmTYblAwQxwcUrrA36AwFscJm8FwMaXZqi8t6ZVxkXoDGCPcGDkBtBY21gcP7lfAv3k51h8wpTIpaYaoAEvZ3Spd+Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=vger.kernel.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=J24h4iGdK2gmb++hGaQmeFdqgb8hYzFHTR1KzTXmgdw=; b=DrkGuHOcdlSwQSpQEF7C+XNShiTKWaLn7GdhekHKpfTHaRLmDs85F5gpR2qqQH2NGUMmiJDJ/heqbWqJMcFagiV1V3htIcfQ2nRLldmL272Giuxoc/PBa9g6XynUFcVuTVWwkOhHUCQzAlpllsFX2RdAaXrfWC1M5+93nvpyR1w= Received: from AS4P190CA0016.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d0::10) by PAWPR08MB10923.eurprd08.prod.outlook.com (2603:10a6:102:470::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.31; Wed, 5 Jun 2024 09:15:07 +0000 Received: from AM3PEPF0000A799.eurprd04.prod.outlook.com (2603:10a6:20b:5d0:cafe::93) by AS4P190CA0016.outlook.office365.com (2603:10a6:20b:5d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.31 via Frontend Transport; Wed, 5 Jun 2024 09:15:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) 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 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF0000A799.mail.protection.outlook.com (10.167.16.104) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Wed, 5 Jun 2024 09:15:06 +0000 Received: ("Tessian outbound d79ebeff6a2c:v327"); Wed, 05 Jun 2024 09:15:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 080ce403e1fee024 X-CR-MTA-TID: 64aa7808 Received: from 7856c2d275d8.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C849D9C1-4E32-45C7-B657-54FCC7DAA84E.1; Wed, 05 Jun 2024 09:14:56 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7856c2d275d8.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 05 Jun 2024 09:14:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j0l5500HyDYV+T4n+xeboDN0Nzx6YRXlFoCGGsW9U3/Xr9OA0JUgcO6/cPkzfXgcRCoKiw3riS4SnL3gmVLXCcH541nnoE2gPXk2oDg4S24ZFNhQD5ckiA1OWJI4GGQozSSCMAdQY+FcEp5xqoD8jI28LpvzGMun7FGmKgbwew6GDe1NJXY2An6VrsLyrtDUAeBZi6AvcC6jVHPyZn6d3dZhukiBG6VOw82NQFTv5yC+Q0DiZd4zUyiMog3zxtD5/VKMpScVnkAo929ZmV4zGKRyv4WU9/2eaeKotBrjjWfJnaodl5LXSsykZj47vF5rMw2sbeT3FH+Z8er6UVL5tA== 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=J24h4iGdK2gmb++hGaQmeFdqgb8hYzFHTR1KzTXmgdw=; b=DBWNk+zSAdpHaCkxdCWH1MzBVdjuLw8AFmoNlnKyeTcQvYy9B8LoiFoFoSFdDdvSXWgkT2bfhKf0L6sg+ybVEpdZHAs/wTmIu6iwuhfxoEPPr4Z1rDXpiw3P0XFHbqLCy/TvH5yRAOl63NpQcNHoj8CrPa6czI6ps1HqOwKAAkzKiNJshyTfxa6sQYgRex9QL31wJ89bV00bvzAjOgTau09s8oKbYK8OxpabPhj33oqu9UasQkxmck7b/hGsaJoPRPcSl5HKuxwL9EyUXs44lsZWGF+A2K0J9TxsB3r4RhrInVycp5UskYBPj/9N5za3imXgSvauUVo6DGj7P7R6iQ== 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=J24h4iGdK2gmb++hGaQmeFdqgb8hYzFHTR1KzTXmgdw=; b=DrkGuHOcdlSwQSpQEF7C+XNShiTKWaLn7GdhekHKpfTHaRLmDs85F5gpR2qqQH2NGUMmiJDJ/heqbWqJMcFagiV1V3htIcfQ2nRLldmL272Giuxoc/PBa9g6XynUFcVuTVWwkOhHUCQzAlpllsFX2RdAaXrfWC1M5+93nvpyR1w= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AS2PR08MB8645.eurprd08.prod.outlook.com (2603:10a6:20b:55c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.26; Wed, 5 Jun 2024 09:14:52 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::14e2:874a:b20b:78e5]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::14e2:874a:b20b:78e5%4]) with mapi id 15.20.7633.021; Wed, 5 Jun 2024 09:14:52 +0000 Message-ID: <7b26df23-4977-4fad-8721-137a23932b6e@arm.com> Date: Wed, 5 Jun 2024 10:14:47 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC][PATCH 08/10] sched/fair: Implement delayed dequeue To: Peter Zijlstra Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, kprateek.nayak@amd.com, wuyun.abel@bytedance.com, tglx@linutronix.de, efault@gmx.de, John Stultz , Hongyan.Xia2@arm.com References: <20240425104220.GE21980@noisy.programming.kicks-ass.net> <20240425114949.GH12673@noisy.programming.kicks-ass.net> <20240426093241.GI12673@noisy.programming.kicks-ass.net> <2fba04b0-e55e-41f4-8b7a-723734fe1ad2@arm.com> <20240529225036.GN40213@noisy.programming.kicks-ass.net> <7eac0774-0f9d-487c-97b6-ab0e85f0ae3a@arm.com> <20240604101107.GO26599@noisy.programming.kicks-ass.net> <24e09046-74ee-4ebb-ac1a-bdc84568e825@arm.com> <20240604191220.GP40213@noisy.programming.kicks-ass.net> <20240605072225.GR12673@noisy.programming.kicks-ass.net> Content-Language: en-US From: Luis Machado In-Reply-To: <20240605072225.GR12673@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0698.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:37b::11) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AS2PR08MB8645:EE_|AM3PEPF0000A799:EE_|PAWPR08MB10923:EE_ X-MS-Office365-Filtering-Correlation-Id: e0273df1-be40-43e7-72fa-08dc853ffde7 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230031|1800799015|7416005|376005|366007; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?Q3A2TktFaEkvTi9KbE85QkRoYW1FbW80enV3cjNxbGJlWU45T0F4MFhrTWRm?= =?utf-8?B?RHdleWQyYUxsM1VvWlBNVDdwSUZwSjdNUnVUYWc2NHNkaEM4eWtVUjZwMWtp?= =?utf-8?B?YTQ1KytFWGd6RmR0b0ZUdUtZOHo3TUxmVm5wSHJaRStXNy9XV2FZVUFSV3VQ?= =?utf-8?B?WEpaVDRUZHFWZ29jdUZ5NlNuR3owc1Z1ekJHYjZ2VUFiT2ZpMDRBaVZraEIz?= =?utf-8?B?MFl2Y20zc3ZwNzlWM0ZxQWdWL3J3ak95V3kwSzBIdG8rUThHNC9MbmZwcVp5?= =?utf-8?B?c2UxMzc2K0l6aWV2OUxhdnhGMmZsY1MraHNHMHhOWk94ak4vSit3aEZHVXg4?= =?utf-8?B?QnAwT01KRHpBRk5RTDJ6NHgzVlExaHpINlQySGlhVlpUZE9uZ0pTK1oyZUZ1?= =?utf-8?B?Umo1WWI5c280a1VxUSs5OUNw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VTVYeWVNcGdCT3dBUitzNDV1eE1FUEY4Uk9XYlVh?= =?utf-8?B?aHQxYndyNGE5bGtTRmVtcW9DN0FSQ2pNQjB5dTdHYjJ4UTR1QzdxcjZWUzJr?= =?utf-8?B?b0RUZXU1eDcrZTZMaHNMSktNSkxaQ2lrMUM5TEtCcm5TSyttdTRJSVlhdVYx?= =?utf-8?B?eFlQUzdOUkNqMFczNTk0OWlyRnBuOUdzQnFDZW51V01XZWFaV2lhbGo1Tnoz?= =?utf-8?B?b3lQYzV4eEMzMzYrTWttT29IRElEc2hPVGFHVHdObFpYRXJGRHYxNS9Tejhy?= =?utf-8?B?UlNmQVo1WGp1UmFiZnpxd0poSjhBK0hLMm15YWNCSi8vSXR5cTBJcGFvR0NN?= =?utf-8?B?WWFLQkxja0tCVHlsY2luL3VFU1o4L0dLdzJPUVRYeTN1L2ViaDYzeEVuMkdV?= =?utf-8?Q?MF6S06OIFsdo1Se6foJFn0w/mtkCUl5qFgeXKJO?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8645 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A799.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d2dca5a3-62c2-4ffd-f314-08dc853ff526 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|82310400017|1800799015|35042699013|36860700004; X-Microsoft-Antispam-Message-Info: =?utf-8?B?SkxzSTFmTWNaMHRBMnFHd1prcWpQamVlTVVqK29xWEptUzhIZmVZM3g2K2lr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aZ3p6K1l1REFoM1lDZXZ0VFp0aUZCbW5W?= =?utf-8?B?M1FhSXlqMVBEQzdRMXY1R0JnR0tCYWsvYmYvV2J1QldXWXc9PQ==?= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230031)(376005)(82310400017)(1800799015)(35042699013)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2024 09:15:06.8224 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0273df1-be40-43e7-72fa-08dc853ffde7 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A799.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB10923 On 6/5/24 08:22, Peter Zijlstra wrote: > On Tue, Jun 04, 2024 at 09:12:20PM +0200, Peter Zijlstra wrote: > >> But with the above, you skip inc for sched_delayed, but dequeue_task() >> will have done the dec, so isn't it then still unbalanced? >> >> Oh well, I'll go stare at this in tomorrow. It did not appear to keep things unbalanced towards uclamp_rq_dec, but might've been luck of not hitting the right code path. In any case ... > > OK, just before I went to play in my giant hamster wheel it hit me. > > When dequeue_task() 'fails' and sets sched_delayed, we'll have done > uclamp_rq_dec(). > > Then, since the delayed task is still on the rq -- per the failure -- it > can be migrated, this will again do dequeue_task() which will *agian* do > a uclamp_rq_dec(). > > So now we have a double dequeue -- *FAIL*. > > Worse, the migration will then do an enqueue_task() on the new rq > causing uclamp_rq_inc(). If you then get a ttwu() / ENQUEUE_DELAYED, you > can tickle yet another uclamp_rq_inc() for another fail. > > Something like the below avoids uclamp_rq_{inc,dec}() when > ->sched_delayed, and moves it post class->enqueue_task() such that for > the ENQUEUE_DELAYED case, we *will* do the inc after ->sched_delayed > gets cleared. > > Hmm? > > --- > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 9ac1054c2a4bb..965e6464e68e9 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -1676,6 +1676,9 @@ static inline void uclamp_rq_inc(struct rq *rq, struct task_struct *p) > if (unlikely(!p->sched_class->uclamp_enabled)) > return; > > + if (p->se.sched_delayed) > + return; > + > for_each_clamp_id(clamp_id) > uclamp_rq_inc_id(rq, p, clamp_id); > > @@ -1700,6 +1703,9 @@ static inline void uclamp_rq_dec(struct rq *rq, struct task_struct *p) > if (unlikely(!p->sched_class->uclamp_enabled)) > return; > > + if (p->se.sched_delayed) > + return; > + > for_each_clamp_id(clamp_id) > uclamp_rq_dec_id(rq, p, clamp_id); > } > @@ -1979,9 +1985,10 @@ void enqueue_task(struct rq *rq, struct task_struct *p, int flags) > psi_enqueue(p, (flags & ENQUEUE_WAKEUP) && !(flags & ENQUEUE_MIGRATED)); > } > > - uclamp_rq_inc(rq, p); > p->sched_class->enqueue_task(rq, p, flags); > > + uclamp_rq_inc(rq, p); > + > if (sched_core_enabled(rq)) > sched_core_enqueue(rq, p); > } > @@ -2003,6 +2010,7 @@ bool dequeue_task(struct rq *rq, struct task_struct *p, int flags) > } > > uclamp_rq_dec(rq, p); > + > return p->sched_class->dequeue_task(rq, p, flags); > } > ... thanks for the patch! The above seems to do it for me. I can see more reasonable energy use with the eevdf-complete series. Still a bit higher. Might be noise, we'll see. I'll go stare at it and run some more tests on our end with this fix applied on top and will report back.