From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012004.outbound.protection.outlook.com [40.93.195.4]) (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 598221F94A for ; Fri, 9 Jan 2026 06:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.195.4 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767939447; cv=fail; b=hlLJ97Uzr1j+Z63K1V7C3QX6rpeS/lOGAhE2ZHRF3TnQ0dsCsJNF9bBUOwqCs5bHwGqCCvW3EnqEgICtIq/Zu3oAiq9Wb4VIy6GKeVRmkIiLyrszsiy5PWd2H4Yl+j4viE9plQgxg/Tg536HssFZ8s72QeZSn0F4i1nWN0ZzOmo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767939447; c=relaxed/simple; bh=KtxUr7FIt/bHByMInvHeOmiBa2+TLXILYMuJ7iFfnoA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=HwVxtU1OAfRFwr3h1WjAZQ4l8gyYX/VKzqxnbfra9LLdOUuOB7pvTRAmD1XLB8fX/Qms1cyiwkMCC/RNrT5N368v3TIO4BvdPsDKVW/Ju/tWT6RDYCB//fTTPKoJ/tF85R4D1TUkRLz1FWfyJ64i1x0zRe6U5ESXJ8Zzlf50OLA= 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=XwzXcF/T; arc=fail smtp.client-ip=40.93.195.4 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="XwzXcF/T" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PCUR+pIyiz6e3v7ddKQrx25jVA/6VnzuxzFYsiieMh5sfzHhtgX5S/AXrvdgvZmwCq7LZCwOESxM6j6F3wRERSMz45xdcyuiKzSbvGRHG3rL7f4QKYn/xscKA8Yuz9asTzfpLWB6rxn7GYC9k8OZjfgJlGypHbAWbl6XvgD+gsVOg6cSj1RIiVX7Vh0kOB5Dal+jy1kzbM0GU1CBOirLPg9A3Ph/LX8nh/dpq+mb5WVf1avZ/k4iHZIfIdLGSYv9KcTaUd6XWD98kcjxCGHCD5frdpju/li6lpFdWYbWK4bWFv/hvROq7Ds0bq0Ik/7JyTo0KpSIzVgSRSX/M4o3Fw== 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=SkdhtLqiakSKyFVw5OhcInPxjMlanHMFs9qBavHaP+c=; b=uv/p6x+pbXXaE1UfwpvXg+lYNBNOi+DzpCkMt7GzniSUNa9Ia9fJxE37s2ra/eeuuRQbUvh9Oc6XkJ47VoszFYgYxi9Z2bkuy6IlKlrelngP2wirtYkbhg9WTyFWWRwtMJTd1GNqhQwYO2OR0SRC9amZz3b142ZJSdpNvcDQ2NlRLU5tP6UKu9zxQ7v5nCPLQAiUXRxDhgRMxDe9P/2y82jOXsmmqB+8GoGQsgjOWJjwCHYeXXqrV93GYXz+FIeYr3QTbOdQts8BXoAgxpKEi2pa7EgUSM0qGvaCGXAcF6ev6TdELqGAfd1vv1s9C03kiJhEhtz/7gHpC0AreyPrFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=atomlin.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=SkdhtLqiakSKyFVw5OhcInPxjMlanHMFs9qBavHaP+c=; b=XwzXcF/TkxJO+Hgw6U/NYmSaGDuuzYwXBOqILDEB4Yr4U+aKMh7TWslIKrzJKU/9rSmm7NdqQo2VjqKYgbKMAk9zk+3wE0ncDHrZ2uzHsW2k9MN78BbFUYhhyl41vjHhrn+26vZ/2jeyi/4+AYFhvFESMP3M86R3bm/xQnX7ItE= Received: from MN0PR05CA0027.namprd05.prod.outlook.com (2603:10b6:208:52c::24) by SJ2PR12MB9162.namprd12.prod.outlook.com (2603:10b6:a03:555::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.2; Fri, 9 Jan 2026 06:17:23 +0000 Received: from BN3PEPF0000B372.namprd21.prod.outlook.com (2603:10b6:208:52c:cafe::90) by MN0PR05CA0027.outlook.office365.com (2603:10b6:208:52c::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9520.1 via Frontend Transport; Fri, 9 Jan 2026 06:17:21 +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 BN3PEPF0000B372.mail.protection.outlook.com (10.167.243.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9520.0 via Frontend Transport; Fri, 9 Jan 2026 06:17:21 +0000 Received: from satlexmb07.amd.com (10.181.42.216) 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; Fri, 9 Jan 2026 00:17:21 -0600 Received: from [10.136.32.160] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Thu, 8 Jan 2026 22:17:17 -0800 Message-ID: <0e76c836-c645-4fd0-9d86-b47b8834eac2@amd.com> Date: Fri, 9 Jan 2026 11:47:10 +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 1/1] sched/deadline: Log Fair Server re-enablement for symmetry with debugfs To: Aaron Tomlin , , , , , , , , , CC: , , , , References: <20260109031959.2786873-1-atomlin@atomlin.com> <20260109031959.2786873-2-atomlin@atomlin.com> Content-Language: en-US From: K Prateek Nayak In-Reply-To: <20260109031959.2786873-2-atomlin@atomlin.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B372:EE_|SJ2PR12MB9162:EE_ X-MS-Office365-Filtering-Correlation-Id: c1f034f4-a6a2-49d2-9529-08de4f46bff2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|7416014|376014|36860700013|921020|7053199007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OG1WblZNL3B4U2UzYVhZVGxEdGJLTSt0c0YyTlBoWGdpb2VUZG9JSDNRSVB1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05KUjh4OHl2MUhUMWJGM3NH?= =?utf-8?B?OU9IS2R3Szh2WlZESUxVa3hRcldDY0p3UmUybzVjQ0diS0w1UEJHeEUzOFky?= =?utf-8?B?K3lBZVRJMk92cnBoNURoL0cyNHRJa0p6Mmd0UWwxS1NVVzcxc0RLNDFsSW1x?= =?utf-8?B?MDFjdURhVE1tU09qRUdnWUZEaThPejU0QjNydGQzTlkvV1g4VDlUU1J1UVNP?= =?utf-8?B?VUFveko0aHJ6OURsMlk0a0lOR0x0VWkzaXI2Z014NWRIeWJyS0lOejFhMW5C?= =?utf-8?Q?miaJU+pQr9Vw9lLnnzvep/moO?= 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)(1800799024)(82310400026)(7416014)(376014)(36860700013)(921020)(7053199007);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2026 06:17:21.9387 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1f034f4-a6a2-49d2-9529-08de4f46bff2 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: BN3PEPF0000B372.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9162 On 1/9/2026 8:49 AM, Aaron Tomlin wrote: > Currently, the scheduler's debug interface emits a notification to the > console when the Fair Server is explicitly disabled via the fair_server > sysfs attribute. However, no corresponding log entry is generated when > the server is subsequently re-enabled. > > This omission results in an asymmetry within the kernel logs, > potentially obscuring the true operational state of the scheduler during > debugging or performance analysis. Well, if you are disabling the fair_server, you're opening the doors to bigger problems and that printk mainly serves as an indicator to dismiss user induced starvation issues during debugs. Why do you care about the symmetry of this log when you shouldn't be setting the runtime to 0 in the first place? > > This patch amends dl_server_apply_params() to introduce the requisite > logging. By detecting the transition from zero to non-zero > bandwidth - strictly for the Fair Server entity and excluding > initialisation - we ensure that a "Fair server re-enabled" message is > emitted. This restores logging symmetry and provides administrators with > a clear audit trail of manual runtime adjustments. > > Signed-off-by: Aaron Tomlin > --- > kernel/sched/deadline.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > index 319439fe1870..e64fb988e957 100644 > --- a/kernel/sched/deadline.c > +++ b/kernel/sched/deadline.c > @@ -1867,6 +1867,7 @@ int dl_server_apply_params(struct sched_dl_entity *dl_se, u64 runtime, u64 perio > u64 old_bw = init ? 0 : to_ratio(dl_se->dl_period, dl_se->dl_runtime); > u64 new_bw = to_ratio(period, runtime); > struct rq *rq = dl_se->rq; > + bool fair_server = dl_se == &rq->fair_server; > int cpu = cpu_of(rq); > struct dl_bw *dl_b; > unsigned long cap; > @@ -1876,6 +1877,11 @@ int dl_server_apply_params(struct sched_dl_entity *dl_se, u64 runtime, u64 perio > dl_b = dl_bw_of(cpu); > guard(raw_spinlock)(&dl_b->lock); > > + /* Symmetric to disable message in sched_fair_server_write() */ > + if (!init && fair_server && !old_bw && new_bw) > + printk_deferred("Fair server re-enabled on CPU %d.\n", > + cpu); That is an absolutely terrible place to put it. Why can't we have it in sched_fair_server_write() for DL_RUNTIME when the "rq->fair_server.dl_runtime" is 0 initially and is modified to a non-zero value similar to the "Fair server disabled" message? I still think once the fair server is disabled, the pieces are for the user to keep. I wouldn't want us debugging: Fair server disabled in CPU X ... Fair server re-enabled in CPU X ... INFO: rcu_tasks detected stalls ... only to realise the stalls were a result of starving the fair threads and the fair server didn't run in time / didn't have enough B/W to prevent that stall. > + > cpus = dl_bw_cpus(cpu); > cap = dl_bw_capacity(cpu); > -- Thanks and Regards, Prateek