From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from PH8PR06CU001.outbound.protection.outlook.com (mail-westus3azon11012035.outbound.protection.outlook.com [40.107.209.35]) (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 6F54B188596 for ; Fri, 27 Mar 2026 04:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.209.35 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774586882; cv=fail; b=qghcpmoUpgX7oFLyA7l3Hlg9lHDrf3rIIMVbkmJ2E1mVN6O4F657V2y3ja9ujNl9Mu+KLWcFgFHwIqIGtI6KsMITk0OXAiKA7aan4pYhZ7rUqj5554jA49Jz5IzWu2CFPlA7IQiPALxwuk3pggFOe/K5DF81mxoyW3mbRAZ4idA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774586882; c=relaxed/simple; bh=WWeErWYr+n4pzld/v1w1igaYXBpb2kvFzzUPHG9NyeQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Oy4aVMbQOGvSaCN1aFA/1xJ1aEqw6VFZg/6MdX/5q6TjqpVR9y0TAzaNHxf4eWMkeixBpOjjn+BiLMamUqhIg3ocnh+jw3LgU2C5xv6D3AoYT+vmioKBvgcBJU53WRsrvxszoYcSnN7JfmeHIXQ68YJqxxD/ZVJ8wWMumEGvm7c= 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=0mzf2fwc; arc=fail smtp.client-ip=40.107.209.35 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="0mzf2fwc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Czf5Ss2R08LPj7/d53XMHkgm1yTb1+x/eGFwLq64jKSenm3u2GG7dwQiulklP0IuuZL9j0eIx4oa64Ua/NN0TcQCt3R4anILpxMgEdbeLdYJxkBk/8yYOK35UeET4TQCPLHwqPZtbGqaYBxEBUc/m46zyt1roj5464t9xslRR9swdcysWEL+OTROwhODxM6Rwq4KcEAMQYSjcVT8kXdwjr0GrHo0GA6cbtiZbPGp7Jkm4/9Ma/OyX6PcefMxA2hV48HOtMk9qyuO7kgYPbP5P60z58N2Crc8t6rdgDgotkAR/HYxCvvZdjSDWHcBJ+E37ILb4wCvbI2qODh0Hok9Cw== 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=qdlRk+dmx9S+a1T5oHVkBvpfeopgakY28dJogd0dQ6k=; b=NFfeWm/kdvCtUEK8vWP0J+6PegdUYeXuNK9ibjtIIUAxsiBjC/+Dyz1e2c/Z80O7W9veAtGZx9oSQxZvtFC2wgVQ2E3IvUr5XhUJhfblQtccXsjpLecE2+i65LVx0ExQOkwmi7I2/kG6aFYn7MS+ENVxcGX6jkWkLMfMnpbAKd0/aZlU9ede+zLjwjFgSK9wUzVvYArWf7ZOjY80r2Y7vsyD249vifMLDdyM55xCvLDhpmW65rO32ReJox5O5/HsazUSaM6W8UGm7frkCkBISFexCmPwy3TEuUzxBtiKIcNPffAJRa0tvvGB4XVIXFNN/FpKnu5YkoQDmcgp+RO2OA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=goodmis.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=qdlRk+dmx9S+a1T5oHVkBvpfeopgakY28dJogd0dQ6k=; b=0mzf2fwchxbEmpbrTc8bvNi1Fba/Y6WC0q3+4WirkxyohnkXhal1StNvoHU0mDVet2Z82imONSrF7lJhUGeS/QaTPIaj63WchCQuS5Z0N0SLkLx8XJsKYy5yGBYAER6D1Cc1a5Bf2NlqtlTgaYLXSISJnE6xDgJ0712CMRmJ5eo= Received: from CH2PR18CA0050.namprd18.prod.outlook.com (2603:10b6:610:55::30) by MN2PR12MB4223.namprd12.prod.outlook.com (2603:10b6:208:1d3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.10; Fri, 27 Mar 2026 04:47:57 +0000 Received: from CH3PEPF0000000B.namprd04.prod.outlook.com (2603:10b6:610:55:cafe::f6) by CH2PR18CA0050.outlook.office365.com (2603:10b6:610:55::30) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9723.31 via Frontend Transport; Fri, 27 Mar 2026 04:47:57 +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 CH3PEPF0000000B.mail.protection.outlook.com (10.167.244.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.21 via Frontend Transport; Fri, 27 Mar 2026 04:47:57 +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.17; Thu, 26 Mar 2026 23:47:56 -0500 Received: from satlexmb08.amd.com (10.181.42.217) 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.17; Thu, 26 Mar 2026 21:47:56 -0700 Received: from [10.136.39.136] (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Thu, 26 Mar 2026 23:47:50 -0500 Message-ID: <595524da-5aeb-4338-b9ee-e5c2d1e71617@amd.com> Date: Fri, 27 Mar 2026 10:17:49 +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 v26 10/10] sched: Handle blocked-waiter migration (and return migration) To: Steven Rostedt , John Stultz CC: LKML , Joel Fernandes , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Ben Segall , Zimuzo Ezeozue , Mel Gorman , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , Thomas Gleixner , Daniel Lezcano , "Suleiman Souhlal" , kuyo chang , hupu , References: <20260324191337.1841376-1-jstultz@google.com> <20260324191337.1841376-11-jstultz@google.com> <20260326185244.31635eb2@gandalf.local.home> Content-Language: en-US From: K Prateek Nayak In-Reply-To: <20260326185244.31635eb2@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF0000000B:EE_|MN2PR12MB4223:EE_ X-MS-Office365-Filtering-Correlation-Id: 9866ab96-eeb3-4402-c90f-08de8bbc040e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|7416014|376014|36860700016|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: TkdDHYmffhQFUwmNtoImPAU5Jw2p8aT7n7maxiqF9EwYmhD4Hk5phfB4Xu8SVft5zAcmdPikX6jQ7bgMUO2XglEwsonJeFyWRPrkbuUvhz1t4fBMoevt5yTMCcABO0XYzinj6bDvwDZYlET6kkEJLkN/ugJtlHJyU5evwEH4dac+JhkOLsihb1oSeY2ZwYFUgzq8u+Dbxj9ZjGN8SoPMU54NtCpS8yAP/XPgPAHhchhcyvDqlOfC4wFb+AAhD0mXjwRjddUBzPz4ttNBwj+X+9HbhckmFNsccm6QcLMI7me++Rl4RciXxy3Dl552ouIPAtS2kvhHsGJQ5TQprUL17wzYh3Mk6pmmQgajJQ5mErxDmuMTcI8I4KwBYry+QdvVQ1+Qu99kSt7aMAfLtS8TGzn27PgNbIWaFvmtqUYMl8F7ubx5qysXkxBdygRRU6+p2PHMYUb+GHPy2ydWprwmawXeouw07PiADqtB/Qo35/91Uy7sY05hAIuWdEWBfz5ZNyfhMj5l+ishEeTZ3sYKLdbKuGpv6hpGXaVIFg1vXxnnT1DMQT6EAipX/yl4ltHDMtSZPKxTao21uEjrtxIWrrSE7rCgYbkD4puNd1yBqwyTGucmg234GsjbrxtzxLLUVhprgyvote+VbABMhF9KLLu9u7MRG8OEjb6m0/qAtlfWqmY13a2ooAY85gwSDyLuUPuAEig4mQte+m6sLTKSX02DM9U1qRuAvFUXS/8+600R3M28Kr48WHcRyKbjF+5vVDXlzNm+6acqTKqcdKNc7g== 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)(82310400026)(1800799024)(7416014)(376014)(36860700016)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1pq2CC0dEzj0OxGpW46jckpu+H3tzyBbAktG1Z3LMhE1WHQ9uKnz4RsuLLDY/UL/iE/12O6l3LkZjdsaQUPasXib16TVWHVbLOtR5ODdR3YT7CmSMAP0OYfrP9WAJvMQ/+epXmqmlgEji+T8jNIrSS2ysAABa1aEIR2cE/7EWvxUbWo1gzg6uOfJj7kzkMhrFJBAFXofuKRgrOU1b8a0YK4UydOMKVVhsBjodhXGwv4ix7fc6pLXUDOb+uGUjH+t0jVpLS9baKMM8x+LS985RT26LK0QyOdfAwZg6pRZbuiovygjxTsZaxG8CdkdIG4DIxA3LcFqfFURnl9ciRKENNH3Ra6RqalZoLcGp1nTAIa2AAs3nEO/WFp50x2kETWgJr+vgeks+x29Oh6cDSaBGVBKbjuExi/obJvMPv3GibqqM1cd6MwRElbHFOXShbid X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2026 04:47:57.1038 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9866ab96-eeb3-4402-c90f-08de8bbc040e 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: CH3PEPF0000000B.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4223 Hello Steve, On 3/27/2026 4:22 AM, Steven Rostedt wrote: >> +#ifdef CONFIG_SCHED_PROXY_EXEC >> +static inline void proxy_set_task_cpu(struct task_struct *p, int cpu) >> +{ >> + unsigned int wake_cpu; >> + >> + /* >> + * Since we are enqueuing a blocked task on a cpu it may >> + * not be able to run on, preserve wake_cpu when we >> + * __set_task_cpu so we can return the task to where it >> + * was previously runnable. >> + */ >> + wake_cpu = p->wake_cpu; >> + __set_task_cpu(p, cpu); >> + p->wake_cpu = wake_cpu; >> +} >> +#endif /* CONFIG_SCHED_PROXY_EXEC */ > > Hmm, this is only used in proxy_migrate_task() which is also within a > #ifdef CONFIG_SCHED_PROXY_EXEC block. Why did you put this function here > and create yet another #ifdef block with the same conditional? > > Couldn't you just add it just before where it is used? If I have to take a guess, it is here because the full proxy stack makes use of this for blocked owner bits and this was likely broken off from that when it was one huge patch. When activating the entire blocked_on chain when sleeping owner wakes up, this is used for migrating the donors to the owner's CPU (activate_blocked_waiters() on johnstultz-work/linux-dev/proxy-exec-v26-7.0-rc5) That needs to come before sched_ttwu_pending() which is just a few functions down. Maybe we can keep all the bits together for now and just use a forward declaration later when those bits comes. Thoughts? -- Thanks and Regards, Prateek