From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from SA9PR02CU001.outbound.protection.outlook.com (mail-southcentralusazon11013011.outbound.protection.outlook.com [40.93.196.11]) (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 1419936212D for ; Fri, 10 Jul 2026 03:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.196.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783653250; cv=fail; b=aEgg4ih3ej1PStCY6DvAk+j5B5oyzCxe0fh3neI5e4nqjDIKkkfTPjQlIwRSxI35jplAPESArSYhjpASoApYWx5liBs5Iy96Q4I7jrGqnP2XQ6EnxS4mAs2+QLxP61mzBmUj+lxGw+KHVdy5XudMfRudQn8c1hFdp9k3vrBeZrs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783653250; c=relaxed/simple; bh=+7QtaPHkk57okXOW2EARhSDwnGfFmo0PJcPG7jJ7fGg=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Z15QW0x5DLdBLwmw36JIsG4kP41idtvWKobpJgf/SQ77Lg3qQ31JwTXThWDp2TXMkpDTqtvOXTLDdLM213vifv0vMzhqVg7qv4/rbAVDZuv+E5qr7ilULvo2Ra6XhrKy5a5iNb4OF5auQDxyVgYU30+4+FCNQXoeEjYJayfuax4= 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=LiEqkiYk; arc=fail smtp.client-ip=40.93.196.11 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="LiEqkiYk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nvDySw9gmiJF1MdCcaNB/vT+8ChF66yNxORO07iDxCOKjP+zxkHe7mKabXFa6d1rgeY/6pYX/zp7fAqb/eJU7wnAP9Tg4X1o+nKNMpPtuTum1qPaRmUwb0SD7nSVjdKF/BZdsXadVjwuHIGts7whjk3ZXtQ+sgbCWRV7jJ1Y69FxkHZGY9yBQLyLwMYHIKkhMhiTkayFnW12N3eRBaOqs/yEij1OCfGxkbrNvU1suup9jhw43zrtR03QJ6+yeL69Y+eYIllBnjdqF64IHEYGqOgt5bKUEpUEygmF8Jd7ZmQXQXZjHHtx7kH8yUddeMbgNmwpcTDMXRbJC8/exLJUKg== 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=d0OFhF78c7e62RUENK1loOEoL1NVbltijJAXUvRKQ+Q=; b=aqNBv/RYwzRPSsaTzNee2lN/QH1/Mi4elsO+tcevSX5XbCy5LiXLujYzr6OOl57KaGmEz3lzv4BbOnPq0TEOH72rFm+VgbLbQfzn0IFhctwwn+uekrN1IBelNEKA/AlomvmCVw7pkZnz/iFecbPt/Crbc4e3oOfca7NNLCHPyUrlw1W7i4/iDe8q8t0UJ2Ybmm6bsu7NGbR0oI1MtzAbzCuKZsMYLNDpi3emX+ewGLXR1hMY0emZdTHCbOFYxo7twjC6OtiVcAsF33MqyEgYneZOjifkomPG/10fYd5DjKqbz+HKDAp8z+d/wXAOA98rCRmpvX0wwWbz6/+aSZ8psA== 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=d0OFhF78c7e62RUENK1loOEoL1NVbltijJAXUvRKQ+Q=; b=LiEqkiYkssN+I36X2A6aKHMOUeVPjs7HpmT4kcYMKlgz9Bpl2D/7mpk+tE+73juptmJgk3DtZSZnPqCrquQyvg3tPsexNXq1cJNOkK3m169DD71seSsVzm7x1Nm/y5QkwMXG4VlOd1spZBktlD8kyf/y2LnIjoD4HlHuacDxpW0= Received: from BL1P223CA0044.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:5b6::17) by DS0PR12MB7948.namprd12.prod.outlook.com (2603:10b6:8:152::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.16; Fri, 10 Jul 2026 03:13:57 +0000 Received: from MN1PEPF0000F0E3.namprd04.prod.outlook.com (2603:10b6:208:5b6:cafe::2c) by BL1P223CA0044.outlook.office365.com (2603:10b6:208:5b6::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.202.12 via Frontend Transport; Fri, 10 Jul 2026 03:13: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=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by MN1PEPF0000F0E3.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.6 via Frontend Transport; Fri, 10 Jul 2026 03:13:57 +0000 Received: from satlexmb08.amd.com (10.181.42.217) 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.41; Thu, 9 Jul 2026 22:13:57 -0500 Received: from [10.136.35.241] (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Thu, 9 Jul 2026 22:13:50 -0500 Message-ID: Date: Fri, 10 Jul 2026 08:43: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 v30 3/7] sched/core: Don't proxy-exec unmatched cookie lock owners To: John Stultz CC: LKML , Vasily Gorbik , Joel Fernandes , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , kuyo chang , hupu , References: <20260701214615.3773339-1-jstultz@google.com> <20260701214615.3773339-4-jstultz@google.com> Content-Language: en-US From: K Prateek Nayak In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000F0E3:EE_|DS0PR12MB7948:EE_ X-MS-Office365-Filtering-Correlation-Id: d3e744f8-e5b8-4a57-3ff2-08dede3147e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|82310400026|376014|7416014|1800799024|36860700016|13003099007|4143699003|18002099003|22082099003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: NQa4z2oqepVjNt2+XgKdj8V8gq60/zYF4t9GC+QX9GFwvSvAj81jKqKvoMqtjKCdZg97yBIqo2UwswNL/Kr3Xr43zLtIog+F4nYssW8RzXvZGsDEg3i/SAZIMsK70ywOYEhy3FScahV0U5aAIjBwmR0HRbZt60JMioCSBJcxdxK49egkFLMUikl4GcMyZuzZD3O4UpGHdOU9WxgNAZArVCSZk14ETd7glLd4LGIzO7q75IOhNn6kVQsi87GH6Bv2O+e18kzhOx0ncFmNernd/NsqAGRMXcKUaEWtBsQVC0K+je3fxmzJsumaNhtrdu4XcIQDbV2gtBqczI7/l+FoBKZ/3nkgNLB4/kUO/hjDFvRmxofxIQ+rH7EPIPgxvozeNwjuCAO9oy+xFWV8Sf+K28EYhinCRvBOurc28WESOfJRxMEFvTApcxMyCk07CBT1GC903N70uxAY0/GhQPDev8gytuh6nVJR/IV7i8Uhw2h3b36Zkzday5Y38T+EpOlUtJoKnT0p0JVLj482/rZ23sBnMRLwTOEgeslFSz0rNjGskbAaHY2LFvLmumDsoNqi79YhIDz4eqj3EeYu8B7rNRAPkefI8hqQCUzGBWxo/yh220r/yKkRXg+4yd4WPXbZ0Zcr4ZfKl5U1NF0ejPIxtOAjepV+ADLCspb8F7ysGTVcI5pjs8m9Qnu8+x6Q9wbAj4YUl/ZhiAjfdzT289diAg== 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)(23010399003)(82310400026)(376014)(7416014)(1800799024)(36860700016)(13003099007)(4143699003)(18002099003)(22082099003)(56012099006)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6Aq1q5bqrv3O/VCWBy83gXi7eFV1feJbl1vaQ8JPYWC53/MQ8wGQ1lyEP4JePcBhbe+0VyvgwZrm5diEVWyZgPiHvAtAMziscbV9ve0Hwbi/gULTO4yXiQzYWie0wnxUUUq0QL2ez2nr+4xdmLMI32ZGBkWLn3djlYIVkUd+IhsHXaxaE0N3asMhHhEsRFhJvy0pSYMLbdMo6Dn8Jv9QDa2P1FSsshmoN3uv5qU35v/+sZwZyn2k0NVK4ueTgqIPndpwf6HCgW7j0jYULM2odutXOleh39Unz1MMzHzlu2C0+4+dmylDfWklyrkz3njMGVS+xz4lTorQl/XMFJc9WoQNwfMMJFmSEqeZaL6Wd1/3GW9sqWA4Bb3M16CPPn1vznRWSlbkPqbK239xH2hlCiMb9lcAbbPGzsYyMaKYGwagekw3/SXgTxqVHoNyV8m5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2026 03:13:57.4062 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3e744f8-e5b8-4a57-3ff2-08dede3147e9 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: MN1PEPF0000F0E3.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7948 Hello John, On 7/8/2026 10:30 AM, John Stultz wrote: >> https://lore.kernel.org/lkml/9ceb2af0-33c6-40ca-b855-5167a9c5ae0f@amd.com/ >> > > Oh! Very interesting! My apologies for somehow having overlooked this mail! > > >> I can streamline that more on top of current tip to do it all in >> pick_next_task() but the bigger question is, is it worth all the >> complexity? >> >> John, Peter, what do you think? >> >> [..snip..] >> >>> @@ -7004,6 +7004,14 @@ find_proxy_task(struct rq *rq, struct task_struct *donor, struct rq_flags *rf) >>> owner->blocked_donor = p; >>> } >>> WARN_ON_ONCE(owner && !owner->on_rq); >>> + >>> + if (owner && !sched_cpu_cookie_match(rq, owner)) { >>> + if (curr_in_chain) >>> + return proxy_resched_idle(rq); >>> + p = donor; /* Deactivate the donor, not the runnable owner */ >>> + clear_task_blocked_on(p, NULL); >>> + goto deactivate; >>> + } >> >> Otherwise, this is acceptable if we don't want to touch core-sched >> bits juts yet. > > Vasily's patch I think is a reasonable short-term solution just to > avoid breaking core-scheduling with proxy, but it's not a great > solution as it just disables proxy in the problematic cases. Ack! We can add this in and work on the CORE_SCHED bits before we drop the EXPERT dependency perhaps? I doubt if anyone would notice if PROXY is missing with CORE_SCHED but if and when we plan to retire RT_MUTEXES in favor of PROXY_EXEC, we should have it in for correctness. > So I'm very interested in your proposal, as I was thinking I'd have to > pick folks' brains at LPC to figure out a better approach. But it > might be worth taking Vasily's patch while yours gets polished and > tested? > I'll try pulling your change in to test with my full tree. I'll send a clean series out by early next week after some more testing on top of your WIP branch. -- Thanks and Regards, Prateek