From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11010039.outbound.protection.outlook.com [52.101.56.39]) (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 17C5933F370 for ; Tue, 17 Mar 2026 07:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.56.39 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773733992; cv=fail; b=EHNl6W/s7UXlc/iknix4ymyy4uM87+qO6kjP+vn5cGJioAhPwtQlMUmGkgTzB9l7/6pD7Vqmf2HmIzvd6q3JOW61iTh/L3xHTzMSAvSZWjV4ZJp6Jck4uwca3A0z5Yb0o2LI8KzlFrW0VCJsZWXkV2yhs90kjP4ubUXyuZBd0D0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773733992; c=relaxed/simple; bh=SuYKS3WROMFGWEU8k15ohXQsNII6sva1TSc+dfqd5jM=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=DyTdT/8dveMwICxdt+5l5sXR8654Zqmg0wLty3CEcon5nEl78fH8WaAj5OrxxA1635IShEiHviXLsulA1xXwEyZu9vz442WeQrJyfR/3vOns8stVxshiDb+CaIv4eBs6+Wn+zRf2jnDqy1SV7/vAkSAya8oXj4ry1KUjcnMjlTE= 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=oVnJzMJ6; arc=fail smtp.client-ip=52.101.56.39 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="oVnJzMJ6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CfwiyKndsbKHbFobz6BuSlW2dqbbnDR3h8TCANok5RhIDLspXW9uLYTJyLonbYP3D9TiRL5PFRlAxFGw6er9r1wHXjQbKk6tYwOf2zGIs16blRdconOL9f6AQMcgmXIoCr0UJtf6wsK0AtF34ll9aNs4ula9g4K+CI6o9RPq34Pwf3wDuX9biYbTmth7w1uHonrdOV1F3OojWWqiocmMoApyYQMgtJI4nSo5vxnkqF53iO1iH696rJp9h7JNUrAKI5b6CiJ8wvyCAFV0jUhayAdc/Aj/Hi6qfoHGXb1xzrzgqdVZbbcUlbjuoOWs7WQn+1+jWkv7bNmu0WFFpmR1Tg== 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=B1VUYR5FXhZiM1vr3dyH2CMu/kyFmpoHyV4Qt+X6E/Q=; b=YP0UWRGzXnXjBtu6YHq6iYrt6i051NLCwnoPEAu6E284l+EO7lk2/65z1eYX7p/eMOYER6hs2d4eEulK06aaGGX062sjVzYOY5PplyhA2MK/c7Zd1c5gX16FuLZwDSyHnD120eVM7yBhiZGjP4deOpo8sIZ7/bA5ubq7kvxRukpZ2OnBwH8qPiXOzuuEAJVo+BalF7gVuHipnZxFNyXEEYdaz7ZPIlXKrmIbXtW8KiPlouF6folmac9eXwcyCuP8hiiutv+bGtBF8T1TwcSVhkuReERWHch1LsHGGarOBbgrLBIisYfB2AmF2LpJSDPc8dxt9Bi9PInJW4Jfotz6Jg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com 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=B1VUYR5FXhZiM1vr3dyH2CMu/kyFmpoHyV4Qt+X6E/Q=; b=oVnJzMJ6cACBD2/5dahGHk/6vlpyoapAjmPgaDLZqaBcIE9GBjFLFZWkYtKZjSOk7l+GDi0DJF19YThgZSb6qK6PcdevXkGiAWHabLoBmS03qWzPPH39TOVZy4e6yhEWDkp4PwdbVp70kHd68fv8ef5I0Y9+u0rwSheO0GWj7k8= Received: from BY1P220CA0010.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59d::12) by SA1PR12MB8096.namprd12.prod.outlook.com (2603:10b6:806:326::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9723.16; Tue, 17 Mar 2026 07:53:05 +0000 Received: from SJ1PEPF00001CDC.namprd05.prod.outlook.com (2603:10b6:a03:59d:cafe::14) by BY1P220CA0010.outlook.office365.com (2603:10b6:a03:59d::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9700.27 via Frontend Transport; Tue, 17 Mar 2026 07:53:15 +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=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SJ1PEPF00001CDC.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9700.17 via Frontend Transport; Tue, 17 Mar 2026 07:53:04 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Tue, 17 Mar 2026 02:52:49 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Tue, 17 Mar 2026 02:52:49 -0500 Received: from [10.136.37.230] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Tue, 17 Mar 2026 02:52:41 -0500 Message-ID: <1f79fbf7-9811-46cf-938d-b2cd0b9a0356@amd.com> Date: Tue, 17 Mar 2026 13:22:41 +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 v25 1/9] sched: Make class_schedulers avoid pushing current, and get rid of proxy_tag_curr() To: John Stultz CC: LKML , Peter Zijlstra , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , 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: <20260313023022.2902479-1-jstultz@google.com> <20260313023022.2902479-2-jstultz@google.com> <20ea3670-c30a-433b-a07f-c4ff98ae2379@amd.com> Content-Language: en-US From: K Prateek Nayak In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CDC:EE_|SA1PR12MB8096:EE_ X-MS-Office365-Filtering-Correlation-Id: 075272ef-7f46-4084-6814-08de83fa3889 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|1800799024|376014|7416014|22082099003|18002099003|56012099003|13003099007; X-Microsoft-Antispam-Message-Info: iRYnA+xRywDmDNMwbvFO1hkzExBcNOnR5e5zeIBf5Y9uorrEjfQedOpTRyTUEXN46S9nJXpt+xpCsPwJ6izMMRx9uLA7SvIcdsPEdOhT1N3wnuBRsioHP24insPsVRdugS4E16vzX+mrH9xs58RsmzK1vdexhhqmoSZlepc4TsGntsyOR6Jf+KqZSzNOSk6g5+E6xJsz2iFw0L4yEFDy78yTK/L4Ukl9GHQMZBmNgKR6UecSon3j5eAWuCCTR1MIrhlH0dl8WPhILh4NNq11NNWZhRk9KfR7Ne1DXVMo1AqcJhnJ5iwZi9sA2Pkul/4j7x9JaXcRNGictZc6r0YZmwU5Tt+ayFyljsmauURD8xFub+5CwpyHtNd07LZ0VbhmzDXHweCxc0QTSxYmUsCT9uhKRxbb2p3oJBb6CGylniVgROFHq2eQeiShVq1catwFXwbrA+eFZ8aiR3SkRjPvqB6SlWfYFfFGtsXI3lWj5Vzfhdvws7fTVjjl5k7afyM5nxhM6XgprwLrAPuzOgfTDtbbzVjdtZ8h0wshxXjQJ6tQiuysLZcmKocE85wPjrQg8/TAZ83I9dAc/WGtwNghppTeQVR1B12FEWPGgjk1EzwOXJEsqgTvPQVyRt3KI7IAaTz86CHNl4OJERGOO97c5JLbtHPdh34n5TGwLqM1eNfhYUqJzoz8nbVczcdD/2D/TYvcKBCBnbKmFFPJYMbe+5ckysRaW1zc16i9h3Pz/5tVrUdUj9dRcVYlh040fJazODzU8uGsWkqB2b7kgi5mfg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(1800799024)(376014)(7416014)(22082099003)(18002099003)(56012099003)(13003099007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: itZia6TkNUgGcUtX7QVgKJYQG1WXfJoWINrwc29z6lquniuHOE4XC3dDbGpQ8JdkWCFOEC2iDykdc4ZczBzSR+tMkPGydyXLUHsq7x9uEg9oL1fSaO8FdfilQiylPdmFUKDFxJ+cnqcOOW8xCoDfv5zHEmFjPUqIlcLRzi5JsPk7VXNDFZuKTq9f9yYC1PnoI00BIBQXdVNbXAiHHWg5+2z/1Ve6j//hlSqu5NMmgZuOfh5YKmn2B96E6D+PeROymP+q6U31JFXyhvmTPcpl79ZvrHQgEtwHFqP1h0HJAwB/fbqqKaPQQCaKfT4nr0sDZ1bolwiTCGa34Df/bkA4tkQ939fX5UABqkgPRNMgPg6Dp9PKihnVdx9NXQKRyQZq3eeTwXqKZYmd2ZTODCBlBSQvmU5GIBQGKF2tzRS2QtcYJQvfBq0J5nCgx9KAdbhm X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2026 07:53:04.6052 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 075272ef-7f46-4084-6814-08de83fa3889 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=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CDC.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8096 Hello John, On 3/17/2026 11:34 AM, John Stultz wrote: > On Mon, Mar 16, 2026 at 10:41 PM K Prateek Nayak wrote: >> On 3/17/2026 10:19 AM, John Stultz wrote: >>> >>> I guess adding a new helper function to manually do the >>> put_prev/set_next could be added to the top level __schedule() logic >>> in the (prev != next) case, though we'll have to preserve the >>> prev_donor on the stack probably. >> >> That seems like the best option to me too. >> >> Also, deadline, RT, fair, and idle don't really care about the "next" >> argument of put_prev_task() and the only one that does care is >> put_prev_task_scx() to call switch_class() callback so putting it as >> either NULL or "rq->donor" should be safe. > > Ack. > Here's the change I'm testing tonight (against 6.18): > https://github.com/johnstultz-work/linux-dev/commit/0cc72a4923143f496e33711cbcc1afdf6d861ca6 Thanks a ton for pushing out to WIP! Only nit. would be a: s/rq->donor/prev_donor/ on the lines with {put_prev/set_next}_task() to save on the additional dereference since they are both the same (but maybe the complier figures that out on its own?) Also would a sched_proxy_exec() check within that function make sense to skip evaluation of that branch entirely when proxy exec is disabled via cmdline? > Feel free to suggest a better name for the helper function. It feels a > little clunky (and sort of sad right after getting rid of the clunky > proxy_tag_curr(), to re-add something so similar). I know and I'm sorry about that (T_T) -- Thanks and Regards, Prateek