From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011044.outbound.protection.outlook.com [52.101.62.44]) (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 D53E33A9D8E for ; Thu, 4 Jun 2026 09:56:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.44 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780567002; cv=fail; b=EMfbp6MYaWSH2NgSN2h3QIL0hl0aI5HrGlYQEF/SvDItx1btjlKwFd63+15a53Hui283GNxW6Dyl02Lq0dOZaAHbYQ98i7N63NZCKDOPtSsOXbcbspt5CtdevWXav2I5L1PQRQaCnK2GUO4OjpKF8uvaET/YP8mdBvQ+UxoQEns= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780567002; c=relaxed/simple; bh=CxJiAX/l1KVjEFpaYgHIYxcQIJVJp8HwFHzySk+pLQA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=s2S9tQF30T5eODwtq5O1X5WPUwAiCQ2Dhsz7OY5tZCP9GKZxlGSHqpWRyo21xzUVHG6kpfLND20D7vFzla7FZffLmyBSVdulU7q0DatVksSjqeAlbdHyy0QtZBQcm17bUzL5jg792briatGRlAzmu9GmuSbjXf2XwGwFmYNoc2I= 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=eYGtEsxU; arc=fail smtp.client-ip=52.101.62.44 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="eYGtEsxU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aro3S4f6R6s6Ts3jRdgXdwx1icySTY9rPqLTOIWuyKfwOoKUC0MmJJKQiFa4o/p7iwHjQ34lzSSpOk3l/eyQRWS+jxEeLSmhQj6Z5O8Z4PZwAzjcnEl2E6SE01AfBERg5POb18MqXk7R2pzKuovg4HIn0rV9/mNWexJaezzPsgMjcFqXAikrqTS/6EE+T3PFTkkCMUyqIfKP9c627ZOoZg1cP7yIYdu6XFs5jyFaLffW5zgzVQhZwnPcw2xWuJkN1ffMJFFIEu/QL8+J48GuO5xpS6j4pHQOleDXb27YaLBx/ZPgTuVQQO6YAb2EUwOvDR428oHYV0i7yz5TxqCNuA== 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=MiWrQdVPSsMIiUrfKdmjbsgiUYbHnJixUft0Y0BJJ4M=; b=B7wwx/XHhBNlrct33V5auWnFIC1Tfs8NGjejQoji/CJaK32sAe8hD6Viy2oFVcfhn0Fu86wnlJs8JvwWZ1q6aL63dLgeFfvx4CkRIGsl8RaqT8JRg8jmLVXq4SD+kGErQSAa3ZxTo/o5wBIUpPppXFt8k6Sa/+2ytKPvr7WmOqPJ435fn77xj6yx+2zPN3OJjg/5PCMcfKhzo286Cv9ZL8f4hh70/YRWjQK87sPMhqsFbmTbPysFq9KtqXHL7tqvLSqfjk3erinIaZOqk6H0izCBicNPOwy0cBxe3zHcWzqpZk5jx/iAHBILC5PI5tMUD8iO14/ALtWh2N2tbFKOBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.ibm.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=MiWrQdVPSsMIiUrfKdmjbsgiUYbHnJixUft0Y0BJJ4M=; b=eYGtEsxUw5i/nCY4fFzuFelmnQtRMYiqaVJZ0IQVcCxnuRocDidROms3fZDJiODrap908HR9QIGBQshtlZ1+gGDD4ByUWw9P4o2+nUUeVQVCNYafpIVoR8I5BvT5koW4t0izpMVqHAwR1eWobTBazB+9RUfIwmutlZYOiMlJI+I= Received: from BLAPR05CA0023.namprd05.prod.outlook.com (2603:10b6:208:36e::25) by CH2PR12MB4248.namprd12.prod.outlook.com (2603:10b6:610:7a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.8; Thu, 4 Jun 2026 09:56:29 +0000 Received: from BL02EPF0001A0FC.namprd03.prod.outlook.com (2603:10b6:208:36e:cafe::28) by BLAPR05CA0023.outlook.office365.com (2603:10b6:208:36e::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.92.8 via Frontend Transport; Thu, 4 Jun 2026 09:56:29 +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 BL02EPF0001A0FC.mail.protection.outlook.com (10.167.242.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.5 via Frontend Transport; Thu, 4 Jun 2026 09:56:29 +0000 Received: from Satlexmb09.amd.com (10.181.42.218) 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, 4 Jun 2026 04:56:29 -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.41; Thu, 4 Jun 2026 02:56:29 -0700 Received: from [172.31.184.125] (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, 4 Jun 2026 04:56:20 -0500 Message-ID: Date: Thu, 4 Jun 2026 15:26:20 +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 v3 11/20] sched/core: Push current task from non preferred CPU To: Shrikanth Hegde , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , References: <20260514152204.481115-1-sshegde@linux.ibm.com> <20260514152204.481115-12-sshegde@linux.ibm.com> <83032c54-0cdf-429c-bcff-bba4e5b2002b@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: BL02EPF0001A0FC:EE_|CH2PR12MB4248:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c790a8d-d530-47df-1876-08dec21f8ccf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|376014|7416014|82310400026|1800799024|30052699003|22082099003|18002099003|11063799006|4143699003|56012099006; X-Microsoft-Antispam-Message-Info: 8IidJX5YBmjVa+CmOxr9AJeKJmPwfl4/ihZMmjx8lH4aa5TgLoT9wvabAWboShcPmsuaX3ayw3einRzJz7BqdsZhl2f8gkTibPDPITOVFjfyl10GwDN0ktFMtxol57c9D9/PPDxNJrPsRZVTQvm+6XZcY86q4s9w5yPrh0YHzKdWnjVYqDP7NO8mTTAUz5EXbu7S/CrxP+WuRHNr+kZ005X7na/X2cXmrmRP4rVoCeQ+/1V4bZ7O/f0empVW7ENBCQBX9BQcooRNGOcMv1xWbQhRK82Ui5ChkEuF5VmMVpROvk9nl7GCp8DgT4RAGXMIMLLgPiEuexCs97BLYF7pK6KU9D3Vilq/owRMYBN0zG+BlQN5hkM+yJA3+8akuk1GHNSWei/RO0zVO6uBFPYjEyiB0ABD0Mk8tBIZPYGTQcDmrjgz/byBpXAampALZP8T+l7f87GjXetjI52EEE9rD0M1k7aw43ZJBXGOU0UnxIH1m+unxsLpGSIe5J9ibUnUJLD2R1efcr4Msx5hgZdWXtv4el+4Xf6BNBdJZ/iZbhBXUzr4ypBiTKPVIxSSzZzzQRlfcL0e3YnOpF0eZQugGWbpNAKaG4iJLDE8+ScfHnlS6pOJqR8F0jJpk54LWDpfdIEhN6g/IWgnZiXAQr35xQf8s5+eS9ZJCLpSzRA0CRK7pKqWWNGGIG+XeQoE9Yr5TWFYncHwTn4p2z0Ysi29lcYCDT46Vw6dz5zlugYce6w= 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)(376014)(7416014)(82310400026)(1800799024)(30052699003)(22082099003)(18002099003)(11063799006)(4143699003)(56012099006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kPoQSRbQnIMCL7SVcZiGXdjxGogXzI6aMCCnCWE5XyJREnW9uc7FvbQ/cTUfzQ0fjFj3lsBgH/uOmT+0bSIyHsWhU7z5L08vUOvcpTbuX+VHo4cuS4+ygIrIsSTdwlxMgakzOGofPyuI2faaaW8Cguytshta55V+ghmjkGZy+X3aq7EOmdzvHTN4o0SD58UEkrbCAsg5zqFg9ytzkWj+/oEzEgLw1jFRD/SlagpxriS1hUbjf4eMpPcDlSq8YhAquSUOZPxZgI3js/1V0fs4Yx9VshjS3wbLCPiBIE8LdMzTo5/QH1pOQDhm6lPARdqL1UrYSlQLYsGuqByayZ5QwOodpRr0taLsVCvBTTqfKzuARjyPs7ccfb7OjeSwFVne2jolPQpfEAdhQEhhWl2kL1yo/5T4+ksL74xkyBjHlI453KOthTtnl+hzH3gnuzGX X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2026 09:56:29.4894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c790a8d-d530-47df-1876-08dec21f8ccf 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: BL02EPF0001A0FC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4248 Hello Shrikanth, On 6/4/2026 3:13 PM, Shrikanth Hegde wrote: >>> +    rq->push_task_work_done = 1; >> >> nit. >> >> Apart from task_has_preferred_cpus(), all the checks above have no >> dependency on CONFIG_PREFERRED_CPU. > > Code will bloat for other users. Not many may want to set CONFIG_PREFERRED_CPU=y. > That was the reason. Fair point. Since the config is default y, there is a good chance the popular distros may end up keeping it enabled but it does make sense from a point of containing the bloat to compile it out when config is disabled. >> Can we set some local indicator in sched_tick() within the rq_lock() section >> to then schedule the stopper once we drop the rq_lock there? That way we >> don't have to grab the rq_lock thrice in the worst case scenario where we >> have to schedule the stopper. > > I didn't get you. can you explain? how are we grabbing rq_lock thrice? Once to set the "rq->push_task_work_done" indicator, another time to wake up the stopper thread, and then again in sched_tick() after we return from sched_push_current_non_preferred_cpu(). -- Thanks and Regards, Prateek