From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011019.outbound.protection.outlook.com [52.101.62.19]) (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 5683531353B for ; Wed, 24 Jun 2026 03:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.19 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782273215; cv=fail; b=lojhg+p35qXU1fMSW33EQqGX7RZz8ivN/uM4mPfvi53+ThZZJXvBOR5iSpJAvihYEDA7uh3ZnsTecyW6xPAnds85KI8e2tfL1XfmBpBufIk9bmFtPZfJ96B8+5tvTYiZFDK1gs0CwVV2rDz/7iDnmU5E33HM+8vlLYIRoUZDtZM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782273215; c=relaxed/simple; bh=A+38GmNsLdVTXdjOt5eY3vC+0UmcCPU9SGR7OngRqsI=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=MEQfP/pDgIDi6UoAG729yheLgbSmFwN94pmwnhU99iEprcbEaQQTQvQ2Potb5pmzzde92M55JZvkTyuAPLbGRcn82FxGumV8rHa1COuypd8Af7k+tsH7QwqKfF3K7M1XpZqKzBVenri25aLFFBMTsM33ThwVYYPCK+52TijjeAw= 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=dn5eblQp; arc=fail smtp.client-ip=52.101.62.19 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="dn5eblQp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GXo7jqt05SlgLUWYl+aqv38OhNiL4TRXskQkl6Yw5oIn0PZloIYp/NatytOZ1P+VVbmsqqJnVDXhiza0z1LuZ8A3oJEIzvYRyLqINxr//PHzlsYypu/CXz6VMqdOq8TAqcrM2SzWMXFF3ggF9J8sF4RM98x3MNG1EZ3aPbQTyw4gWNMsSAhgqtK49B7fcuYE91/wYVJHWfz0yV1oTzPAfveltzaEs8qQfTn0BjFD1sqF1e9JfnU9XADrXf3SPrflKDYsL2ALi1XB4fX5Rzmbg8bXeMV2gAiI30n6I08D1cCDg8kD5/94xyImb7GcfVM9gsYen/6DjL42y/k1Xm8Agw== 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=ET/FLE8hZumJI9KwoR4CRmMJLbPfA2ZlOnzTDY8KJyA=; b=n/DBfiu6XqhMWDKhPR5GYwrstKKpG4B1M7YRSlK2e5cx3brDQLjBXcpVIxOZxX35aJVq2H0EbMbC95ibv2HTkvbyNJlMoWpPriFtWLOydgithO7auvdKJc/PR/9y7JVqNW8GEqnA9eh9I49WnI+6sfB97wnbvC/pszfWe0YUtTXcn5+mdhb12NQ+gY67jPN5IhSq21d26yVGChgURRAoyq5DLjm9ueCF3fz/jtxCEAxMljwBzFL4XgLLUJPAqY0b0W9O46lP9Vfm7X955jo7y+Cg57KQ4teY7U+bmgrDtVnkEzUhkw7eTb6VMr/EH9F8u0EWxVXfQazeD5+XmHofpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.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=ET/FLE8hZumJI9KwoR4CRmMJLbPfA2ZlOnzTDY8KJyA=; b=dn5eblQpVpIzSssaKcA195Ix6AxZ4s6p4EagJQA8lCin0rhDFcaiOKVI5lSuNUmBxLPnnLXYjTdywN3k0KhB6iZtY3PtclNn2iBr9R3CiVAjgkotKxuWy0kqNRHIOCmzdsxW+aVLmT2CYvV7C70WfRfrnamYJOcf2P4Z9mSHirI= Received: from CH2PR12CA0016.namprd12.prod.outlook.com (2603:10b6:610:57::26) by DS7PR12MB8371.namprd12.prod.outlook.com (2603:10b6:8:e9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.159.13; Wed, 24 Jun 2026 03:53:19 +0000 Received: from CH1PEPF0000A347.namprd04.prod.outlook.com (2603:10b6:610:57:cafe::95) by CH2PR12CA0016.outlook.office365.com (2603:10b6:610:57::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.159.12 via Frontend Transport; Wed, 24 Jun 2026 03:53:18 +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 CH1PEPF0000A347.mail.protection.outlook.com (10.167.244.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.159.10 via Frontend Transport; Wed, 24 Jun 2026 03:53:18 +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; Tue, 23 Jun 2026 22:53:18 -0500 Received: from [10.85.38.52] (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Tue, 23 Jun 2026 22:53:15 -0500 Message-ID: <90277b52-e069-42a8-a8d8-9d9a59485d27@amd.com> Date: Wed, 24 Jun 2026 09:23:14 +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] sched/rt: Push RT tasks when preempted by a deadline task To: yangsonghua , Ingo Molnar , Peter Zijlstra CC: Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Valentin Schneider , , yangsonghua References: <20260624030442.3070759-1-yangsonghua@lixiang.com> Content-Language: en-US From: K Prateek Nayak In-Reply-To: <20260624030442.3070759-1-yangsonghua@lixiang.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000A347:EE_|DS7PR12MB8371:EE_ X-MS-Office365-Filtering-Correlation-Id: 91b4ea79-3dbb-47fc-6f60-08ded1a420df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|23010399003|7416014|376014|36860700016|1800799024|22082099003|18002099003|56012099006|5023799004|11063799006|3023799007; X-Microsoft-Antispam-Message-Info: l0QP/x9EuPiki7bnC1VsVm3uZKcjHVUSk9PHmgePE7FDAXEqnv8jM+Y6GpXvKhNhKr9PX8TgYFKXz+i1JGXYiNrkPZPU8A80PIgrkL5qhsgd+7t/rkkkPNgNn/dwpp0Ul6LcMJAbrrflv5+WuLD8cX8c13sa+TEBHFi+1ceHuDBpc7UqP7NgTjorRJA/LQFYBD0o0zk/VSLAkB3rMJZTYwCe9Wma/QJSdUOhQy/fP6uT3k7adD8gVlm9+MV5stob+q0sq/1583/FaxLWGlzHXkqKMNuVqRPhuCdSio2JHr/F0aLL2jTtBm2WG/UADsoUdLfFE8NAEQDLSS8C0x9vfKoKVrIlZHIE/xBGtyMgyft6EDq07cbchlvxVdQG+joJIihvNvmJbBmitdZe00xkLYN8KeCdxcOUtfIgHkqUfF4+E5RtqJbUtYOxGMuejJGW+xnIWKGno4mvbjIkQz3InJsnWg7My5etwvD76SYfFTZceaYuqocx73SS9KtZpf1DcanHY9horTFrvgNvmkbyLuAE3yXf0GqOHqrJNt8Ij/r/4/iFokCsi2pUOUPS+EYJBQ6sGUQTFMvkQLMqTukbZojgIr1c8v9fFhFpiZZ2Cyr9W+BW3rNf5NSgYFVys1NDE6Lv4Tp99b69g6ScaA8pRAheU4/yXz/br9VTCkx6ErUFfRgFeALpaVQmIprHsZHzQ7n0y1wvHDBTEIJM3gRpAg== 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)(82310400026)(23010399003)(7416014)(376014)(36860700016)(1800799024)(22082099003)(18002099003)(56012099006)(5023799004)(11063799006)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T+U3jKe3egdnigXSRDsPWJplTb2+qUEqPs9D69ozE5MCjQtIlKiZ0oZtGiox/i2zRIOxgmGNGqdgXfxJcll3MR+ECeaEy+Pp/S+KFYBWiToUA5F4QON/q9YOSTTC/ZVoCJQONWLy/gJRTw58etvwNySsyn2OejEr13uUx3Pl/2q2fajxUaIsvA5meBTQ+QgEhvgMbRfHTdTciq21EnrFMQOGJYPfKm7flBWIn6q8yPbE2/Sq/M81XqMrMvsOPU7OslKZbCx6yObRxV0FjOI8JN00DAYVVxA459Dp+6kOsLuI+m01Ecra5xa6d6jaSLnEIMDODrooBWuxSpCYtfTaWXc3N+zkcyu2nooOoozwbWLgswGn8LELE5PuYn+8jcATgvh3FPY3ZP+kgs268YocCFMud5NuBEgOjD+i6FZJYiPai5+86z4CdcWVit7qj5Hy X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2026 03:53:18.9013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 91b4ea79-3dbb-47fc-6f60-08ded1a420df 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: CH1PEPF0000A347.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8371 Hello Yangsonghua, On 6/24/2026 8:34 AM, yangsonghua wrote: > @@ -1736,14 +1737,24 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct task_s > > update_rt_rq_load_avg(rq_clock_pelt(rq), rq, 1); > > - if (task_is_blocked(p)) > - return; > /* > * The previous task needs to be made eligible for pushing > - * if it is still active > + * if it is still active and migratable. > */ > - if (on_rt_rq(&p->rt) && p->nr_cpus_allowed > 1) > + if (!task_is_blocked(p) && on_rt_rq(&p->rt) && p->nr_cpus_allowed > 1) > enqueue_pushable_task(rq, p); > + > + /* > + * When a deadline task takes over this CPU, try to push any queued > + * RT tasks to CPUs running lower-priority work. This is independent > + * of whether p itself is pushable: even if p is pinned or blocked, > + * there may be other migratable RT tasks already in pushable_tasks. > + * > + * rt_queue_push_tasks() guards on has_pushable_tasks() internally, > + * so this is a no-op if nothing is queued. > + */ > + if (dl_task(next)) > + rt_queue_push_tasks(rq); next can be NULL if we are are coming here from sched_change_begin() for the current task: sched_change_begin() put_prev_task() put_prev_task_rt(rq, prev, next = NULL) dl_task(next) dl_prio(next->prio) !!! NULL pointer dereference !!! Do we avoid this in some way? I don't know if this push was intentionally avoided or not. If there are short running deadline task, we'll unnecessarily push a task and pull it back later. Is that not a concern? -- Thanks and Regards, Prateek