From patchwork Tue Nov 7 21:56:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA190C4167D for ; Tue, 7 Nov 2023 21:58:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 398C88D005D; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 347858D0001; Tue, 7 Nov 2023 16:58:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 199F08D005D; Tue, 7 Nov 2023 16:58:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 0B2F78D0001 for ; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D50A91A0B36 for ; Tue, 7 Nov 2023 21:58:46 +0000 (UTC) X-FDA: 81432523452.05.4296D10 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf07.hostedemail.com (Postfix) with ESMTP id 960A140010 for ; Tue, 7 Nov 2023 21:58:43 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eCzIHvo5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ij4C+Tg0; spf=pass (imf07.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394323; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wu+VhJ2pO1Rmf+cHLS8LckYKrJRdEsszQoPirKlYAKc=; b=kfL3z/PzDltgUBc9Srzq+SIJGtk5JrDABHS/AudSIaxo5PZ7yjsuUKfZ0FL14hk34qmap9 ThMTzemQv+lpx1+rYAkAhYbBwSRm+G8IvrXsoxERaj2IXgMj8Ao0qqgTSZpvMKmJlc38QX 9yWIpf4JjAyEZq2JSOSIBe46SewWmMY= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394323; a=rsa-sha256; cv=pass; b=sUvfric3g72aRUMhMniwT0x16wh4bABgCYJCmyimXIjQ0Wl1GUgLEgUzmPMonr/2NqUUZE dR5RFJZ1usyZDe1sfdWp1rvixKfnUg9WZgObvhYtdL9Rp3kRqpS9zVRDXxZ//xYxdZrsK0 iKwRRnWUN9uZoJlvB6Nky3rmkEu4HZA= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eCzIHvo5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ij4C+Tg0; spf=pass (imf07.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LKCxM023477; Tue, 7 Nov 2023 21:57:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=wu+VhJ2pO1Rmf+cHLS8LckYKrJRdEsszQoPirKlYAKc=; b=eCzIHvo5uPpWQ/fdbpt+M2Iyq3FSVYWpIZAW2xlraj7tlxOu7rNDpNeX84L8sw+jM42R +dp8sj6/DFTNmYZ1a+llaYMh6teerNspI+533WjqVOdEWzLFi0vw9nVIf3pOJjPGl0Xr ofFdeR4cLAeQpxEHRxMcQXPShA6xaSAZsiCJWPsMSyFLt2d//mZc/eRvl731O/lrWj71 CJWPu5BLwJXb1pZMqo5CIqX5Nu2qkcRXQSuH/2KuzuZlslyVx7AAqrC82qsmO112Flip JAfdJgNwHlmgUPvisxDpa/w27HO6PNmgtB7b8SQX538lNo7gfJ8BAydea5KY1iOUtyyh lA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2002ew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:57:50 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJ1HY000739; Tue, 7 Nov 2023 21:57:49 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsjd2-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:57:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KXinPCtEgUz3Of4k6r5tsOoGG17bgPKdOKvjuCO0G2n+2+u1QpgBaFr/DnHBV95LgHSBrx0//a+NawfEiIaAZlsUHDGXKbQM4tO4dmyfIDAsJofQtTmSH82yNaFNPNE012Z5LizuK3A33Wl2HQxstGdOu/I9k8t0Dt3bQXjBmbHPsvwuoQMO9XiKElZTm8WxF35yebk5s5GuIF5ZvRd3TKtTHFvEEhttcoROZxCzIQLGIl+dj8LdzRdzMjEpsn52Ebdjw2SR9kkxQ8HmVg9PN23NwrfdrN/TT5cgcYJX7lzonl70y8x/qm4t6NJs+p9AoraZLrpdNgFYXrklhNnxtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=wu+VhJ2pO1Rmf+cHLS8LckYKrJRdEsszQoPirKlYAKc=; b=j8Wv40y+GAkAmlnp6x8f1Vbkz8Ll2K0ekJnBg+8u/yQL//i97ud7KB0wiXekoJxO1WT503ZinIZhpYw2hbqv13HFHpXoIsULFJAPkgUAvOX0cwx1RZDJgCWVtujcSwczahyaU2PlURa3EGOd5xSkwQv8lfaSYto+f1tJD2MnnVulOUBdEpl3gidZfzeT8A57Qq2nR7Y3q6Xbp5bYWWhVXeyB7zEYrYAgJ+kVvlNaCo5mpYy1eZsGUZ9MwsDkpURRnMOpxkjxT62uVDnKfWPE0AXMqgGczwtQFuHLCMrsZW6M4GsCNaIXoO/5W+9zkODVyNdgSqAX03+fPe+Y/624xA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wu+VhJ2pO1Rmf+cHLS8LckYKrJRdEsszQoPirKlYAKc=; b=Ij4C+Tg0/ncO3XleUZKsh43KqzlavLAratDYrl1c/aUUW0J6YcN7oDGBQYCv/ysD0Xy5AqTlYZGJ1cgOnt0JdgrhofohFATyATffSMMzyiXCwOIsKE6TigvwXTu/5Z7ST0WwpFfPg+0YsUP2T0GETP3eIg31pf6VrBkVpR+4hEw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:57:46 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:57:46 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 01/86] Revert "riscv: support PREEMPT_DYNAMIC with static keys" Date: Tue, 7 Nov 2023 13:56:47 -0800 Message-Id: <20231107215742.363031-2-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BY3PR05CA0044.namprd05.prod.outlook.com (2603:10b6:a03:39b::19) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 072ae498-3762-4139-efc1-08dbdfdc935c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g+UYf5igqcXQyAZGxFtkYpvM3kwzH8JqEVue1tcsbyyBW5tWlb+LkKujZWwbhLj0DBFKTKY+QJ6U6apU41F0+wAAVQNmhQuxXBf3kNZ/Ioz6gBiL4oxSZThr+khtHkwthIzlBg0IU2s4zbxZ/scaecV7Xl7TqTtdCsQk4UWPNySDtWTZ6Eh8MIbZQWzYiUyf4K5SReqPrW7BMgBrLzggF70hpiuUWWMqGtva1q5xOx7n7gbnbJ7CjWG1lIdRcXB1Ic2fB0fwgE7t/okzO1TwUWa/YcPplrgKBT57QVE1R03m59KO8xR3LnldQtJwe/paw67hcPnIoM2wSAWdQJs7QZc3BQ5vQ/hstaUa1GKW2o15bFcuKE3vcgoYLO0udH6F/Wazg8mlkhRUN4mRX6PRpP6sA7n305APR1djhSO6IWWGAoJtGb9Pi/W0eyPkfDnQcaOVLb+iwwZ13xNat/MkybmAtLCjHpq5qWIw7xCG2dafrd7J1RIExNz/s8CeqIe4R9dma6U2EzZBN2N8BDHRvvt8BcC2BFBsLsmzdFgqhQP+/qdiJkuEnpElw/nFRzw2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GB0itXkc6TEWyZXo1N/VEZoYxf+SvDXedFRGElBtIZJ8n+GMpUKgHD5eBScsqPPa6OAwWj29WWU8UOV52SbysbbMk6gbvDbsqtt1L/tr4G/DzZI38sZqMsyb9k7vE7BFY+OuDv02R/sY7mvtLTm2uogC3L+CNAY8VxLK+t34CJYtKb1Xlr+Zv/n94/roAFCDqvmVbVWyl6oJernZRVgr50v7ufBJ93H8RAmpkuLeAL21EOHofTG2kBp/Hk9ayWyOPZJldHXXdH3N182A57H2yVeWeSh4jnOj0kcO1N0uUhDVSIYzh6OnqkkoHoP7N/lDRJeeBoJW/gyxooQn3DgWRZg+XJHpdXKQ0QHx5waagcJjjVfx6/annP1dObcnyPrb3N/s1U8FnFrpKUtyiVGRfFI/kYI4R0AEAMpWqooHfcLtUxTR9m1NgEVwtepRzbMO7ny4xCmYf12NmMB1gxQ3RtPtvswETOn+MjUOANs4SOc8o/9C9YwWFUzWtIVzCuOcyH3nTj/evWZyuvgIVNUbkxXUKMuGAPJZjCxE4yfXbsBMXg1lcrqI8MWEvUgfPV+UHGOOq7sTVyfdd497HHIltTQyM36pK5utiSY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UaXZxwiZZoqnivl73KYQFhHw5Ey866V41gmbFUAOfBGnIStYNJaejJW96ZG1am4kZrUk8mvG7OaxFocbSIp/Gy4fIIWuPrfet7VZoEOfwSI/3TgmwOx5jOQpPT6R+Ae7ma/LOlwv3sJf9sJ25km0QqUGDWGYtkDMHn5oTVk9ax59NdT7J7STQUIHrMhCKlFE+rP7c0ccmgpuGjPVFsJsit6NNkto2VtYqfy+y+1H5LqZ9Co107Pc0IpGNuZ0F7+iTEr6q3rcxcWBVgNGEAXcV+T0ctAaH+8HHmm1h1KCbeH5yxRf1iCmr+h5vPUV4Y7hvCiBLzseYEwIzes5E/bEIhNM2p39j45Q+LTfjaU3F16kmAFeq88uAj2yZOWf4OwODxqjM8vBEb2bt2MWWwNYoe3tMLGMXW6QYZESsqfHZci4tZVriEI8/uYlUO//iPnwOKhkepWnL0ibz9N2Isq9a6HAGw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 072ae498-3762-4139-efc1-08dbdfdc935c X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:57:46.2734 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Narz7qXoNeTwFsoprmgVQR/jmB3ec4bAAacGfkxUtsUa0zu1AAH7MOrrpU9fPvKxJpqka1Z4gj9oKfGmrax2IZBuNwzP0vYR9UTBil/nj5g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=923 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070181 X-Proofpoint-ORIG-GUID: XFukDM7U-fr72DKERbj5hlazbtitA6w- X-Proofpoint-GUID: XFukDM7U-fr72DKERbj5hlazbtitA6w- X-Rspamd-Queue-Id: 960A140010 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: bdsqyx51kyd4c3pokd4n5wj7f6m6fqgq X-HE-Tag: 1699394323-34208 X-HE-Meta: U2FsdGVkX1/xLxHRuNWHcWqc11Ruf9BZc685+AharcEHie2k/HeCNpi+IajCBzFf9dJSDX6lhqFZGHopPhbN/2o+YDeIFR6JLMt5aZhKhfIUjkkAmcjCfDkqXoWewkYQKhfahlalOzagKmikEMnWdsPLjT57zC8jhf/7zhaQfB/uepumz8WZXl5Mk2gV31LsmGvFKcACpSpzj1p+jqxRmNE227utVrV90powJP6TwB5uz90HI3HYY82p5rBXRUIalcnCCD4wLcoNyYZLwvaDBxHSIhGwSfTBK+7vlp51iunlwiMK6tamkHfeBpmGnvNf7+7Ignwk8dQPmaxMeY9/8YZUxr1RFIgnPoIkwg5iGke0ffsCKH3pEWQeASdToUtFW2Zy2E6nrUXk2Kwo3yc1MYdo0a3fxY36pKsjblC/7nCRw6GSn3WWTMKO3M529VV7go7otYa7zRiRxV1mK8o9SEbGs7H6UiMeMD/RSlE7fz3FTvMJ2EHS9q8fTZSTA2Mw+A7K0huiP1XoDkAROAbFXpokF7E0Zfe3wR6kBSyLcmlWw13nDSKPXQSbfXeEZieJM+zEjSxhKGlmn0hvS/3nnM2xw80WpHz9xFfSHKMwArPGzBulGxjPfFpcpW6V+NdahD7U7azEiCoXyV9QecIXwa/ymKArwx0E/7FttgF2BRZdvyQYfUuVJ+dAsNfAQdJ7CfL2kemiJCisqXvBMetZACSHQn+Mei7oLf1b5cInrip3VTJnYsxiAyFLf0NNkm4oCv0MU/sOItReGRgR9z0kgZ54EYh5yuc7tLc9PZz9QsO3AJaxNxs3X7lcHWg2crvnrP5m3gjOMqyYZuQ9TiglSoaxntkoBvqxm/qBKjJuclkZAkTzrnwdgRCoG09mTxcpyUIWYMHm9Mk43JpyuBi5vWuXPgHdpnWGVwaGvMqCx7m7VP7NZhvIm7kULzfZqT5rXwPQv/Resjs5c/V5voW ESV7RjM1 UUdYNaCIBZBsMTJq0wl5nE3JooVh5M1VMVIJykdlO3zX/W499uzJVECGXnKWmLaXqB5P9HdIjKzfy9/UKTl1usS9Ch/3XQ3HEScNRzc1O/OsuvarkUSAk8Pv5v3yEdnmTT4t8/U7kuhGdgiK/ASi5MiA+utsZiNMuAgI/6BijULwcZU3/uOXNW6WjDHepw8EmxucStp6GCACSANvvudvXd1EfBQx3LJ2UgVMbZIa92xOMNbfj6ToCDIn6sHgcRe931T9OW+9MuJjbyFF/+ZQyB73uZUrttNArl9cVsWXNm6MrfiwKi7eC3Bs6JT+lxmtGGTt9bFGeyDJL7WyYz2jTM+sazp9nPL+Q5hlvQKPlAAqslKcwK2DrxsJuw6KlIRB06VAk871gGddG+Aub5Bta61CclrphSI2rCLz34gramD++g+Z/vpKqHOxGdC7D8i7x/+c9/1mSiY+Io02pIuGBEjO5+w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: As a consequence of making the scheduler responsible for driving voluntary preemption, we can do away with explicit preemption points. This means that most of the CONFIG_PREEMPT_DYNAMIC logic, which uses static calls to switch between varieties of preemption points, can be removed. This reverts commit 4e90d0522a688371402ced1d1958ee7381b81f05. Signed-off-by: Ankur Arora --- arch/riscv/Kconfig | 1 - include/asm-generic/preempt.h | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 9c48fecc6719..4003436e6dad 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -134,7 +134,6 @@ config RISCV select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP select HAVE_POSIX_CPU_TIMERS_TASK_WORK - select HAVE_PREEMPT_DYNAMIC_KEY if !XIP_KERNEL select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RETHOOK if !XIP_KERNEL select HAVE_RSEQ diff --git a/include/asm-generic/preempt.h b/include/asm-generic/preempt.h index 51f8f3881523..b4d43a4af5f7 100644 --- a/include/asm-generic/preempt.h +++ b/include/asm-generic/preempt.h @@ -80,21 +80,9 @@ static __always_inline bool should_resched(int preempt_offset) #ifdef CONFIG_PREEMPTION extern asmlinkage void preempt_schedule(void); -extern asmlinkage void preempt_schedule_notrace(void); - -#if defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) - -void dynamic_preempt_schedule(void); -void dynamic_preempt_schedule_notrace(void); -#define __preempt_schedule() dynamic_preempt_schedule() -#define __preempt_schedule_notrace() dynamic_preempt_schedule_notrace() - -#else /* !CONFIG_PREEMPT_DYNAMIC || !CONFIG_HAVE_PREEMPT_DYNAMIC_KEY*/ - #define __preempt_schedule() preempt_schedule() +extern asmlinkage void preempt_schedule_notrace(void); #define __preempt_schedule_notrace() preempt_schedule_notrace() - -#endif /* CONFIG_PREEMPT_DYNAMIC && CONFIG_HAVE_PREEMPT_DYNAMIC_KEY*/ #endif /* CONFIG_PREEMPTION */ #endif /* __ASM_PREEMPT_H */ From patchwork Tue Nov 7 21:56:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A86F8C4332F for ; Tue, 7 Nov 2023 21:58:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1ED48D005C; Tue, 7 Nov 2023 16:58:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DCF148D0001; Tue, 7 Nov 2023 16:58:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C21A18D005C; Tue, 7 Nov 2023 16:58:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B34388D0001 for ; Tue, 7 Nov 2023 16:58:46 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 81D061CB5B3 for ; Tue, 7 Nov 2023 21:58:46 +0000 (UTC) X-FDA: 81432523452.09.618D367 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 1D7D718001C for ; Tue, 7 Nov 2023 21:58:42 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Js5EvDUX; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lCMeYZkE; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394323; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7JkV+kciTmBpnKqUeLe4KVhAUVBeoPI01dWAxMnt9wk=; b=KKfwiQe/i7rg3pUe+Og/0IJDixZDQGZGJHok/41NPsBqW8CofCjusIyNaQls/j4Q5RX1hc VWvSa27b+wlMKbvpZC8TrqiuKw4TVVoPiRH63XqiKrVnohyECU8kSPMh2YqRtMrvkjcyXb iFOdO/suYv0lK7H83Hr0dawF6Q0EFOM= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Js5EvDUX; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lCMeYZkE; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394323; a=rsa-sha256; cv=pass; b=guexUFkPJbw1M5lJsRErv/kUjnnqAIEygw2y15d+GM/HrefZ4XbUXGLw4YFpefdYEWur3a 2j5wO8ag+nzgk9StRJyIs4Y/oLC3XT+aHBP0Lb/SRs7bSBkhiMZ8LTmi0Mf9lZBeMI+6h3 wzGjDGFPsUoZlktCRXcb9keP8GIije4= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJaYI014901; Tue, 7 Nov 2023 21:57:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=7JkV+kciTmBpnKqUeLe4KVhAUVBeoPI01dWAxMnt9wk=; b=Js5EvDUXE5efVChn+JaiEFk0/A6TinJMyrnQe5SGK2EBxqTH2E+aHdhy+woSnHBsVlUI GFY0ZYTD9QlreI7ZD31j2da0GsoymCSdeNvoibLu8+RUGWQ0KN5jYWDpdOLn92Uqv7lq jetuKByokgdiNfDVkR9EV0mvzq4LXZFEBMheiRNx/3uRbyQrs7To3zCOU4wCrt9WNF9p PWN2jx4f6hZaiYuaxiOE8c3hScgC2olnoT4hSoB7SrslFQfhkgt/a4gPbvjOS9IQfJc/ TTRsKA+xKZn2pj8284ePQkylp9vRCWE9DEXTve0UUMEqGT4oU2olWpGa3gXSUjCOHJ5Q dQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2b2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:57:50 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJ1HZ000739; Tue, 7 Nov 2023 21:57:50 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsjd2-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:57:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gxmvdq9dtQAuuIq/hBR5Rfe+qKEIxqFMTj8LolanUh/jLQswyoJa7RXzp63wVlaZAnU63lTnQkKxJXC4TtWR0lyIHie/XclRfesQin+f8uXGswUUiB6YvwKYzWVo1VtIU6snM1fWjCQzvSuXOD7hR08MPCi3VJgjPhF36Q/LjPB/Y3fv5e9gyKwaiFbAipf3yP8SBNqws5cVtO9obXEnw/A9ArAaaT1X7VFi0t11tud4ZOiJatwdio+ezS+b08xb5m5Tf0ZbnaTyyHmw35gY/SRf6+GnD2+x2LXmKQ2NoXMoCYinxgiugR7wMRhBvQkoJRZNGi+V69dgdFrtYtEP4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=7JkV+kciTmBpnKqUeLe4KVhAUVBeoPI01dWAxMnt9wk=; b=bd4Vxgh97UXcuE3528iV/jcHFjAQhuL8Z2+rHsaoRCvD4Y+uHzfWPyBRcaELWUSxuINyhj2MU1ghbDSNQoH3TuZqyAF1Ax+6oJiGsC90Jmpo3G93ZKma9CnOQxzu/u0OwXc4MIhj7oXGasLotY7qCPNNnOtdyR7HwWF2J+SvQI+AEpgfREBTijHjX6ljroU/M6QL/KWLWLqkNA9muAycNGjjKaLJ9t2YiqP6GafK8vv6UT4LKbkDmPyqa8clFuRXAVB94tb4Y9baW3Pc3aF8QoLYs5lqHNSpVcrA8Gwc0ijfwJamSsxvU/EFcWbn+t5K4PbygkEY9xuxeopWBZ32Vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7JkV+kciTmBpnKqUeLe4KVhAUVBeoPI01dWAxMnt9wk=; b=lCMeYZkE/n+Z3WsJL1yPEj82JdMtbd8yHwdoQEukZ54dOYinzn8AHQx6uRr/Dwkx3EGUc3oOPLlshBFSwF+KbB5joXiSUFjq2lV4blvzZZ3ggIFJ1F3uh/bGUg2LOcyt9Du6GlQ1JclgG/j8Dv7xuJaWdjuEYn2WTsGDPmtvLOk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:57:48 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:57:48 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 02/86] Revert "sched/core: Make sched_dynamic_mutex static" Date: Tue, 7 Nov 2023 13:56:48 -0800 Message-Id: <20231107215742.363031-3-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BY3PR05CA0041.namprd05.prod.outlook.com (2603:10b6:a03:39b::16) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 087f5a81-4cd0-4c02-98a3-08dbdfdc9484 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xG/m8IW3aaYgpJkgAuVfuQsx+R1JxxqDj1qlYMggpRJ8iwHEMhQDnUDtrDkrO4zalQUyAgYa4XO21CZAibzp6NIug71eOi0NKSaTkqLUzhGUc2qvEU/Fmve2PkXGAttF3TJso0fksvx12LnJ3pofKLJJudv2csCvxN5GLFAFYgZspOyqiM8TYCGbSHyKhD8w9fUZHvIdtftERIF4gW5dCR4cW0Hu4Q992+Aa1dE44SdKE06qJS74tfXaqsyGAWHJwb4hOoryjtG9zBt+R6nypPKEBMhlcBdokJd/0exs08L4l9Vk23dOU0qP+OhTBGuwotSlf6PrTepWtCEEZIE1TrdGAdU7fH72yCPv5hdCZhbNRZOX3ef2QhwvJkG+PnzOeQpYKy2XgqZtfU7UjsCoY6qepGvW6CybhpsfMOvXD1Buy+lN7RrjjkzjBSa4JbvNSIjoJtQhSILZv6BprUKKtTwZaYaZXPkjM9Vqdc/DfY8c/J1aVGVGOPkScYswGnLIX78euwtcnwINfgbej9pKqHbrGUTqDPpdb9swhhSCms2sIlNabDg/7N31/I5vFbxE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(4744005)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CdEXP7tzdi9FSzZmTbvX86r1Xi/XvRMZ474b5FTyX0Z4JlpOLP5vUSP5XE5QavJh0GRUVoz31AJMHvwMY2Y7hIdJsRUdB83Q7cmyvGc56K8n0LF2c1EabhXgDw7xcGEE8S29tQlXDCtDKTlB4GjcbUpHoDY+f5MWLLfcw/9PF8JYXtsR1uxUo9T0tzKpDdtVxVXvRoxocAUcXB174splQaixNQCLFVupEi4eNjxQE1LgjTTd+8nDWUR24DuL88qKr38Y3nlQToiLDF0b5rNnWVJdVxbcEd1VQ+i+bE7/79S0Lq8JVnkMP1nZnisUsfZ1wDSz24sY+14jW4CYWEDb//T5pEy+IAMwB5eYxktXBG2JDzES63EDIFKTrM2JZBcpRCWtanH426uoJD+NgJ95lHxZ8K+5qoRxMKPTmB1iIoDQDp/N+B5VjC7VXIftBNQJUvK8jMukALP+y7XFLBL34KsYbl6a5Jsf5cYtGelYJAGyMaJ27bEKYU2/VY8anxBUdDU11V3rhMbE31tgb5Vxmfq9CtLYl5XTQufJAoxbKYsazRpHJy6znyDuHskwyy98yCsXgK7v6797SXxUYYLYRvOdn+Esd954rjzcxHL1yYLu1UukGtGReRzoGjRzA9jdCuA9b7obnVmodbDy8sD1QP1R/XyUt8ihcAUJUYB7lKE/0xehEr4dyEnwQfVfozZZqbFowFsMH/r+8hzlDNsYlSKfZQ7QCzqBuf/e61ZdRikHhanux2HQWGqczjRKJuaj5MusW5p5TWjViLXkzoUQHnE9x1y7GdSaK1UQP6irKNiFRD0cBdama3E2BwL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E3f7PZvZl5lAxGsKiKOyPQEHBUSkSJceoF7ioVN172tH3XbCn2tj0m8Dd36eWzSc7t39fq4wr9vl0vhjIGuvYREEeNP1bz2LvrTqn23guo1LHHpRIW+3H85kBxEWBekW5hwL67xKuEO7QXSWKnY4A1svpw5n8uJ51MloGDm6xzQpzW2S0mJDd3A/rc2ilvT/0rse4MBAaJ8dDq7jLWz8hxnml0WInpxOdKXdwpajIOLNper3P8O+/9vMXldHkTx21XgEfGQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 087f5a81-4cd0-4c02-98a3-08dbdfdc9484 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:57:48.1973 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2QUHnjeBpHLegz+VzPQ0zCQ8KeN/++d/s3NdyQRLFsWwim7DPCfgoJ2yO6Lo4z05sfT6Hp3sv0q+6EH7SZiYbS/Q4bDZHmr5JFQKD+gykAQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070181 X-Proofpoint-GUID: tjLZDkD0QR8E9nZqXfsH8d4AXAvL1qei X-Proofpo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GswvEKutBX2QtqUvN5Gmg3mMu9DzN+Yb4kubMN+i64EmIUOMaa8c6bD+l6n6d peaN4Goj LQgu2pRQLVCeRIBS9efH3DV/a03ZwlmxTEvTlwzqP0hEuAAs7wlloSf1h1Ey+tEfhhfmtL8cGw9G2bqUsZ0dVUBM2gsUMHFG472qsloOaQxc4b6dLSkr32TYtTU8JuSR9IH0P+NRgDodytx/HIlZ1xwB/RSYJbaQRhUarNwCE1DpTn4bMEt2z/hWJUuBOC52Ms67FmXACiNoXy4/iL0njXaSVWKUXCEAZjUcHZEa1rP/K2ERTGSGnHwffchAOf9ahp23arHDdHBL4qieYtWSifU6xdWO6xXRlMcFJXcOwZxqjL1SUAaOfv9GL9meIOtqbpuOcAVAfxI2RpDhawqjfysDrxKgqxbaY0/pdqruHWTWhZ52TBTb4YQhMAcce7eU7HjlxMuEwr4dgl6VhWc+fRmQ0hh8k+f/wCIQgsGiP3OhCxAU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 9b8e17813aeccc29c2f9f2e6e68997a6eac2d26d. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 802551e0009b..ab773ea2cb34 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8746,7 +8746,7 @@ int sched_dynamic_mode(const char *str) #error "Unsupported PREEMPT_DYNAMIC mechanism" #endif -static DEFINE_MUTEX(sched_dynamic_mutex); +DEFINE_MUTEX(sched_dynamic_mutex); static bool klp_override; static void __sched_dynamic_update(int mode) From patchwork Tue Nov 7 21:56:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85764C4167B for ; Tue, 7 Nov 2023 21:58:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E22538D0061; Tue, 7 Nov 2023 16:58:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DCF668D0062; Tue, 7 Nov 2023 16:58:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B85878D0061; Tue, 7 Nov 2023 16:58:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A87DB8D005E for ; Tue, 7 Nov 2023 16:58:48 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 88D92140BD4 for ; Tue, 7 Nov 2023 21:58:48 +0000 (UTC) X-FDA: 81432523536.25.0152593 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf11.hostedemail.com (Postfix) with ESMTP id 2F83C40020 for ; Tue, 7 Nov 2023 21:58:44 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=IszQ7sTj; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qzKN2kIb; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394325; a=rsa-sha256; cv=pass; b=h+PB+ZzoLjn8WPuNzfSLH1piQvOCDTHccKD4LVISm+SCkZv89A2czZ8ZV1Bq1RcDHkGpJD 4HMKp5gVEvLZ/KeGBFPkBLUjDCsQNxC82TOs9CYgoaDOKJ6slLk2+wnUZpptptwJkQxuLG Q2RgYym/190TYdLUgLU1/s3S+SXANq0= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=IszQ7sTj; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qzKN2kIb; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394325; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lSHJYOhJH1cM0w0ObGeU30WtZ6GiFFGTdHFP6PoG6zc=; b=MIn25QBteq4uIgYBIQ8FZDYtnHTnLtyzqiyy/HSXb4g0IGvMb45Pe9LfnDA4V1vob2U6Af lJcMH7tfCPxi9eIPdkq9yLmgG4h/rKVq1h4D7+G+Wi2jNpMFyyNIOJ1e67+3YToWnPg1Qi R8cN71KcRU/i/1omOzeXrLCKPHqQkTY= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJP6G004600; Tue, 7 Nov 2023 21:58:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=lSHJYOhJH1cM0w0ObGeU30WtZ6GiFFGTdHFP6PoG6zc=; b=IszQ7sTj+o41AwIQwmnJ6fRqFwWje0XT+GjkwF7TO9heWpynVZUtS+iuqPgmBY5RnJ/p 0PIuhPkC6YWmmuueGj4pu+2MoByUU4TmBbD6AOO8cRf29eAr5BK1D0ZxLDFsxQbehXoG L32rbMStmeTTkmEJNltos0ciwQ5Wd9QQUC2RU7p4juqFDhbsv1GVBgdy8qAmylzADw2P E67hV6BvUS2QTrXgk5F/ij+fa93LHNTK1LkP02Ke2JBBmpQFA5GgtKsKv5jysbcK+VKB wI3H8r+RPsfvN5oEcfv887qtJu1IUTghwsECbWC963QvN5158q6NNxJ4bHNXqGXfy9JH 3w== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2a7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:19 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrDN003912; Tue, 7 Nov 2023 21:58:18 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsh7b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BwZtYe1YYYEvDail/OEjTq95yZ8vxFPqjbjT1vS6mJPhIH0ecWJg6EY0JdL1Lth3UBXJKdSVu7L7FGU7VMR1Ri9yWK7JKr49KsP9SSDIzzXc3Qtdm+tuDokXDrCQ91agDVcUjYN0b2HwL0yvKaZ1o7P+1edryRAYBlnKq6xBDL7zYfJeTGJv5fc+5Csj39f87z4aVb75j11OmGX6rBpM2R17HC7JwTwoN1SNGJEHCcuWeKAt2qLqyf7knwqHQmwHmMQccUVvOTwfw9Xdrt0bqAKmGDa4goYnyQJejTV0IRLA1ReQ/NCHL2/z7cWufUR1+TU6aDcMHuJ+ItSBTbIDSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=lSHJYOhJH1cM0w0ObGeU30WtZ6GiFFGTdHFP6PoG6zc=; b=EtVyvGiTc6Qde+dmt5RhqfnUa6i53Fe7STMRVwStRcpyTziXVTd/XYRvuZATCq8IJzMe897/NB/8RUxOgEYq5tPKMg9WgSwfr8AE+Q8oROvhHGqBL0V5Y3hpmgDEfRJq66exxz36+Av2ysqo+O1/HbW6vYmibS6yIkVM7OjyxCzrTOOb2ahWI8mQtzY/Wn23w0nI6T9xDvofbCdZTOcs5WgKRmT7Femhw+5tCQvuBQy4A5fiJlEpDgPpdq0HFMNWw9d5l5ZK4MGSt+nheSU0rtHiCDdXjMMjRuzfyFLwyKsRc0ntAwkywIH1BGFh5jZZ7TJ/8PZjrA2sZox3GtYC1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lSHJYOhJH1cM0w0ObGeU30WtZ6GiFFGTdHFP6PoG6zc=; b=qzKN2kIbyNzmUtgoP50iQ5Xj9bawtp7hDYbonHXuxtsRzKa5/+zqqMiuJpCNPYGCW5Y8ZRNlcE5oYkUU6UIS+9v1XXTfSktx52ozxTSO5k8fP1Qu4zKvCQUwHScwVNWa7SgQ3Eo+yTcXY1NRAF3GQWrCEWXRkc7x7oP9T2S7eKA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:57:53 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:57:53 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 03/86] Revert "ftrace: Use preemption model accessors for trace header printout" Date: Tue, 7 Nov 2023 13:56:49 -0800 Message-Id: <20231107215742.363031-4-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0136.namprd04.prod.outlook.com (2603:10b6:303:84::21) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: e044a1d6-797a-4f21-d1b2-08dbdfdc9799 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: viKks5iqpD6nVjDDkIOfRYuh0ef7bT7chs+Dozjxvyx79ZE/EM0h9EuPijZIYVycTJEVs1QpeYMJ1MeRf+xihrdsz4sO7Vib82DT9n98W4831jaDCX3el8E30vHEtCfTUJ2wSjB5An6fEosBMvCD/JzjEK21aNSLHfk23ckfgVfJNLVhq/+2xQS4wl+To+ixqPyD4HIETBDpCXaWFZxVRq/XXt6uQsZmjJhdyHSYOaMgfRpvVEcZNXnfavsOFKSjQxNt3ljCUjsXs80V70haIbJsr8KkJViO76gMML3oJbeLCM9A1466SGA2OhiY2LRKIcVczzoZlb6KzfO+ld82h6Nv/EaAgEYPl74woQJXYgv2y4mXTTQItQ0fWymhEhS65uh4XA7f94V+POJgVao2pBe9kL4k+O5SyP+/JPoWsrHDIPrkwyEL+dUCBmI9mnMQiNvqrHppxQ5rcKgIC2iLMAXMZx1H61Wr1tOXAfBt7DXdhfdD/FU3SxayWtySJ2BteJAW5J8LGhdBCg1HfUe6Q+5GwDh8QmW41OZOBTJ8MNklVdVniow6PipcfgYMVVJ8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(4744005)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: weBZYfqbZskq+X3vX8zDxufGKYDa+H8I5C/+RsWdHQu/zeykGB88oleyR00NPvYnYLe/s/quL4CcxXzplINZTY1xh0pdnqoWxiE35cl/K5MQdbrJY8gYez6apxTau6Z2Quoez7VBof1XI73HwNqZaygo6/iBOOZsfgRkSjLY6e3WZjKPaIEsRK0ysT8q4FMHZnPL+t5BMv7kbVSJq80OyJdvh4sEkaMcKvdktRWXdjcw2v/LIYC1K5s+6pVtcfeZfo7LQKrru1FzY5aCZZCglj7RGDQRfY4TQwNgAw7G9VAZp5lKvTX6Uf4ECQ/lmIvOMxW7ThdMUuUCIzSgQJOxbqFm/bEVAM/1XPf0f+xgUFxWDIp/G/YWmYWfvN+HsGJzaRMd58OPAj1CC2FlIZd1LQcpk0hlSK4/+TMZVDJOuJAVp8T7f+Z/sn7l/AvWM9uxIi+5rBFTVh4ZUN1RpF8LbQzQoUVebiZexpfvUI3+4sKfSFFKMIg882hJDZXwhK0xsFz+gGYVApzCrAQyV1jLX3VXN5L0Xn3m5ZtIioI8rRhV0W4+9I6TrxCM+g0ybAlnzDMWeWR4FeU/rCstpUQ60s638Ij1Gja8Li/o2mTicvm7u5USPqXh0Y4rsUBiF1wo8vD6iVGTCTag6t3g3a700wpSMAWYRSb8YxnDemaLH2sFwADTAVLDAGlI0Z5Pya7MLGK1l5p915/Nl+LjjNigr49k7RcU0dp2gVKZEF44/E7CNO60B+BkvqS9wjLBst9nU1SfC4uFReq9fwqBEPqA51ryoMGzds0RTQjDWDwuNVAZrr02I5rRalrI9DuW4Et1T5IRyF/fcn4M4mwlpkGYp6JkXFusTPQGjdzTQQg0nD3jJ4BY2+86V8sji6L24ge3xkjbGMx7/mHeaChfhCEFwGxfJLU5m7zZ98Y+8jDLqIgBKQt046wJznCvPlEAGVpdu8zwzSoZ94VzAnp1rsVMBh5JLtRLiazkeYJjI4ENrruc6S++iN63SRNU4O/Ab8Iabt6JPTVMbveRJesiCk4hZnUVbtizqTVM9+wfEcbHXsxwgE+KF1+rP13JyviWTOE2i0dX7yzP7MG8MUX7immBXJI8fdBUoV/Kquu3nlMxcasjpCQYtt3X7Mf+LNQIkda3smi5i6TFmh4IW9GCSya1CZ2qPe/15L2+d8orS/IgzW0TtjeSwQzTxew4gy6tp2HIT3nbS9/oua9E/UKd+ErFdp0KY0biD4FnurCdkEnCkVeYHj1vU35Ny/6c0nm1ce7v1c2UW5SWr51evA06jODqvS0zsclzMLtx3EPygfP+UQqHsG8+KNkTJ+O3jn1Hrat2ddLYFJ10usO1Btw5JKt3pXG8EYazino5ZfJBJyuRPQ36AWeNIi5xcfhcpnoHIuHM2nQTRp0HysQ+h3oyrVJe/pJIknrTH91Xl7JV10eIF0dFVVQKhV7PLHfqjuRaLOBb7knChbWCugIVBEnqIdKSAW1plUFW2qGgVYkSV41ckzUpVFwVisFiaQKSPUMCa2OgB+FvNy+HvUNl+DS8KlwwkrfgT2Bk5CTZwMcCioN4pOckJhjin3JCAFGP6E6WO9DVADtYPPy12/3X6lMrgOCACw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: qJAYUBfs8oRhd15pCNI7F2fBv6Fb06ZSeRN4mbsJPvpiQh92EKVfczTAGO0F5og8mmczEgNd+AxQ94acWA49wJt8D5dkD+Yh448UD3YWQ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kqZi1b2MwGI6fLlaLmZU2m033FCZLeGLy2CB8A4o4qI0VvqrpVLc7VWG9Nd5npUroPo7VDKWnFMT2HFMF4RmddYcCDz9lJsPz3x8BXMATGMHF9s3eN7Oh9Jfad7oM+lV8SxK2Pqh03QdQuGQeuij37iSWZFZ34Trmhyuqk1DHqr2Zcj3l8u379kbhn1QMn3Q5yvEME3+bie3xsddGfinlr4SZ7EOnv4hSAO+zzjBwUa8OEMtrFq3vXOEVkNGAh5Ki+jWB28/2bt2XD40eDE545TO0Wlm5PUF1ETtW1qcoNKemsGxktYVHuX/cwfPOgN4ggentRoPBQnAkPLyrJb58cWld2QMmg5+buYMHEVw+GujLkUA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e044a1d6-797a-4f21-d1b2-08dbdfdc9799 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:57:53.4683 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2Y4+CxZBz0b2YXeDco/84I/fE3VrKfujSFKb1GdsytiX8L4wVmd6CxRopHdwX9np2Vn93jjSXGFUKxU2VpUrWrvjmEaJncXBCeTlSk4xTXM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=888 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: wuMSjcSazq8RICIzAXl82AEvESFYohml X-Proofpoint-ORIG-GUID: wuMSjcSazq8RICIzAXl82AEvESFYohml X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 2F83C40020 X-Stat-Signature: erhs5bczb9uqjieso51hf91ohyg4zd15 X-Rspam-User: X-HE-Tag: 1699394324-833214 X-HE-Meta: U2FsdGVkX1+S9mpEFUPNC9hY1c+ufFvUcfz3oMZawZ3r0fTLAQ6MzjG5hz5kTyNy8o7eihPQ+RWA5E3cWtNkEJlngL5wCp6CmGDLooEPjC2ClS8dFvm2znnniDpLsbiZ5HmrU9CcIQ8Yb32tceFc5dHnKRu0KKVxSi+/4TbmZq7oFXX5sUBU1aHRl8AH2PETqb4GaHJhey/ss+rnA+Q+3tLxGEClBcufx46A2EwucATgrhFmGDdd/eQI8p1H+tUBIbsEBuRrv5H1qMso33TjXlpaJW/gZWfxxazWfKLmewdcpSB2p49eTDMMI1r0mX/9oAK8HAjzHIOJ6rPVPqiDG91F1tnDXNMhm5C7EA9ZbBFgF9X++joiQtpHTfzu5ZsldUUASFVEwlc7rkEb7qqtwaqrOhWrgcWo5TpxIwaWwW0Q5hz2UHrlk7QsoWlwMuPD71bAdtm9sQaZQZBSANkRwDOPjBSx62yEY5K/b4IrRG102/sdk5Qg+cZi7wOLnMRoeqLIohTVDqyssjBnEn9G2YTm9+kfAMPSjD5QJKFuOj2xCReIxZnmi7lOQmd0MljizCm8crDZPY8GxuojV5zUS7v8NPVdIj3AG5Cc23wKVtdmlC6bPb9oEbNEwDTCf+V9+YljCYIqJ+Hr6QJU+J0IctLBFxLl261hetjJBEPjYd0Qt23EhmIJOxQih4VlAa/Fy9PvaE3ouDO/V1XTT3AEQhg8HtnVZcCjVaSVq7GO8SKL9wdox2bS8lFqPceVXKVJRhEYeXYx+slZdnLb2/+LZkJ07Q5aZl8lvRLwSQMUsF/SRMmFnPS0E+rOsBZdI9mpRFp/6HcdSuzT3NQzlsaFaeSQS+qka/5TA9KMScThpQOzGGptZEQdwNrQxCJqJn/ebE6DV2f+50Zblll2G31RATzcEktq4pu7mzgWMvx+jnyeqW4n0Q3FuH/99N7OhOrdPOU9GEj1Jyx/DwkXhuz 2nwsSCYA ZQalxAdaaCcQgA1ao87bHHLk37eP0pEpYL0kVD98hjFfebVUStLLwEXTTgQbh0bf8eg3LFsQJveiWtkpKYb+cw2bOwOWlFmYlJVX5HqAb61KsjtwAB2xeCVJaIj+jw66FAv6bfQcqBNMQExD9+4HDnmA3puJxI0wG3QAZJG74oxsfpKZ2SxXu3FncVxvz+KUZXi8HF9xkv3dTONTmlbkj6UMPXOt9wf8sQgZOLroZeNJbPwlE3EXAVfrfBScxUG7R/CNsTWME64MF2p2SNtprUFNwZH1XzVM3mfR1Qa9H0+2z0vfFMgMnI/Aj7OfPy+0a3/64zBovw2Y+SJTNrikSdZqHuEAcKVj2ZGaaIU4FvDJGXWcgko7Y0xUpBxoAtl5n+1yLJ4r8kuK+YWZhdERj1tCTlQ47P8ObdWlF X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 089c02ae2771a14af2928c59c56abfb9b885a8d7. Signed-off-by: Ankur Arora --- kernel/trace/trace.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index abaaf516fcae..7f565f0a00da 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4392,11 +4392,17 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter) entries, total, buf->cpu, - preempt_model_none() ? "server" : - preempt_model_voluntary() ? "desktop" : - preempt_model_full() ? "preempt" : - preempt_model_rt() ? "preempt_rt" : +#if defined(CONFIG_PREEMPT_NONE) + "server", +#elif defined(CONFIG_PREEMPT_VOLUNTARY) + "desktop", +#elif defined(CONFIG_PREEMPT) + "preempt", +#elif defined(CONFIG_PREEMPT_RT) + "preempt_rt", +#else "unknown", +#endif /* These are reserved for later use */ 0, 0, 0, 0); #ifdef CONFIG_SMP From patchwork Tue Nov 7 21:56:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449368 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C848BC4332F for ; Tue, 7 Nov 2023 21:58:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8C7FB8D005F; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 878048D0001; Tue, 7 Nov 2023 16:58:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CBC18D005F; Tue, 7 Nov 2023 16:58:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4E9CC8D005E for ; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 18C7F140BC5 for ; Tue, 7 Nov 2023 21:58:47 +0000 (UTC) X-FDA: 81432523494.06.7CEE9F6 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf20.hostedemail.com (Postfix) with ESMTP id ABA531C001D for ; Tue, 7 Nov 2023 21:58:43 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=u0vnlN3R; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=dnKi6ixr; spf=pass (imf20.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394323; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ud7w6SeHvr0bpgjfPeosv9sSObd40JxWsANklMjVl8k=; b=XoEQ+O67AYbf8Q+fqP4sipaauUPc29wcYTvHwrz1Hmv28dz7zh/S4zwuzJ/eEow6AOD9Y2 9QuN0hM6tduQqt4/5mH4YTu8A/lYCilb+gqzsMa6oUuvs+bdTyXmBSkqcBN9KoDqbTk9lO X4tsL+pHJgL+fRPNrR2iNP0NsQnHT2A= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394323; a=rsa-sha256; cv=pass; b=BXnkD3DVCCuZSeqqYNCzbUq4Rf8JzZGfxFE5Ol+LNjJRh+oQ3AYDmkhxlklq4ag3ZmpiLn aido1BV0R8rS9Uvsimqj035QzkjxntFl9jW8d8VLuX0V6fVyMNHeFgA7aAXcuiXGupGdTi eFFnStwLf9Mx3DTdIkh1YaKmkPAM2oA= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=u0vnlN3R; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=dnKi6ixr; spf=pass (imf20.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJmSp000897; Tue, 7 Nov 2023 21:58:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=ud7w6SeHvr0bpgjfPeosv9sSObd40JxWsANklMjVl8k=; b=u0vnlN3Rk1TQk92O92Xd1LCuKQsAn/DVUHfFcHQsQAEUHetnIBuTQs82RgVP9ULxgjFF IVXtDh/wOrxCfPDX2FPkeWART4o7RKhJQ/wp6H3Zkt5sNI/cgx5eqZWV8ecG3F5FqS4g Ey3xq/EECmoTJgdDhTnmeIFY/xTNyD99OxrMPW666jdDen6uDRCg7Xr0t0fDVs8uFcIN gR3P9GFbJZM94Uo/fTMvuVmsWQkAhxFZTMOBVlOaJORRVP2GvJOGkcNPUomWTqDgjt2u 6Hyizlfjw6wQraRpXq9aAHn8HuBXtF52nOwspCEpt14BbgSVPneQvSTvC7IJXWlOgNkv wA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g29u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:18 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrHb003903; Tue, 7 Nov 2023 21:58:17 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshdn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EDYqQMQzKPnQu+sKrFI/8D+EPVqdoNCVmLEGIV2+D3S6keK+QQOtyNTUi+bbW8M0Uvx346alAPaLERmFMOgFZrrQzBMank68pBy/sJqV4RdcVxOiTECUXjrUnPnTUmhElemm4ov7bfgFWBVktNtKqpNkdLQn25vvnyE+dVtGXHOunaBTtmkWR22Lc7dZEGRl0cPI+52bVlGhcl0XyLAXzwlKrZOTAWENjxxNM1kAVphAyztkJqpfTiX4/yWHR4gIgCctMHvzCAHlgdJ52Aqcj2nAfyuzp/YNGu7ijr874U+4XUoJMC+JkGG25ADaqj/ufk/cp9dEo0P5C2a99mZfoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ud7w6SeHvr0bpgjfPeosv9sSObd40JxWsANklMjVl8k=; b=arQihQWLgu7V8nQZCGGVIzSsxx0OrdDzy8uDsCGHQZan0pB1h2SSf8P9QfG9MlI+N2C+sQmpuXVXraqvnbLdU5hYRYi+H2FMg9DtHeJC5UT+tdalXeU9jBLbTgsMa+Z019OvRJRqDvoKkg1nfT29Wb5esq7ImNwnQCBvtUeIco4VG9Gj46+sOB9KUqwwawFfl11rml36jXjsEpJtyhcEbel98G6cbXh5Ighqi2O7ETEt5RgShQeAeNVDqhVXQRfIc6f8+OcNmOy1bQVp+SyjtoASeb0XJwd+G2GVIUidtFGzeSDDbe4k2fYJ/0gX39ItkwcW5WnzzwmOoUdsE+6l+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ud7w6SeHvr0bpgjfPeosv9sSObd40JxWsANklMjVl8k=; b=dnKi6ixrHOIQ3OU7KP4dwZSz7hzobrNPg3umkbHK4q5ZNTNONbux1CkYA1AC2Ury8qaTHhJtNqLiUUrMRTudsncwdwZLAKAV9TrgRmpm218ZcZ7payufD39B75nTrQRdvCBlYCDTSX98UCyriklx9JJsawq3hBlUTWet13kX3uc= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:57:55 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:57:55 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 04/86] Revert "preempt/dynamic: Introduce preemption model accessors" Date: Tue, 7 Nov 2023 13:56:50 -0800 Message-Id: <20231107215742.363031-5-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0134.namprd04.prod.outlook.com (2603:10b6:303:84::19) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 7160a6d8-4d16-4af4-b47e-08dbdfdc98fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JTATtLLnp8mDZpD0H8Jy3jOgDiXnggOBDsuuP2Yh8PP3zTLkDkUbyXomd7/4u77EPPs+o0rCq8GNVa2HazVr1pcZlRtM3ZPunm0Bew+q/gWkPQYmGTMVNu7/X+OJxfp4BE7zATxCvbJKzRza1UnGfqANStTfvO3EVAXweCSo6NQ0rQUBSSxApkssnTaMizbZSXoYo/xe8sdq72FsmtyEHEhn663Hvk2mxnXeH0ZhC64PBlZahmzh+Jk0A8rekQ5miKxfPBAw/bxjBL9XohMRcLWlzmyy17B6fKhJIQszCykhwh6CL28rLARd09eFwNTLZmBe34QcCm4khrA7tHWdROwozzUPHxdrdaO4ik1SatE3H0Tc6TNHshM0jVmk1dwYkBb3yi+8ujZY7GhPKJKqX6NCDeqkx+kcos+gms9pZpy6LjyzbN74JAhHm7BvqdIE4DFwjFijfgdTcnEaNIrSamFU24XsO7woqqN560tt2WDsp/1s3h8Zc5afJbE+dMBafCDEsBxSRw0sdpXlTF9wh2h6MxPgDWA6lQcByXiWNPNjsDxuL4lXPfeDK13v26Oe X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K+8b93rE1MOmmptATOpLuCrv+nXgp5ja1k4tPjEwpPs+gswX1vPoAHjYLcdcZAAVg3XGjv4RumQ9rBOSIDE4I/oXqtE6+ny8YOwKHbyp3KDtYl0S4vycwzLmK+GG43AWruulJl5MRCw7AlFbjoh8QDzny2gtPsyK5YT2y8C1O2IeozzVOZcSZds6do73LZO6imsDmqzaNlkFC6dWMaA5LD80KqIa2OwZRAQiadf/AqFqMEcohBA7vXothlafETr601bsNXJeFkN89CfJHVRP5WDzrL2FUIHV2tUnY1JRKvBZQKkRr0loBWbDQY5U9kbf+XQTyG5UaIBTOAP6sixKoMmc9Qtu0jpGN1CllJeg0XqPSDKY06zHvKiCazOKIYwsn3IhDAmLj/TzhFGUHQRa5CCM8ovni8D+z7LvATeMVeKROKHsq5CI/qOMhAEgXt0zEYboKIZFf3D8okR/TKiZMm9Z6MfkuWGXhMCl821m9TrR1AUAP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pLxJkYEWHnYYHmrrxjEifaXfdOo7TTjuPXxQdtY7a456iVBNUUkvuF41HAg3dR3/w/jnE3lcA18EEdRa0jJZahpSDjtcculsCU07QfuNZijUQ9NU0LohzJ/KXsbNB5mGruLDTxhHcmKBuemJfp3hM+kc4GfZ5xF7TTnETWZ7/gcjrkVw7dbHU0D7OBZAi6BeiMq4jlG4pzfVSZBppENuT+vNJjPaB3GG8PVsdLdbDBU5ejFLyLhMduZwlpr//Zld3Jllr09waP9d0EuUUMkOYBr6PZ5tCY5N0HD5exn9NnikbjTi0ofMXdGDhWiYxQPcNZidabrHNbKLPTI2fB64cO/vM+MiRsipldUAQ/0FrtbJr3tzS+UzKJWQcB3tyxs3DwXv2rgzP19iN61ZLHml2QDS3CLjtuqxYpxn6IcUHuYJUoaXXN551Jr8kEgTwQP5fdLttoC3H5p66woc9MZ6jn3OFDsdhsvJtRstPh2SMuFnlLi7xLpdharAXCAie/gaiLm4Bwrdve32ekjb72+fmUzg6MnLetjJFtxX2BSq7HsksYG+GtvYi5dLcoRSJVwEZIQMeZfuieq1yck9YiQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7160a6d8-4d16-4af4-b47e-08dbdfdc98fa X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:57:55.7078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AYpmHa4/ZHkSpOfflB01pRrl/czL0LXZWyiroHwYBDPRox94HGDmFb9QnXVtbpND86sp6RJcLSzSZ2f0EkVw3Q3oEbDuNMYIOFuRotjo98I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: BnWGopJu-uoOnz9gHo-V5J0OaZV7QutW X-Proofpoint-GUID: BnWGopJu-uoOnz9gHo-V5J0OaZV7QutW X-Rspamd-Queue-Id: ABA531C001D X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: ayeukhhybc97aefqiron43d8di35iqji X-HE-Tag: 1699394323-26087 X-HE-Meta: U2FsdGVkX1/37yiKLjS9y5NsvoA65YfLjDBrFRymOsuv6eDr7Asa27ZVDFsuMFrdGQ9A2StRNt2P/XDiwGozpAbLYViAowyZnjc2zG+pjOoMZ62spC+ScYcYpV9zGuquwvLYlLjuuVah+4CJHmBjAsHKeOy4oQ8QQn5QZvZEeCulmXDKhBAuyAjKdRGo5aEOSn4ZHNfS4acNEpNmMVTThbC8cgj7/ZvZGzmpgLMwXlUg3hPbsO0CVJZ9zDzf6gW73y/eu2uN/2wGPykUeXHJ5e+foK1q9Zq8qSVOItOO/CTRbltpf2+VachuOXuDtMDpdq2ny0KbmLPcXAqtcRw8Mcck8Ws5whq1+bSeHOZ5FR1RGPCWuubYfrGhS1NSlfnNVBNRvklBDSPkAnAuOQMxKWYPDGMD3Vr45OyqO/lLn6M9xZmRPg/qmFxrTHsTsehype2mO6O0LvUDnVqwC8YjOOknmj4e2BSij2WGQfF1EmenBMbDkyb8II0w4SwFqcLsdRRpjs3ENVDZRDk5egSF3rVzTSHrA7gMeVcJdVLs1tjw2gL5z6StGT6AaolEyAGr7OJ0IQlgRVvWU2qOKN52ZUIy3sy/dMgKhCym/u9KdtwgrsuRA5NSdzwQAr5G8yh90Z3J53BVk0KMGI4euDnkkYEuMKW3tPVdjzdkxkCaa+S6mhvVYkM4mqRHUdCSgpZBZzFE6aNX964Hm2E8ZEi8o98C9K1IX336bwmiNTUkYlKs6PC3680Ieemqf5yQHnH+TTJjw0UfucuLqCaJkV7T/onllSVzNaB/pitIyBU2wN0824VvetGt2fx9I648EoWIwDDxaOWVOKn4g38H195HOXPP4DZYT5qgSOqiCVtro4ejYChGxvK2ZVHX4atpIYwxdFf4RzCGuza21+rysiRe1bX0vRsPrTxZHvGEZrhqreRBqq8wPC9KJ2FwSvJIjJwRXAowL+w+fsBsUrBUZyx oa1n9Jqy FNxulAVQWoEk5a5ATr+R7BLOBp6fQZ5icr/YhE0vxEqFF1aB/SEbl/J0ydJ/T6VpFXQrkMxKYEiXtfy4Yzhd/gh7iVPYDv/f4v2qnOMPjGXCJvbiesEKmKrCMFmmID8xxF8PPYqmiPmfpDQ7BP0Krr/VmK9Koip3cDjSg5GZBIlZyW+1YDWcxLBuzK9pFa0g4GmEPam59FOnD8mYkp4rYiJLor1+72/OdSHkb4A/bnM8WHTis8Kb1aGEmb+o9EXNcuZW8hthyuFQV8oxAKAXO19FtupaEeGw/aDDmQEuzLnjBSe9EWnxVbUa4iPbxMXF09z5ZyYpBkd1EF8ljVbIKTlWKGA5uNcHCjAPWYlXFHq3EgJIs+wodrJ2GZfcfGK8MnPv10AYwTAv8CH5QBaIAkkGc8H54OR71eC1q X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit cfe43f478b79ba45573ca22d52d0d8823be068fa. Signed-off-by: Ankur Arora --- include/linux/sched.h | 41 ----------------------------------------- kernel/sched/core.c | 12 ------------ 2 files changed, 53 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 77f01ac385f7..5bdf80136e42 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2178,47 +2178,6 @@ static inline void cond_resched_rcu(void) #endif } -#ifdef CONFIG_PREEMPT_DYNAMIC - -extern bool preempt_model_none(void); -extern bool preempt_model_voluntary(void); -extern bool preempt_model_full(void); - -#else - -static inline bool preempt_model_none(void) -{ - return IS_ENABLED(CONFIG_PREEMPT_NONE); -} -static inline bool preempt_model_voluntary(void) -{ - return IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY); -} -static inline bool preempt_model_full(void) -{ - return IS_ENABLED(CONFIG_PREEMPT); -} - -#endif - -static inline bool preempt_model_rt(void) -{ - return IS_ENABLED(CONFIG_PREEMPT_RT); -} - -/* - * Does the preemption model allow non-cooperative preemption? - * - * For !CONFIG_PREEMPT_DYNAMIC kernels this is an exact match with - * CONFIG_PREEMPTION; for CONFIG_PREEMPT_DYNAMIC this doesn't work as the - * kernel is *built* with CONFIG_PREEMPTION=y but may run with e.g. the - * PREEMPT_NONE model. - */ -static inline bool preempt_model_preemptible(void) -{ - return preempt_model_full() || preempt_model_rt(); -} - /* * Does a critical section need to be broken due to another * task waiting?: (technically does not depend on CONFIG_PREEMPTION, diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ab773ea2cb34..0e8764d63041 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8866,18 +8866,6 @@ static void __init preempt_dynamic_init(void) } } -#define PREEMPT_MODEL_ACCESSOR(mode) \ - bool preempt_model_##mode(void) \ - { \ - WARN_ON_ONCE(preempt_dynamic_mode == preempt_dynamic_undefined); \ - return preempt_dynamic_mode == preempt_dynamic_##mode; \ - } \ - EXPORT_SYMBOL_GPL(preempt_model_##mode) - -PREEMPT_MODEL_ACCESSOR(none); -PREEMPT_MODEL_ACCESSOR(voluntary); -PREEMPT_MODEL_ACCESSOR(full); - #else /* !CONFIG_PREEMPT_DYNAMIC */ static inline void preempt_dynamic_init(void) { } From patchwork Tue Nov 7 21:56:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFE70C4167D for ; Tue, 7 Nov 2023 21:58:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE3898D0001; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A74D78D0060; Tue, 7 Nov 2023 16:58:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DC448D005E; Tue, 7 Nov 2023 16:58:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 62C5E8D0001 for ; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 319C4120B47 for ; Tue, 7 Nov 2023 21:58:47 +0000 (UTC) X-FDA: 81432523494.02.378A031 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf15.hostedemail.com (Postfix) with ESMTP id BE946A0006 for ; Tue, 7 Nov 2023 21:58:43 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="kjt6N/u/"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=zIiDs6bf; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394323; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vSq2w4QcKk2oa0vFIKRTjErZNNQUOLA4d8keGVC8hug=; b=aqPIqfpCXlwkOBxUhlk/uW9DNvX0JQVf15+bVVQCmfdJO2rrRe/iVYrTCd+Esfp3fYUvFf Ptm73hpoPh07h/u8eXjM77XdQD4wvegrPYqTirgi7q7e6zzidKQXKRHR6ScpqUfK9IfuOM va62PRRsQuOr/VM5JhPN2id68yeDUw4= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="kjt6N/u/"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=zIiDs6bf; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394323; a=rsa-sha256; cv=pass; b=PekwswMUSt7jrWImcIw/c1Z5CLuklRLu04I6wNat0W7EE69ISs2+EacsBOkJQBrfuR7iVn pykpBoaaW2CooHh3yZ/ZvoVyNBh56I+FHXKj9EDPIY/2BibHtNehjkGzUwOxMrTn+R4eYP 2oZC3wvVU8khdWxyXFNPf+Q3a1hFRL0= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJWZ5029132; Tue, 7 Nov 2023 21:58:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=vSq2w4QcKk2oa0vFIKRTjErZNNQUOLA4d8keGVC8hug=; b=kjt6N/u/GSd/CAy+1rGUm7vGAXX9jpl2REIFKXZmhPR2W8FEFy8Ukw+L9dMGa8E1wMIr YTmCinzbsmh0Q8TsfqVXZ1nlvn/3vv2byPDRTxN0xdp48W6NuWO407qk7ZhmWzOhkkgD ZGqSnaschnKa5k20u4DdItCdq4x2KnuCu+bTOjzWSTPIFjKJSl6YS11ZoyAt+o+hoCet R2Uo8iWzrU5ym+hz58GFKA0EZc2GgTyDPWKVwny+qxHaB3/yoDX0xbR8td/XekdL0B/f X+cvcw/1SmYLptfTJj6/ZPaICXkYvMe63ZddPsf/+fqMiA2AwlNCWacrcEezSxqE/7zZ Eg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w230294-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:19 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrHc003903; Tue, 7 Nov 2023 21:58:18 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshdn-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hrjBKzDS9/JX2j7Nw9xZ0bFD3SdTrqnX16XGY4Quub0ONrafej3nix4U2/LkTUf8fDPUdVRYq1gFrVA+JjIvqoXMoevwRjyowcb2gxQWXn81nL4MXdcBVZ4bGeeootn9udjerOYJz5iNVr5W6KssKb1nhx8HfzrsRDUUywMjQB7gdcPpF7o7CBcCYXbv5QRtVmFuKRnNzKQuI596g96VUnHJ5QVi+zkEOGo+6AvlOVmx8EzI35NNZSYo9IoCXD1EBXo9LjEOtnrd1APNte4NqOTUm25X4rQjrtiZxRsJFmk3O2WHRuUSmDDPhijY6kOASj91FKbXQ5hymm7ZaPIp5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=vSq2w4QcKk2oa0vFIKRTjErZNNQUOLA4d8keGVC8hug=; b=kc1vB/9UMSZfp2ODUqcXNBZKhM58pR6iM4w5OLa6kp2hY5OsUzfnQm6UykzQujDPbCWZV472C4WhnIo2Ukkh4LM1WMYy4ChaXp/KxS4FnPEZAvNzwrSnBIoSZEemLACu8CecyDnVZh3URMOo4dH9DPhKfw1gU+qOl5hYK8XCp2qph1S3bbB8pQ27BX1TvlaShWwRGwRvPbT2A0SNlhWbsuQYQa7SWypFst89XQ3Et3v2g4ncaBNZgNWkLhj8asmAESU7y2vKffiE/0Xq+PFZSK/uT7f8sbw8dWaLW2nu22fz3+hJIJ0BbdhVlH/GMXvG8+2TSWX2fukc77Q/SIpwaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vSq2w4QcKk2oa0vFIKRTjErZNNQUOLA4d8keGVC8hug=; b=zIiDs6bflFicy6PIZupH81vvGvVMAIXKPksDRtnW1WcappqQrIEk57UxextKEhr9vAkKetGf4kbrohtUGTjjznIjOfX4m0mam1qHC1KujhqFJuNJcglKUIOXpMEycQbpxEs5gRKW9vxDq2FRqKDgQevIOHnZ6rYuLlcAKaLvsoc= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:57:57 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:57:57 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 05/86] Revert "kcsan: Use preemption model accessors" Date: Tue, 7 Nov 2023 13:56:51 -0800 Message-Id: <20231107215742.363031-6-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0027.namprd16.prod.outlook.com (2603:10b6:907::40) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: d672b789-0ac2-4f29-c07e-08dbdfdc9a05 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oIe3KAHxxpSgFGStGVa0CQfxKsFQxbWW77uCIotdUQQ7kBltZ7+S+dKdmwfHDuyYxXhJRffU3ewhjSsh0XbSyxy3W14AmPjKfTgUaMpleN39pZjK6w88NerLhXGYjT1Ig9m0C9nj48gK+sFV9N2pNzTzn1WC904lcdvnyerp5AN7n9vlExETPZit8cs76ZeZYhhfpdA5T2rKhQwbCOEvByXVUlNoqXyKh1kLcMSVGy6rZ15rmCp/08LbPeSSjFVQMh1iVHqrjPxo4f+8kofoST3MFt1K7qotKubnLtrzhUSwz3GRfuk8GBsrxoiReMSOcy75SiLMtSTmMNk1vGiccPUu6/bndp9X/hRsihlOwKJU5+QN8gxeDHSM32uKOrMHmImULI7QxQPyYw01uSit8CRNNcU+cFesV9PgAToE0fhGSQeAQLcRUMoDpl5Zj8jGrLYYfATtFD5lusOBYSfuxfVZE3fb+bmhHZaLBAcsOdKcDBA6qeFl1Rtwyz0ry2SOk5FEtcIY5Gu9K/uXPvlRYmJNBE6QwpqqUJLx7MJOqL3/BHSq8MOQxy9Vucan1r8c X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RfqHHp4EaSw4SVoPQYHyQj5rDEafvjLCABhjeiQibaEFGT4G4PimsYU77h0pUdneFD9QGS345Mm7Cpfd94JyuJ8lrRQHrZC7dODC18gnHrMiWPE4h0ACunFnWD9c1qmJG1iV4ApHSpv+WTHXIg38RVhoZviTmfdtnPjDk2a4aZ15A1K17beinpZ8/EKtCyKVfkLvi/9zY1fbGaDIB7wIso5faxwMVyolRTFADPulXENVp+jIy+zt6tKeFqQFA6vLl+UOYqjq2DX6rcob7iOwEf0QnePZiKuVawH8MZSeMwzLMArUaFvD8ZO0hhEPZCtR6Arp/aOzS0sL8ADs2SSAy3NaUqnQo6/FY+MmdnRFxTHAwid8xUFT+i3JLF8JvkQg6PrL35TWLT4IC9aQlU3RC4pStvYezpLnG0smhUnXl8EJkEhDrG1nIyzJ2t2KSe4/kpE1IQM/wcf/2dIt2mLWsceaf0sgTDWcu/jHIK5Yjg94ppyoqs+Fdfm60g8VsKsYcOMTBjBWJO0DILVBVVwMExdTpuwG2JppuKWOBQyQhqRlHLscvatOi+3Qxh95ucsP9sryW4Gan+I6ZE9mu7MPna83tXVtI+2EDCj9tzXY4yUj88OluiFI87TH+LXCAXC6lBsJxXi38D3gyJXoiUm5Tp6WtHj6D4Utf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RMB0tO0MAHhx17i6wU20i/lRSry9GzpYEyMvBPfFegZySOQ74hZkPRwUqx2kB8UDH5GCRU7ck8FyJQ4W/l+6+CH51ubKEoeOjlp7adUht2nUQdWfmP+h2bDh6+HBAi3Y7w+P53aGcMvM6b7vHfPXAlj+A/OoO5pq/d7XKQEIEfUCjz3Leb2KcrKvJipjddoejZSJdUU5ho/c4SvkjX1ZhGfShsUPp9FEjngEg0kdujUOa6shQu0M61JrEFSW4/DuUAEoHkRt4E06BEtF556eYX/D4qTqwmNz3eYwzqXiRGK3H3vOnEMMEZTvGafkTcPoS1XKDv81nb7Fs+c8h1Kq1Q+lvfUyY6Eqj0yI2TEGRAIt6ykWbghnlElr9u0wY8OjZ8PqTmdUJ0hAH8EGOCAXvBvzCbrw39kRLdpSZwnLrdpVlOptx/BYwg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d672b789-0ac2-4f29-c07e-08dbdfdc9a05 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:57:57.4328 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sRYPTIh7c0iyYfpXRYbmnKlUqvcYTaiueLVggbEFqA2lszOmT0/6x9hrf41lktXaHaqto9tk3WlgK34NTTptR4IW8O/6cT6BuX5WOe6IY+s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: HuiwYIi76RmiFcWCATsnlA7jVoushHdD X-Proofpoint-ORIG-GUID: HuiwYIi76RmiFcWCATsnlA7jVoushHdD X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: BE946A0006 X-Stat-Signature: 8qy9eqzesphc8c3ef1j8cadn4nqnxdqe X-HE-Tag: 1699394323-439441 X-HE-Meta: U2FsdGVkX19sdSIaFlEPr2u5/8be/S/Y+6IkkM6PV/w4fxOkeGLZuH1wuXhSkYUpviVd7BvQk6+o9P6/ysp+/plaXdLAE8po7hVIiaziQ93b+uFJe73dEPbjDg+ai9iRFTXUA93q8MBCWJRIBTnXlya9zLsyWn4ccoaHEbQtwseLtBetVfdwqUF1HlCEA91qLYjESKWzPbaTTm+Rx0+7dMQpKQ+F3g09HcrveDaq5tXjp6Pj4zuZpzhJhNZI3gL18EcC/W2SP3d3gYTXFK7fpBEoBA90mxnLjFjiswI6iwc1PxJ5GL2G7ALpRzkJblTsR/7AulBIuHcdGihCsflH1FIWGCvmrw5QrKWGOBDNxpGFphxXBd6y3v9Na3YBPrO7grg1667wSDz7Ala7AFZqu1zn6RaxZfZ65CAk6o1hNbKtTPl0bMyiXzz+Llz3kYFQzLGhNiJY+6skUsArdglXtzsmgXcyeBKjTQnHKU2KYh/wV5nT4H6SOoZ5gSiQFh0i5vySiw855jcpgIM3gzFAhpRtIzJbfzDvIdO2nusKeNJsqs0aN0tfu2x8CzkRmBIuNb6uziN2cZwhbqYPoWruCUwO87PoGl5v0hn7bPyN2lDIi4wveo+VO1wH15QHW1MRLMgE8TuUHxlUQC+F0ilMYV/NRZCsir0hrSmPX4GJAuIDZ9euHxfJf2oWjLxXVYNBDRhB2FpkKyRblTh27rUXfx4vtflvChqTqVeQSjQhtXuhGtsbSXD6EX/UPM3djgnplzLUiUsUIWEKZrYq2C/4kEEguMD0uNXvC8T12KamgGvLCUdTWrfzt4d71cP0pNUkzb626AY3/1sNW/o9l6qJiExqBOl0TfwPt4/QxX6SUh2G+vbNGt3nORvWN2OVAHWxIvDQzuCeeNL+ABt9Woj1SY//DD26r4Gr71HEHfuwTeMoij5dK4XUnxpGggom0xFkP6GUnBZrg7AoYY2cx3d Wk4Ok7ep 8eFIK/4oYALTK7ARaZFM5Wr63S8dYKpkrUGgmVgiX0CnYvRp4m3NbYNSfGEqN3KfMJ9+YfV8N7Y7jrYiI5iibqoakS2ucvqsySTzrzaZTH5GKPaHTTVQQ7+lKSDOKg+WK4HTXUcVrCRn7th3bTk2Ua/+7E8MQh0EW4JRDHCFiZtNkqIhV+xWL+4CkK+1o+NmuDEybhLFQ4JklHiWW/CDz8YjLbIZBmWqrWMNPToC5ybl0zQ6T1ucEAGtXi7VR9s2vuUwpMqZrf6WV/djgj8PELzbJ/mrfdhhNlVMvOHpk65I8nBCIyWN+LzUIImQBr5cBs0FLM6eu5r2AmbhTdanYA/UczaXn/AdWrnzNtc9OTYQryTzPCUR9t/pzb8E83LlK/X2x X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 5693fa74f98afed5421ac0165e9e9291bde7d9e1. Signed-off-by: Ankur Arora --- kernel/kcsan/kcsan_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c index 0ddbdab5903d..6f46fd7998ce 100644 --- a/kernel/kcsan/kcsan_test.c +++ b/kernel/kcsan/kcsan_test.c @@ -1385,14 +1385,13 @@ static const void *nthreads_gen_params(const void *prev, char *desc) else nthreads *= 2; - if (!preempt_model_preemptible() || - !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) { + if (!IS_ENABLED(CONFIG_PREEMPT) || !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) { /* * Without any preemption, keep 2 CPUs free for other tasks, one * of which is the main test case function checking for * completion or failure. */ - const long min_unused_cpus = preempt_model_none() ? 2 : 0; + const long min_unused_cpus = IS_ENABLED(CONFIG_PREEMPT_NONE) ? 2 : 0; const long min_required_cpus = 2 + min_unused_cpus; if (num_online_cpus() < min_required_cpus) { From patchwork Tue Nov 7 21:56:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449370 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDF67C4332F for ; Tue, 7 Nov 2023 21:58:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4348B8D0060; Tue, 7 Nov 2023 16:58:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BD688D005E; Tue, 7 Nov 2023 16:58:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1743E8D0060; Tue, 7 Nov 2023 16:58:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E2F218D005E for ; Tue, 7 Nov 2023 16:58:47 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id BDD351402AE for ; Tue, 7 Nov 2023 21:58:47 +0000 (UTC) X-FDA: 81432523494.29.2FC0B7E Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 6DAB38001C for ; Tue, 7 Nov 2023 21:58:44 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=YASX9zbC; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YtAvOn8P; spf=pass (imf02.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394324; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kIqs5GaTUnYsYWtEFgh6wQaJ/Uli7RMd0ESfN8XJJMw=; b=RdGVb4Yd1sgPXsLnCCAgH9ve7G/IzFVFcnI/l/Ran+0jgf48GC+LMunLuLDwBQzyldEji0 4sPadc3EdCHEZR2cjvwSPhmCWLeMUW0pY4b+XlQc8cIrT3+dvF3Ghtgh2uKpzeIyVDRzBT 17dPgk6ZQ5aVZeN6u54hijoEatX4+6g= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394324; a=rsa-sha256; cv=pass; b=r+Lm/FqhfH9pXv4jgvj7uHheeV5euxNrCMkedViE5/hYwA03apW3UQyWAkCYfP3XZVReuX a/1sMUW16kLKoBxUL9lBiH/cVX5lZwNdg/KKH04xvLgEylgZpzWkzn5w1s6C+KHIt1qYb/ pgew6KCS4w+Ahs9NiBpPT2yAk9dYLRg= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=YASX9zbC; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YtAvOn8P; spf=pass (imf02.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJaYK014901; Tue, 7 Nov 2023 21:58:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=kIqs5GaTUnYsYWtEFgh6wQaJ/Uli7RMd0ESfN8XJJMw=; b=YASX9zbCAZg+a+s/S4jQBiqkcLPnTyW/VVFAEP8/jq0lx3tcWLmf3ahViK4r8tt/LW7N 1XBB6V2F20nF4MuWEYJ8p1zU+tvP/XwxN36CFcMZ8cZaoBm2dOkqa6v3Uk/pZSfEuWQk +eg5KDq+G4pzDPYdHxdXJ1DSc9yiwJvXBVd4eYSk70o5KUbgjYIvsXWd1v06PjSOrngw VMz23U9T45QVhV3gctofYNMCWSXTPFkh1gVrYl5nXjX2ApfobcueBLWvxpPuHyGgCia1 CqfATyj0ZeNQue2HIn6buLHmljZhFCgJJcr2c3smmIVOqSgn/BfMyBIouDBD1rBXrLeu RA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2bp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:19 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrHd003903; Tue, 7 Nov 2023 21:58:19 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshdn-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gj5jGp2lRiK42xk6vwnwx+Kw1PcXvMX+fMbT/cHoLFUDQdUBceuc/L8LHSVsQD8EhTIscXoPlVvTpKRV+VwDmOFlt8uRaYRMNDzwInXCnO84c6dK3ty4cSD3l2esjfnoJQdaySfdFIylQOd+ng2RfEe10n5uRqqlSuj6RKKxrgmIDTb+KsCLtmn6i6YTUD6i9EJqoZmlEKnac0qsMCNYLXKXjywko/E/T4+YZsFwL/N+yZClmoz5CYiMOIpiam1gsEwMG5BC1jBXiykFK+dikYDl8Mqcn+lYR5BK51W2+ShJSfmNGmFdCT7G6BukA5nTLau6OmA3skDpQgiTDQ23gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=kIqs5GaTUnYsYWtEFgh6wQaJ/Uli7RMd0ESfN8XJJMw=; b=bsHXU5UKSHU+gf1XLBrsb7nSHhuvPOTOkGmxx2C5svLmAjIfdAIwB5Q+ZntZKZ/tpIAY/csOURiX2dTf5sdcID/dSStkZmHlaWojz3DO8FDNPtuMok2DJ5Miok8t72OPSixKdnQZAxnFXT/GffXeZoelWCjaI8bHOQ0pjve37Rare3cogHT6SMSyNEwknfZxJILALf6mGM79luTO25Giao49s6jHmsSTYyH2yLo414qz9coX7shmwA90rI7GS/nFkTQyFcxxNGb5s84BITPpePfplzM2BMgcVfcIegZAVZO5DGAbO+lwK9UEQkAbZAJYiGBmnnWSVeqReZvd1qzhag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kIqs5GaTUnYsYWtEFgh6wQaJ/Uli7RMd0ESfN8XJJMw=; b=YtAvOn8Ph/kxLo/VkO+heDFR9yeHgiEi0f79yaiMhuWBx7+P2kW3Yi/PUqURKBAceIs6U1Ul8yOu4PtAZ4EHnOqQixcFO0UUJEUF7+B/Y+8XFbPgPX2YbMsbHFzorLKhFkauvwsa4HITMM8bwCAbFnpfRbWrRcnLBHmOxXQkB04= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:58:02 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:02 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 06/86] Revert "entry: Fix compile error in dynamic_irqentry_exit_cond_resched()" Date: Tue, 7 Nov 2023 13:56:52 -0800 Message-Id: <20231107215742.363031-7-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0027.namprd16.prod.outlook.com (2603:10b6:907::40) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: e018e3a8-87bb-4fcc-abca-08dbdfdc9ced X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o6jESFn4PV0nwmO/lnbiMeC6KXD7ElwN2RCbEGrhgoee5j04RqhlDPcL8aRu1JgfRQnS+9jtUWHGt8C+HRPvKK3rNJy4HucaesVSq9OVl9YR0Z9JIF2HVIG7AOWy+ia8HDBmOIGR+fhsZVLOeeicq1S7DBX8ChraKrG5H4XxBprak5+6QNqON6UohFlkQSbK4kJ9E9PfQvIBZ/cv99JttehoqdpJwXnYrXTMfDG4e2GfDHn4Ds2IDfaJuabgGx94LkrhKVzWvVy7Z6Nf1JKzunKFtU32fCE9s7MsgJ9Qnhrxs3HJC+tJKs+lPmj7OOPz7QAY6zrJQAq2Qc8y2bNknrwDMRGTS15qFWvZC2nP7pKoCyC3NcDrvR9rYvrtt8CQeI5i6JTqnDe/tqiMbN4+onYjIEjO8yfiIKd9z/vcj0n/oLY2zv2/zZeZNm/4VrJ/IuXG1GWSBkqsvhqhgN9HmcxSaXQ19Pnn9lfbrA4cMTOJ58nwu0z2D29N8xSXcYsRnuMI9EJVkGCCH5ETR0fJ15uXjNQvOg279di3MiN0MZohXbqKz4oYXa62Tui5QDGr X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(4744005)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xM8ckh5A7eL9uHx+nwgQhHdFlepu6JUM7YQPMS7O4bIGes1jBNJ5rXvjcHpKPO4iyzlRuqjc5xuQ3e4fAQkEHN29SAcVhfGCM+N9h2UzJ7ZDG7EW21soIrJv2YsxULJC5l88y0zk8V4w2wh0/55ue7GDVPvhvnADqg1bm220uXWOT3ayvK+Wsm9YVLRwV6Uc4xh5l8C5yiHakhEpuWL42AvGe/1nmJvJYKEhvM3IPp+8r7mbl9Z95frDLF/eIpGr0JohCgzSDe4NeBipiFX2BJEqX70rkv6YcgaLeFNnXWlmSapnPR/pehxn8KjbVh/Z5Ha9C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nwvn2ytsx02bZ7PLjn3dgBBE1Bsz+ITW2E6L0IjRinfOFZuxDh7P9jAvE7oWNnCGLTN/V+aN4Xl249Hb4RKE+pa8bGOB7upp7xV4zgqa90393thjgkBDQD/2PCMi42lFo1eOZn+IRMP9K6b+FQ/Pr4z1VBo5MkF4j+8YCxELcgVhCIAAlFlSPwFOTVm+nW/YvUVR4dQR9YV2JS+uB/cXXOh3ZOn8dGoPsYPNzD2OLXoJQ0HsnERllY4mX+btbiDXGa59xJhWEiKU2I1FCj2B/zpOPw7+PyCPmi/a+SQGPftTAE+TvozeRW3Z2MNwAZG5KmsWq9bzpk5NosofiM8J9LofI+nFoDd+DLuv220LOame1T9HCGPjVZHdOsp9AH4nzt68V0tjHFjpg7VKZlD2VglFTe5YV5IdwgSi0EB3KcVu9CO2jmWN5GgUnCD4pkoP27TN6xKU6oony2T1KV5cUT4F05m7TuXV+Y4EmNQNM2fWoAvmMG1NK6uL9l7Cxh1eDRw8CGsZfSLx25UHgtjHPTv73R9fYEJDj8j4Y/XiIayeQC8VN+u5PHfBQVBOoO0yjJBUiwOm7zWXRT2q8f9GAuff+PFpB4JyIHKwAizUj7HOHpY4MJconkcD7SQr9ziiqowmiHzHZc3j0GvC64Fdd8j2sFgYrls0zYBNF7sCioXeUVLRgmKqPuDr6z2iWcnsj1jbbijDLbguSYqMfsJjNuc11KlvDaUu4ALYKZ0QIL4uyhdu0FePVEbVBYKUXw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e018e3a8-87bb-4fcc-abca-08dbdfdc9ced X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:02.3393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: An5XWQbZpAobiTKHEUJJQknla28jXwsFcAIT4IkUIsmlKzjfrAHiFi8I1WXyTw9gLGumQgC0wgFuubq+E9e8jltcnl16CC54wVDGNcgExGg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: dplFozPxw9dZZdWZ3y2QPZOas4k-fD7Q X-Proofpoint-ORIG-GUID: dplFozPxw9dZZdWZ3y2QPZOas4k-fD7Q X-Rspamd-Queue-Id: 6DAB38001C X-Rspam-User: X-Stat-Signature: uks5zd5i1qqdi8ezyy94njnza3q3je1t X-Rspamd-Server: rspam03 X-HE-Tag: 1699394324-639279 X-HE-Meta: U2FsdGVkX1/wUHhlTUUZfDyFz9rGIbY0Vj2qmALvRYfH3Dqq4/jm7hlKQ1O5EC8RAh5sKy08uLwXYVKfL/elwi+fYsLQSZmvcf9ByQxce6zcZx7q6QVyvWoraVgKhFxW0W0Mvo7uUBrdLEdimts8y+MfKlAiL0Q661vTRZKWew6RdIux0Fkc7XLWt2Bo9KkVoaweYl3YdAUA+8PtQc8uxwCDKQ31BPZqAZv0sSP8ebIbYzvP/WJZ+SkMTlEAMJJkmiVRkG4t/QCUSPwOr5c5pd0vLOUSFI+tdu+L9aaCnCcYuUdaU0PqlEVeuXVqgiJLXvKyjKwJParl3Gcp+Zwv/HDPlebDE3bz5f/rAh78k/rg2jGY92C2VbFzhSaHeVTTjILlWSU8Ynv4iGJZOt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amicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 0a70045ed8516dfcff4b5728557e1ef3fd017c53. Signed-off-by: Ankur Arora --- kernel/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/entry/common.c b/kernel/entry/common.c index d7ee4bc3f2ba..ba684e9853c1 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -396,7 +396,7 @@ DEFINE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); DEFINE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); void dynamic_irqentry_exit_cond_resched(void) { - if (!static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) + if (!static_key_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) return; raw_irqentry_exit_cond_resched(); } From patchwork Tue Nov 7 21:56:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449374 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0924DC4167B for ; Tue, 7 Nov 2023 21:59:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4F9ED8D0064; Tue, 7 Nov 2023 16:58:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 480A88D005E; Tue, 7 Nov 2023 16:58:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 238648D0064; Tue, 7 Nov 2023 16:58:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 05AB18D005E for ; Tue, 7 Nov 2023 16:58:52 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D8F73C02DD for ; Tue, 7 Nov 2023 21:58:51 +0000 (UTC) X-FDA: 81432523662.03.63853BA Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 4DA4318000E for ; Tue, 7 Nov 2023 21:58:48 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=RzlfS5hS; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=g4eAHpGK; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394328; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aqpiam7KVLCZXip4Jboq2QxVkPHTcXzEkkF/s5Hqh6s=; b=nYU3ZCekBjLQR8vXP6+WHOkh1R4NCqX7WfLTHfyAHlOcLCUwECXFH8swiZIympqGJAWMtu Ze+eLI/PxK4XzbMKYoTnMLSxHDn53mOKg+BQb4mIjrRslf0hrAwxo5zILC1gKq0oxgWEp8 IKivQp3M+PnpJ13aWJT54fvPNtKlX18= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=RzlfS5hS; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=g4eAHpGK; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394328; a=rsa-sha256; cv=pass; b=6JypgXBbvCj1yl3c8fKKYfODgFYpUsp6BMAELAvF6WV4uQLV3diDPoUZGVdgSd/K4T2W96 OPZ1xAecbAAFr9CKV5h0LUJFz0BI58+4tPzykMINhIcOt68b/E0Z4p/Ehgafvz9NcoiJO0 mXQb8Tlg6DmukZAuVoIPWujzJkoS4i0= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJLxa004012; Tue, 7 Nov 2023 21:58:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=aqpiam7KVLCZXip4Jboq2QxVkPHTcXzEkkF/s5Hqh6s=; b=RzlfS5hSf+58LVf1NI2QIWlXj+bd5f65WQonYFCHn5ow7G1EAeA185JyoYkUNd7cURSl +cNArjXThbXr/a4mmhDLaBkqVv9u/S9llI3kZuaHgt+5Z+6KAygI7/S7f/CJRAuIm0Ko 6AqqXBI18GxsOlF2MC+zSMIZWWTmc8CfYbUWQI6GnZ3L+TWomUGsJd9npXT2sEP+KmOg AoXL4V+6fSCz27qG/rQ+2sN/PURuw+V68w+VTZb3xLOuqJHQ/JmG3LTcSo7GSVYQ8Tms 8V54nTvSo4COTmVM4BMBsS+H2KqsGyS4+8M9S2gQHZ2l1+4yznj0kVlAHbD/TEB/DoHe uw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2aa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:20 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrDO003912; Tue, 7 Nov 2023 21:58:19 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsh7b-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zbw8QNTx+bdkwgXG2FudQzP93KpIywLbePzLdwwoUqyzzyiAHPEqYWlOPxn5WUbLs5rkMV/9ZsGf7VWAgYaM61K7sPUKhfjEYlKlnS45t9WIU6TQ1jPprueY1m9dGtZX77LD68grzt5vz0qfCEH/e5l22a7bAKwbldojDbi0++oMYQoxTeDCaR4cqTNUY/cR8u+KI0n9UUuDx3TILXG7V/EbMDO34A5V3fk37g1GKcv7tTkQ/yl6DrUu97LEn8/A1dYLtEa9JbqwQd0xtgDlCB9TTOJIOlx4ADy4yweKQiFrdPklQskPf7+KoZgPfcV21r257svp4hT/IhmUMaQheA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=aqpiam7KVLCZXip4Jboq2QxVkPHTcXzEkkF/s5Hqh6s=; b=EW0wBLjdzcjujjZfh34Qk6NRHFVzVwAZCTha4pctzXGAdwTAnbG0uezweOqeOaRcI3X1IoK6/SBFFsaFeYUVJ1GHAfD0lTnVlVEbwjwbf2wz6noIR1gbBHP2joijb7/JBI8cR0asM8v6YHvwALBzKH4vyseL0VmssEQ0oYl50JTnlGpTBXW0bHJ/6+3cx/W0EegfzG6NB1YD3GQpvn0YbdXDJn6ydYoEaHMQ+7mTBots3w4HHPTOksaIFDqf81LCw2ok5LHVg2gUZ1AYljoPEVJzAsOZgfYBZ2YlTyC4x4AvLASx4AF27O9io92X0mhe42SBNibZIq4O4EjCbbrgTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aqpiam7KVLCZXip4Jboq2QxVkPHTcXzEkkF/s5Hqh6s=; b=g4eAHpGKVfQ+aG2Qb0SZo/5TSRSFN6NVsbbhIDVnkO9/OyVtqycSdoYMoNg7OyMEn9LmijOrUuNO2meVxLe/pM6c21BsHpfDVqFxP7eiRft2PQX6YarQDRV9uYg60luijDa4v7087jFPg1QE0bKfEcnwweP9IHRAzpEbW942Puk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:58:04 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:04 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 07/86] Revert "livepatch,sched: Add livepatch task switching to cond_resched()" Date: Tue, 7 Nov 2023 13:56:53 -0800 Message-Id: <20231107215742.363031-8-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR05CA0003.namprd05.prod.outlook.com (2603:10b6:303:2b::8) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 62cb8e56-03e5-4f73-ca7a-08dbdfdc9e2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FC6ZjGRUpRWeE0+BDpZb2TuA8ETsaMzfnq52j2PjZC2eM7JnwApLZnijNrSu6v8VpfISp5X/KfTAbeqh6BZX/+rmkWJoYMbd3HUV7T+4N7G3lPqdRJN+dsyeKyTpzE0vwODFcjItgtMsLCLP1VBa+wOKYwgG4789J00dgn21YF0i1ZQDFeY7E3e/Dbev5nd+7v4oYYVeOgyYh2fILu/7yhcjelUMo5VLz48fr6i4XmLJcVd/xDHaXspt5THLHnUcemFnSgPzNtK868FZFfWP3nni3RgpVo50W1bDGG0OqWeRMWAigI0/3Ya8pfaPs7/uef5WicJMcJd6vLpWQkjaY+NlwRq+EpEiGPrFcBk7LrP5YDExTYYCYdceHrYlI4OArYWrd1UI/KpzBd1evBfTI0Ju0UFCzST7kiTPbMj1JhoORAAkr8/GxOxyNvbOhdv16ZV0N6mbQbFcCgP+TvAexHkK/YSFPqAiSGCyhadyvocju1GAnDSFKvSa1a/pKkOcVlqU6iZWxL5/Xq+I970CiZrsy5RMdUtONNfF1zbLhnGbhMii0j4bAa0yXhNR61AW X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(30864003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZLUBV7Y3FPcRbMvAnZHuAOqj2xpuEB9qlDmWNF6UAe50mhEWs+WfCfKEXK/LKqHG8XyPnPjdWB2v27NB3LDko9U6jiy3xCRu/C2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fdc9e2a X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:04.4816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BDdcixOLTXDUqKm8+r5cG7Ukv3JHr7mbj8HYucZco3CWng7lx/wLIeXa1bwnmdOrDafdXZFoU+O8cjY9pd1w9jMmk2EGcqI4gqxgwdkS4ZI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: UIWDsT_jDuRDMW7nX4qj_3oFk79q-zts X-Proofpoint-ORIG-GUID: UIWDsT_jDuRDMW7nX4qj_3oFk79q-zts X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 4DA4318000E X-Stat-Signature: s6uo8thotaufz113kzmr36araba91ubj X-HE-Tag: 1699394328-303396 X-HE-Meta: U2FsdGVkX19jpzrm5YJ2av2vJPDc43djrK1cKzYf/y75+bs3ibGXJYtXD2bb8nTwuLBIPe7pNW42DHIay4vJ/jYdaKv8xi+TL3fbGyaTLN+q5leEd/8gDESce9nXT0ypy434w1rgQOF8/JHaI5adJuhF1Y0OhiX8s4Py6E7OE7cVjfVgwOR8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jfAu8QNxHNwyvKzNK1QuNU90m8KQ6m1NBMO3a/dbuVViyCGf+u2wRqmNUh8HoONy9GoJZ1WGAtCgmHwfEee+ItMA7Ka2TFh+v9m9yD8dj8lFfbpaMehvmLw9Vfvpz4kfHILZep7a9olByYP3IQMBr/neAd/7QofYLnerCMLNNs+FFDJDceKTtGS2EEt95mcAgJP2fb9Kw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit e3ff7c609f39671d1aaff4fb4a8594e14f3e03f8. Note that removing this commit reintroduces "live patches failing to complete within a reasonable amount of time due to CPU-bound kthreads." Unfortunately this fix depends quite critically on PREEMPT_DYNAMIC and existence of cond_resched() so this will need an alternate fix. Signed-off-by: Ankur Arora --- include/linux/livepatch.h | 1 - include/linux/livepatch_sched.h | 29 --------- include/linux/sched.h | 20 ++---- kernel/livepatch/core.c | 1 - kernel/livepatch/transition.c | 107 +++++--------------------------- kernel/sched/core.c | 64 +++---------------- 6 files changed, 28 insertions(+), 194 deletions(-) delete mode 100644 include/linux/livepatch_sched.h diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h index 9b9b38e89563..293e29960c6e 100644 --- a/include/linux/livepatch.h +++ b/include/linux/livepatch.h @@ -13,7 +13,6 @@ #include #include #include -#include #if IS_ENABLED(CONFIG_LIVEPATCH) diff --git a/include/linux/livepatch_sched.h b/include/linux/livepatch_sched.h deleted file mode 100644 index 013794fb5da0..000000000000 --- a/include/linux/livepatch_sched.h +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef _LINUX_LIVEPATCH_SCHED_H_ -#define _LINUX_LIVEPATCH_SCHED_H_ - -#include -#include - -#ifdef CONFIG_LIVEPATCH - -void __klp_sched_try_switch(void); - -#if !defined(CONFIG_PREEMPT_DYNAMIC) || !defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) - -DECLARE_STATIC_KEY_FALSE(klp_sched_try_switch_key); - -static __always_inline void klp_sched_try_switch(void) -{ - if (static_branch_unlikely(&klp_sched_try_switch_key)) - __klp_sched_try_switch(); -} - -#endif /* !CONFIG_PREEMPT_DYNAMIC || !CONFIG_HAVE_PREEMPT_DYNAMIC_CALL */ - -#else /* !CONFIG_LIVEPATCH */ -static inline void klp_sched_try_switch(void) {} -static inline void __klp_sched_try_switch(void) {} -#endif /* CONFIG_LIVEPATCH */ - -#endif /* _LINUX_LIVEPATCH_SCHED_H_ */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 5bdf80136e42..c5b0ef1ecfe4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -36,7 +36,6 @@ #include #include #include -#include #include /* task_struct member predeclarations (sorted alphabetically): */ @@ -2087,9 +2086,6 @@ extern int __cond_resched(void); #if defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) -void sched_dynamic_klp_enable(void); -void sched_dynamic_klp_disable(void); - DECLARE_STATIC_CALL(cond_resched, __cond_resched); static __always_inline int _cond_resched(void) @@ -2098,7 +2094,6 @@ static __always_inline int _cond_resched(void) } #elif defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) - extern int dynamic_cond_resched(void); static __always_inline int _cond_resched(void) @@ -2106,25 +2101,20 @@ static __always_inline int _cond_resched(void) return dynamic_cond_resched(); } -#else /* !CONFIG_PREEMPTION */ +#else static inline int _cond_resched(void) { - klp_sched_try_switch(); return __cond_resched(); } -#endif /* PREEMPT_DYNAMIC && CONFIG_HAVE_PREEMPT_DYNAMIC_CALL */ +#endif /* CONFIG_PREEMPT_DYNAMIC */ -#else /* CONFIG_PREEMPTION && !CONFIG_PREEMPT_DYNAMIC */ +#else -static inline int _cond_resched(void) -{ - klp_sched_try_switch(); - return 0; -} +static inline int _cond_resched(void) { return 0; } -#endif /* !CONFIG_PREEMPTION || CONFIG_PREEMPT_DYNAMIC */ +#endif /* !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) */ #define cond_resched() ({ \ __might_resched(__FILE__, __LINE__, 0); \ diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 61328328c474..fc851455740c 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -33,7 +33,6 @@ * * - klp_ftrace_handler() * - klp_update_patch_state() - * - __klp_sched_try_switch() */ DEFINE_MUTEX(klp_mutex); diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c index e54c3d60a904..70bc38f27af7 100644 --- a/kernel/livepatch/transition.c +++ b/kernel/livepatch/transition.c @@ -9,7 +9,6 @@ #include #include -#include #include "core.h" #include "patch.h" #include "transition.h" @@ -27,25 +26,6 @@ static int klp_target_state = KLP_UNDEFINED; static unsigned int klp_signals_cnt; -/* - * When a livepatch is in progress, enable klp stack checking in - * cond_resched(). This helps CPU-bound kthreads get patched. - */ -#if defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) - -#define klp_cond_resched_enable() sched_dynamic_klp_enable() -#define klp_cond_resched_disable() sched_dynamic_klp_disable() - -#else /* !CONFIG_PREEMPT_DYNAMIC || !CONFIG_HAVE_PREEMPT_DYNAMIC_CALL */ - -DEFINE_STATIC_KEY_FALSE(klp_sched_try_switch_key); -EXPORT_SYMBOL(klp_sched_try_switch_key); - -#define klp_cond_resched_enable() static_branch_enable(&klp_sched_try_switch_key) -#define klp_cond_resched_disable() static_branch_disable(&klp_sched_try_switch_key) - -#endif /* CONFIG_PREEMPT_DYNAMIC && CONFIG_HAVE_PREEMPT_DYNAMIC_CALL */ - /* * This work can be performed periodically to finish patching or unpatching any * "straggler" tasks which failed to transition in the first attempt. @@ -194,8 +174,8 @@ void klp_update_patch_state(struct task_struct *task) * barrier (smp_rmb) for two cases: * * 1) Enforce the order of the TIF_PATCH_PENDING read and the - * klp_target_state read. The corresponding write barriers are in - * klp_init_transition() and klp_reverse_transition(). + * klp_target_state read. The corresponding write barrier is in + * klp_init_transition(). * * 2) Enforce the order of the TIF_PATCH_PENDING read and a future read * of func->transition, if klp_ftrace_handler() is called later on @@ -363,44 +343,6 @@ static bool klp_try_switch_task(struct task_struct *task) return !ret; } -void __klp_sched_try_switch(void) -{ - if (likely(!klp_patch_pending(current))) - return; - - /* - * This function is called from cond_resched() which is called in many - * places throughout the kernel. Using the klp_mutex here might - * deadlock. - * - * Instead, disable preemption to prevent racing with other callers of - * klp_try_switch_task(). Thanks to task_call_func() they won't be - * able to switch this task while it's running. - */ - preempt_disable(); - - /* - * Make sure current didn't get patched between the above check and - * preempt_disable(). - */ - if (unlikely(!klp_patch_pending(current))) - goto out; - - /* - * Enforce the order of the TIF_PATCH_PENDING read above and the - * klp_target_state read in klp_try_switch_task(). The corresponding - * write barriers are in klp_init_transition() and - * klp_reverse_transition(). - */ - smp_rmb(); - - klp_try_switch_task(current); - -out: - preempt_enable(); -} -EXPORT_SYMBOL(__klp_sched_try_switch); - /* * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set. * Kthreads with TIF_PATCH_PENDING set are woken up. @@ -507,8 +449,7 @@ void klp_try_complete_transition(void) return; } - /* Done! Now cleanup the data structures. */ - klp_cond_resched_disable(); + /* we're done, now cleanup the data structures */ patch = klp_transition_patch; klp_complete_transition(); @@ -560,8 +501,6 @@ void klp_start_transition(void) set_tsk_thread_flag(task, TIF_PATCH_PENDING); } - klp_cond_resched_enable(); - klp_signals_cnt = 0; } @@ -617,9 +556,8 @@ void klp_init_transition(struct klp_patch *patch, int state) * see a func in transition with a task->patch_state of KLP_UNDEFINED. * * Also enforce the order of the klp_target_state write and future - * TIF_PATCH_PENDING writes to ensure klp_update_patch_state() and - * __klp_sched_try_switch() don't set a task->patch_state to - * KLP_UNDEFINED. + * TIF_PATCH_PENDING writes to ensure klp_update_patch_state() doesn't + * set a task->patch_state to KLP_UNDEFINED. */ smp_wmb(); @@ -655,10 +593,14 @@ void klp_reverse_transition(void) klp_target_state == KLP_PATCHED ? "patching to unpatching" : "unpatching to patching"); + klp_transition_patch->enabled = !klp_transition_patch->enabled; + + klp_target_state = !klp_target_state; + /* * Clear all TIF_PATCH_PENDING flags to prevent races caused by - * klp_update_patch_state() or __klp_sched_try_switch() running in - * parallel with the reverse transition. + * klp_update_patch_state() running in parallel with + * klp_start_transition(). */ read_lock(&tasklist_lock); for_each_process_thread(g, task) @@ -668,28 +610,9 @@ void klp_reverse_transition(void) for_each_possible_cpu(cpu) clear_tsk_thread_flag(idle_task(cpu), TIF_PATCH_PENDING); - /* - * Make sure all existing invocations of klp_update_patch_state() and - * __klp_sched_try_switch() see the cleared TIF_PATCH_PENDING before - * starting the reverse transition. - */ + /* Let any remaining calls to klp_update_patch_state() complete */ klp_synchronize_transition(); - /* - * All patching has stopped, now re-initialize the global variables to - * prepare for the reverse transition. - */ - klp_transition_patch->enabled = !klp_transition_patch->enabled; - klp_target_state = !klp_target_state; - - /* - * Enforce the order of the klp_target_state write and the - * TIF_PATCH_PENDING writes in klp_start_transition() to ensure - * klp_update_patch_state() and __klp_sched_try_switch() don't set - * task->patch_state to the wrong value. - */ - smp_wmb(); - klp_start_transition(); } @@ -703,9 +626,9 @@ void klp_copy_process(struct task_struct *child) * the task flag up to date with the parent here. * * The operation is serialized against all klp_*_transition() - * operations by the tasklist_lock. The only exceptions are - * klp_update_patch_state(current) and __klp_sched_try_switch(), but we - * cannot race with them because we are current. + * operations by the tasklist_lock. The only exception is + * klp_update_patch_state(current), but we cannot race with + * that because we are current. */ if (test_tsk_thread_flag(current, TIF_PATCH_PENDING)) set_tsk_thread_flag(child, TIF_PATCH_PENDING); diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 0e8764d63041..b43fda3c5733 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8597,7 +8597,6 @@ EXPORT_STATIC_CALL_TRAMP(might_resched); static DEFINE_STATIC_KEY_FALSE(sk_dynamic_cond_resched); int __sched dynamic_cond_resched(void) { - klp_sched_try_switch(); if (!static_branch_unlikely(&sk_dynamic_cond_resched)) return 0; return __cond_resched(); @@ -8746,17 +8745,13 @@ int sched_dynamic_mode(const char *str) #error "Unsupported PREEMPT_DYNAMIC mechanism" #endif -DEFINE_MUTEX(sched_dynamic_mutex); -static bool klp_override; - -static void __sched_dynamic_update(int mode) +void sched_dynamic_update(int mode) { /* * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in * the ZERO state, which is invalid. */ - if (!klp_override) - preempt_dynamic_enable(cond_resched); + preempt_dynamic_enable(cond_resched); preempt_dynamic_enable(might_resched); preempt_dynamic_enable(preempt_schedule); preempt_dynamic_enable(preempt_schedule_notrace); @@ -8764,79 +8759,36 @@ static void __sched_dynamic_update(int mode) switch (mode) { case preempt_dynamic_none: - if (!klp_override) - preempt_dynamic_enable(cond_resched); + preempt_dynamic_enable(cond_resched); preempt_dynamic_disable(might_resched); preempt_dynamic_disable(preempt_schedule); preempt_dynamic_disable(preempt_schedule_notrace); preempt_dynamic_disable(irqentry_exit_cond_resched); - if (mode != preempt_dynamic_mode) - pr_info("Dynamic Preempt: none\n"); + pr_info("Dynamic Preempt: none\n"); break; case preempt_dynamic_voluntary: - if (!klp_override) - preempt_dynamic_enable(cond_resched); + preempt_dynamic_enable(cond_resched); preempt_dynamic_enable(might_resched); preempt_dynamic_disable(preempt_schedule); preempt_dynamic_disable(preempt_schedule_notrace); preempt_dynamic_disable(irqentry_exit_cond_resched); - if (mode != preempt_dynamic_mode) - pr_info("Dynamic Preempt: voluntary\n"); + pr_info("Dynamic Preempt: voluntary\n"); break; case preempt_dynamic_full: - if (!klp_override) - preempt_dynamic_disable(cond_resched); + preempt_dynamic_disable(cond_resched); preempt_dynamic_disable(might_resched); preempt_dynamic_enable(preempt_schedule); preempt_dynamic_enable(preempt_schedule_notrace); preempt_dynamic_enable(irqentry_exit_cond_resched); - if (mode != preempt_dynamic_mode) - pr_info("Dynamic Preempt: full\n"); + pr_info("Dynamic Preempt: full\n"); break; } preempt_dynamic_mode = mode; } -void sched_dynamic_update(int mode) -{ - mutex_lock(&sched_dynamic_mutex); - __sched_dynamic_update(mode); - mutex_unlock(&sched_dynamic_mutex); -} - -#ifdef CONFIG_HAVE_PREEMPT_DYNAMIC_CALL - -static int klp_cond_resched(void) -{ - __klp_sched_try_switch(); - return __cond_resched(); -} - -void sched_dynamic_klp_enable(void) -{ - mutex_lock(&sched_dynamic_mutex); - - klp_override = true; - static_call_update(cond_resched, klp_cond_resched); - - mutex_unlock(&sched_dynamic_mutex); -} - -void sched_dynamic_klp_disable(void) -{ - mutex_lock(&sched_dynamic_mutex); - - klp_override = false; - __sched_dynamic_update(preempt_dynamic_mode); - - mutex_unlock(&sched_dynamic_mutex); -} - -#endif /* CONFIG_HAVE_PREEMPT_DYNAMIC_CALL */ - static int __init setup_preempt_mode(char *str) { int mode = sched_dynamic_mode(str); From patchwork Tue Nov 7 21:56:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C849C4332F for ; Tue, 7 Nov 2023 21:59:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 435688D0062; Tue, 7 Nov 2023 16:58:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C1C18D005E; Tue, 7 Nov 2023 16:58:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 100368D0063; Tue, 7 Nov 2023 16:58:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id CDB758D005E for ; Tue, 7 Nov 2023 16:58:48 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A844CB5826 for ; Tue, 7 Nov 2023 21:58:48 +0000 (UTC) X-FDA: 81432523536.25.1D33BD5 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf30.hostedemail.com (Postfix) with ESMTP id 5A3E48000F for ; Tue, 7 Nov 2023 21:58:45 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=KUrP8Wwx; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=AdJADNUH; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf30.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394325; a=rsa-sha256; cv=pass; b=ibSiAaOwoyjFL1OwseCnTCqkTfGX8xxGfwX4R66LhqaqVVOrKChqHLQUftIfFgcgn9t1j3 LXik3BjFXSriPTenfUSuMnmBTMEQwWNAXt46jugtxZnt7HXpHTiu7ON17jKqCYbu7wHINE l154v1oDb0GDqYVbVbEhDHL3siT6X/s= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=KUrP8Wwx; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=AdJADNUH; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf30.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394325; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=f1SAlYhp0paKZ4VGIKby0nu/nWD1InjWF9RcOLJuOCQ=; b=nXi6aAPah33xykPpuieEb267+KOtg0hSwkYoz7vSU6EzjNhh3KZR/iBpNQY4ijO80HVX5A d7oe8StH7izNvBn0vNEDaSPAmC4B9pkxbB96z7yUgJpUUdIaFWEweaeYLOQvAS5LTLXZUR eR7MpaCZZN/6e9uQ4uZLLoPKY1zflu8= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJe1j005455; Tue, 7 Nov 2023 21:58:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=f1SAlYhp0paKZ4VGIKby0nu/nWD1InjWF9RcOLJuOCQ=; b=KUrP8WwxWpNRmE9gQOvlToA2XwCAWL4Z+X1XPnb+jrF4v1PG8yFe0P4KroRLEww4uShr riY921aWRRNkTE7FFM/KzeZtFwCO8DoLqWXspQ8usJvj1/GNpKnFrDZmc5cAL0BYVwSD DIHNxByX8wdqhzRWRsqYOg11NeOUop+NlQsuYvDMOXgUEbZQhZLZzVmmQZE2rOSKbfNU SSqxqE9jASLvdeES4XH1dqPWC4Fhhi9s/Kl9fdq8xOA5zp5FCJd59NHl3E5iiWglf/nR FDRTRroLCLKu1vruIKRIRKK4OUMmiKmeN4DfOEUkKJbhzbUyxKz+jTtR86M7a6yIteb9 fQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2ac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:21 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrHe003903; Tue, 7 Nov 2023 21:58:20 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshdn-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LA4Pp9Qnm/KpMw7Lcj++GdKvyu5aupfurAVhzNFrku67N0r+u+BdJFl7HwXFlN0RjH5WExWlzSVVOYgOnEBJIz3bf4eyL1v4KMhm8gYOhHUxkhy4QUYcEWlat7brxsICWnp/qF5VIwZ5KSHm8kdNtDZ/2NkplN3Y/KCbUfBrfgJzFH46Bi3ASmTRcVnYPvv97SiqVR8T1u8bDs76bHp4U3wv7z4wgX0lpgjp/Dv4okbsLn0huQdixSWbRHb+aqTKSOvzrbhhP8scbpkqjRXOYgITkl6P1Hh+cjPpG67jBQO9vGTjzwd/Wzo23m1+u6P3JBHm5tFHh4u3P0WiVha8Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=f1SAlYhp0paKZ4VGIKby0nu/nWD1InjWF9RcOLJuOCQ=; b=CbBU36ROAKr6cVbP1LcCf+sx7jhS4486XCPbrV2gacI5rDaq6LcaQyDejsoP+aggUVbYu6ts+nQYyOBHti4V2QuTOBsvImEiwxUcNYZZuk3W0d8uAQolO4ivu80rwyfFusKUqHTv7Pdlf7/WWz0WXNlDBCpxMRAEL+9yjtHG5dJbe47pmjFcNGhYqLdL4DoHz+vsMJZbSgD444mUKnLUIXoKyZ8k+9PfWnyuCNBwaSmg5Goe66xgmrCwcnZq1HKT3H1N2E5/LULSC5shz0gPeb+2voLDfUwGZBlSr7eaIzyKGHNoCBCZoB8qWViDzLZJA3PoptP38lZjm8/uTGvTKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f1SAlYhp0paKZ4VGIKby0nu/nWD1InjWF9RcOLJuOCQ=; b=AdJADNUHpg+r3u5nLipZ+Q12/tzGre+48qh2rFFXQchk1k51YzwExuC0CCShPCO9JYP3PdV2JrHMdWTm8FLYy00J6XbTYXD9mhSFgvdq+gierIMq4b+k8DbOfQnUG7IlDv9CV8+3HvAR35x4JA6FJK5N3/9wMobj2/lG5i/I+GA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:58:06 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:06 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 08/86] Revert "arm64: Support PREEMPT_DYNAMIC" Date: Tue, 7 Nov 2023 13:56:54 -0800 Message-Id: <20231107215742.363031-9-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0131.namprd03.prod.outlook.com (2603:10b6:303:8c::16) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 8616256d-8b7a-494b-72b7-08dbdfdc9f71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9xQr28nJWqMPiXOYXsv4xdi0FyHnh3yLlfSr1H1ByGFPcCzKSvIBYavKjs2Kb3XLVsFRqMtP1jLrUTqbSVURD8c4sN/9IkZ7Hl+iSIR+/NoEP7PwW/lCAACr7j3XOcZ9At/1oOPq3bcadMIjTs635FNcOS3VGGL2GNN09HENlaghtBr3sk4KG+6wV+YI96mTJxTED3I34D2Iza0ApJzWCaIgpBB4cQI3sCwT65uPZoYulrzMGDbR9HEyzVyYb5H/3MG4+1rNtc+2adh3XAqUPNeSzpkr5jN4rUV1K/G8T7h+g33blRE8VE3D7Nf4vd9BQF2SEJZD4tp7j63kJ5KTsN/ZG/Jtq0+3yp7K+u4o1hh3l01yxnewQZUqmWlIkW8rDHlU16F9wlS8Xgugf6cFtkd6BJFDjv9eG9M2CbmVlDYPCyURZ1uBQOsucTJTMxUTLJVZ6Qoy2iTFqKovZDG1XwyJe2+TTOJxzB+gxJ1FFRhRod3lVO9vGI0eFjZvJLvjjL4jC6gKf7/Nvsvcp0YVePMKWse9VntIqLHnxiBUsyG2OFKpbF28l/vf4E31Cejt X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AxKMmqd1Us5/3hk0JWx+JAHK1K75L71u+tIjikfBz4Tfide2IcN8/xAaAAjNfwWk1N3efwseXmZhxh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enant-Network-Message-Id: 8616256d-8b7a-494b-72b7-08dbdfdc9f71 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:06.6650 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Wfnm/tw3JZpFQwfil+YMw2Ww8lTKbLdbgnzjVuqGe328pZdF9eQyHyfW1l4F+vX7d0XjFmuBtdw9z702GhbVuva0MozVppS8ORHwCGkbTfM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: SrFnkSXOXV5UpO6UZimtmdt5rdMnnxQq X-Proofpoint-ORIG-GUID: SrFnkSXOXV5UpO6UZimtmdt5rdMnnxQq X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 5A3E48000F X-Stat-Signature: 1hryj1fna3gm8pgjwt11j35m9paap36u X-HE-Tag: 1699394325-282436 X-HE-Meta: U2FsdGVkX18CWzDdp9uGyg24HINH9lfapmFXB14eoxCLl/kZOEASVoFGo4/NQsow1RjFwsJUyPRwkMW/uQFyT5ESwyReP+rekyYLgkA7OVFgDs0FybOIQ4dEnMT71Afhi0SsiNq2WH89MWdO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x7I3+P2Tb+WSq+2BnJcq0oZME1kNB7BLQrbK7QWmyLSr/zKYofzpASsAUTUOIFNERElgRMQMdeATMeRgUB/jpNAgLiE/dOgT5umI+GRVKDgIdY/FaglTZmk+YXuMYwyCMbcRRMHCnUqZFdAjrhDYSa9+mUhzMJ7Iy8jJPxLxhxSMLCBxoP8aTCvfU5Ys9jbsKMkBHRxIMX1QKui5+x2dZuMxjmHhT+PTe2VWCKpHNJDgoawS1k0eeg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 1b2d3451ee50a0968cb9933f726e50b368ba5073. Signed-off-by: Ankur Arora --- arch/arm64/Kconfig | 1 - arch/arm64/include/asm/preempt.h | 19 ++----------------- arch/arm64/kernel/entry-common.c | 10 +--------- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 78f20e632712..856d7be2ee45 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -221,7 +221,6 @@ config ARM64 select HAVE_PERF_EVENTS_NMI if ARM64_PSEUDO_NMI select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP - select HAVE_PREEMPT_DYNAMIC_KEY select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_FUNCTION_ARG_ACCESS_API diff --git a/arch/arm64/include/asm/preempt.h b/arch/arm64/include/asm/preempt.h index 0159b625cc7f..e83f0982b99c 100644 --- a/arch/arm64/include/asm/preempt.h +++ b/arch/arm64/include/asm/preempt.h @@ -2,7 +2,6 @@ #ifndef __ASM_PREEMPT_H #define __ASM_PREEMPT_H -#include #include #define PREEMPT_NEED_RESCHED BIT(32) @@ -81,24 +80,10 @@ static inline bool should_resched(int preempt_offset) } #ifdef CONFIG_PREEMPTION - void preempt_schedule(void); +#define __preempt_schedule() preempt_schedule() void preempt_schedule_notrace(void); - -#ifdef CONFIG_PREEMPT_DYNAMIC - -DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); -void dynamic_preempt_schedule(void); -#define __preempt_schedule() dynamic_preempt_schedule() -void dynamic_preempt_schedule_notrace(void); -#define __preempt_schedule_notrace() dynamic_preempt_schedule_notrace() - -#else /* CONFIG_PREEMPT_DYNAMIC */ - -#define __preempt_schedule() preempt_schedule() -#define __preempt_schedule_notrace() preempt_schedule_notrace() - -#endif /* CONFIG_PREEMPT_DYNAMIC */ +#define __preempt_schedule_notrace() preempt_schedule_notrace() #endif /* CONFIG_PREEMPTION */ #endif /* __ASM_PREEMPT_H */ diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c index 0fc94207e69a..5d9c9951562b 100644 --- a/arch/arm64/kernel/entry-common.c +++ b/arch/arm64/kernel/entry-common.c @@ -225,17 +225,9 @@ static void noinstr arm64_exit_el1_dbg(struct pt_regs *regs) lockdep_hardirqs_on(CALLER_ADDR0); } -#ifdef CONFIG_PREEMPT_DYNAMIC -DEFINE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); -#define need_irq_preemption() \ - (static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) -#else -#define need_irq_preemption() (IS_ENABLED(CONFIG_PREEMPTION)) -#endif - static void __sched arm64_preempt_schedule_irq(void) { - if (!need_irq_preemption()) + if (!IS_ENABLED(CONFIG_PREEMPTION)) return; /* From patchwork Tue Nov 7 21:56:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EB7DC4332F for ; Tue, 7 Nov 2023 21:59:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 918D28D0063; Tue, 7 Nov 2023 16:58:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D7268D005E; Tue, 7 Nov 2023 16:58:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A6178D0063; Tue, 7 Nov 2023 16:58:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4B18F8D005E for ; Tue, 7 Nov 2023 16:58:51 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1D56E80892 for ; Tue, 7 Nov 2023 21:58:51 +0000 (UTC) X-FDA: 81432523662.04.A5E0FE0 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf18.hostedemail.com (Postfix) with ESMTP id A0D5E1C000C for ; Tue, 7 Nov 2023 21:58:47 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="W7urn/dV"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jyf6YoOi; spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394327; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jJZCgv6rasNpsHSZGpFjq+NCtAYr81PJxscCsS4YJ/A=; b=VaKDwIQu5LCM2No+Q33UwfNGOHDL/aXpe+LWvC8b25OW48qU7xC846n1hePh+aYPl4aNKj HeGwqW67WazFS5Ys3Ro+rPQqXESDiMS7jnY/vHrcAm0Zem5/rcralJu0GABVp/bPrNYVfb 0I1CdaPyH4as+MHdVR1X+U1ciuU+2lo= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394327; a=rsa-sha256; cv=pass; b=4YMMfJOAk30mMGuB1FYi6hjiyqUO+HyvvC+TxJ9L7aZnpfCb8Fs1K+kMmUuQO8luiEpcI4 iTAi1++qrzCw7bXyKzSK+C58zEdXHxW5hb3OQiI0nRj8N5rqxqmsIZowaokgke0yfrdNWf skmWoqAsw3iZHDksS409W5VKXJmWPv8= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="W7urn/dV"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jyf6YoOi; spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJqiU015022; Tue, 7 Nov 2023 21:58:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=jJZCgv6rasNpsHSZGpFjq+NCtAYr81PJxscCsS4YJ/A=; b=W7urn/dVjmE4r0Noy4Us2pa6B3z+wyjYa0gqC6/DO12KBFP/UmxiGa4iL6jfyEJXmNgg Nii7mM+OalZJMtSgSWb1QyvZfEPJznwEYaKUlYc3BULtslYqruPpOwVFxYZtWMx+4oEm WDPhJ4i4ru16Pt3QG42iyKbDFttiqN7i+rD2tT+imwVET3cdyEwdgIxU5oEAoyL91SLT TCexX0xkrO9AAfP4KPpeZwl1ENOtMqCU6p8HzNvMXGmc0GaqTW+23L3232VbP1odfjmL a+BTGKm2F1CFInxe016UkKuqV14fVjmwepXMU6Xz9nZ4rCwwuT+4kzXLuZoomUxa0gSh 8A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2bq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:21 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrDP003912; Tue, 7 Nov 2023 21:58:20 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsh7b-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TKW8uWrq+mAmNbu5T/9BeDT7R8ioS8MgOTJNvvaBS7/2+aHWiuU2kwyNMaV60SqUh3V9X0I972O/9OE9UaCBf6t2HpI4qQ6WUY9hnfRt230542w7fzTBcZj8Bl6l+3usYuuuyqGZhcxS6LAz3IIuFtmStwgbK23AH4OxU9kEsIN8je/lnb0g7VVtXh88lJCF35pJScmlBl8IrABcRmWkRttuYZ8T6u32dcMdvrLWcTSZGsq9AJsduyUcwokVk0EA2NdUl5ZNW8A3HRibJzXP5d2/OmlejbqvMXGFlO+HdHrVkrTvqoReWb8Kj7Ub/Ie65HDs0zMxlRj1BnGfBfBuEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=jJZCgv6rasNpsHSZGpFjq+NCtAYr81PJxscCsS4YJ/A=; b=ZjDEiZEkxAU2TM8bDS1EHNtlE09GqJne+Tp0onFBwK1fRbkc+4oA2Y6rSJuHdRk6yX1BBvjUUtjxzZ/ncv73e1yNSQ80qH0JUM70V4N7vHwEwMCVrXyZVBZmFAdNZ8sJTjDHCNcYPZfBPXd76Qktg31Ssby4Szw/Kg1zCPEYF96IvyQl6/X6JrKXTDoD2kMbUykU15EiIXQ6oKAlbp0JCdztY6hyoZ2aRWtN/D92Oaf4O8qG/u77qhZ8JMa76W5hKbGARukKKnE0wsZv7N9o5uMaQGwzkCUL1Do8GmFkdrdmMvptOxjsFLAUxrxMC5GkgfoWHEDbu+ST4AQCZJvG7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jJZCgv6rasNpsHSZGpFjq+NCtAYr81PJxscCsS4YJ/A=; b=jyf6YoOiPdpEaM6cfk/jl6by4ZL8i1T0azao6Isr/4gZepgJAca/XNuqT00IoQ+cDdzqFfTEXYdg30y3YrdB/ujOTslfySjXejTeiaQIS/H4LmdRuMh4clWAuD3WqlWtLib31w/NnE7Vr9i6WH+pMKZE1eUXUPgsbWDpBbTEPN4= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:58:11 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:11 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 09/86] Revert "sched/preempt: Add PREEMPT_DYNAMIC using static keys" Date: Tue, 7 Nov 2023 13:56:55 -0800 Message-Id: <20231107215742.363031-10-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MWH0EPF00056D16.namprd21.prod.outlook.com (2603:10b6:30f:fff2:0:1:0:1d) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bfe6ba6-7ec3-46dc-d2a2-08dbdfdca28d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UKZPLam/CGH+Fs8abqyS1bWVFZSpDxwbxQCLioMgjEzw1q32Po/izXToowFAHbMnC26ORWqFs8AU9UUxyw2x+4UEWQB4Ck9GrSfzx1pQ3nYEC89cuA3zIbXw3u73eiqFpOF7VRzGP0C2KsrFAvWzjaL5MMeD4aobeDmIr8y3diuwM5fNCoRe/lWeCk7TpECe9MPmpw2JxH9QHp5R14sdXmu8bJua9ItNONc4PucmLffPyCKV0V7J0mvAfX/LdjLNzepSnDQCTebZskRChso847qwboO/Q7PwO7fz6IjXrI+XXFEz9lZArwD2jI8cWCLXs5xkNyFQW5/p3FsC9lCJeurMjcyh+B9Spd2jGzG5Dm1MKYUWHrAUDe4e7T4B9D0SHXv33Vx9NIe2cWUPwedA9BUQpIjjBZzoFa7e8Ip7nBohktGtmxSyzNKAUrN0hMhwPchvh+VKKaboRKWdEpUgtnaDXptjIFGin5bLVLwxZSZ0D+24m1HCI4K9GIxcHOmHn0xeNyt+k5LAqJivRzr7ktw2rBZuCv8BsGWHoDZPaYyGaQCDcb/8+dijc6xmgaag X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(30864003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CKgehby0Awlff/hXozmM6PrHx7Jxj3rq29glFu/O39ie+hpUoOD4SdD9q5iE/ZqxJto4GAbLas3xckbjMXBGipDgJtk/fWtr2benf+h/dJyEAzjG2l50TAAT/clP2IuAdDixGEdyTW1MSs9Fe7vu2N34rE4BtW7Mjz+P2ABAJqyz1c0APzDSkaWIfY1zHPYzWFdHVhg5SUjn0/5CO3EnEu1fjrxRXwVOqyZx/GpHzNxLN8Jgz8Qu/vwoN6OJdqSaHJ5HoJExf+I0hNKxiYEskyYUqaV1i2SlxiWRIdOdcRAAG6RYMebVOvQFgL4lA/jATZlPXbRDvQ+Lp1nCfnZ7tARwB2ZwsLsYB3Mbd1T4XxJG3RY0UHScwCNgwCczg3bGp+nps9rrepeOM7wwNDb+C3jYWz8VbjhfLAn/FpyOat0H4qLa/zJYG/JMZflQH/SnIryCs8KairDbi8NT+T1xb6fVrJhKoB/ute6vmqrR/LB1IpImFoCGptXVpvlRC4vTgYogugB0lLyhwfjFRXi4cbEkBY194HvgfifJtuni+85dX7JVcqq6UcoT5VGt4971nfIqRyQvn/UG2NmcCBjU+1OCquqLHk/T0WZ+DNLqvw8fJ17DXKD5Pjcx2FjQ996gvbKxpdSvz7bmOur0wQ6Dltn+MxlRJzWbg4o8qwBQuyL7VH7pKQ56W4JMh2Ue7Y8FRy8jYneT3dwdTxnonEaG7JGzoCJQ36FxVxf4xvVAj3xqdcE/4Y3M9NDjlmVKc6zEpkN1iUIWZT+iTNjfJ+QssC73HQPVjzcZyCfH/wdgPLbEytFbMfbed3F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RXthdc+InS5MLQrIsUIp/Yrer2qJtB3374Kg0LkCzqD6u362ryfwv9Z6muRJ8DvKaOiwe2CW0ddwx2z5lhRqgP0CQ5opRiQx2PJjGVQPNm+j+GpAWG50+iGtfWBzNk+psWCJwV2lvaEXQD3d+eEEvqJJwWViO4ISrqLR9ELLhunl2rzLHWKuLeuyUN/p9MTg3Gsxe8WHgrijjPIblBML0pj5LEgXwCnPCpRWZ0EEZEL2cgC+Uw3NNB6Kto3u2+MVX/5SfrynA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bfe6ba6-7ec3-46dc-d2a2-08dbdfdca28d X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:11.8290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sZ8wn1aJg8coheTMpxBuOOGEVpBbfoH2a52kdExw7kmso1y4yMcMKhVY6PNsimqSYBs/hS7foaPwz4MZI+7L7VSuAERkrlgx3/UOyaUGHbw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=905 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: 4Rly8C7N-vzok3oHXOf7mNSol9ADZI84 X-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WirH3tshg/m4mkNyucM8Tmalwtx/mmUmeyD8eVIcEaxt5cz5xLoyE4silTIXmd4D1AoBrNxmHAN IcoVVe/o PyBEfO7uV/khPhrE+DorChVVilOqKxR/g5YKzLIWZjnr0n5ldKRVXFteKbTF3SDw2fzniXo+FgcQyicQjAM7aHsJ9vTUSCZ/8+r3O6gcSLR7IElycacXJGJUJC6uieF//3/gTBHxG5QBhprtk5Kw8bgitolShriN3BcjgBVsddXFcNAjuemeQBTaHVgtGAfLR+Iunv/d0SUXHWs9Z70RjiRn0ydQ0YTg+3rCxTwlr60ThpgaK7T9MPbm+5CmfMho992eqV76QXRd1z22m2AsoflhaQ1s4mOvxynq8I7pfNxNiex34JvbKf99wBfEhLxVPIU/mUVdiQ1zIXQEL+YKWzOujboPduOGIdYaau4CkWWzxm8/H7KOt/AwrpoJ5lv4bvTgFnOhUoirjwQTjqT62LSovXQ+MCgFwkUi/LuJDeoJ6OEHMLST4xsYG+jGLBld7V4zft7oBrQE/5pAtA7CMXoHOwA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 99cf983cc8bca4adb461b519664c939a565cfd4d. Signed-off-by: Ankur Arora --- arch/Kconfig | 36 ++---------------------- arch/x86/Kconfig | 2 +- include/linux/entry-common.h | 10 ++----- include/linux/kernel.h | 7 +---- include/linux/sched.h | 10 +------ kernel/Kconfig.preempt | 3 +- kernel/entry/common.c | 11 -------- kernel/sched/core.c | 53 ++---------------------------------- 8 files changed, 11 insertions(+), 121 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 12d51495caec..3eb64363b48d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1395,41 +1395,11 @@ config HAVE_STATIC_CALL_INLINE config HAVE_PREEMPT_DYNAMIC bool - -config HAVE_PREEMPT_DYNAMIC_CALL - bool depends on HAVE_STATIC_CALL - select HAVE_PREEMPT_DYNAMIC help - An architecture should select this if it can handle the preemption - model being selected at boot time using static calls. - - Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a - preemption function will be patched directly. - - Where an architecture does not select HAVE_STATIC_CALL_INLINE, any - call to a preemption function will go through a trampoline, and the - trampoline will be patched. - - It is strongly advised to support inline static call to avoid any - overhead. - -config HAVE_PREEMPT_DYNAMIC_KEY - bool - depends on HAVE_ARCH_JUMP_LABEL - select HAVE_PREEMPT_DYNAMIC - help - An architecture should select this if it can handle the preemption - model being selected at boot time using static keys. - - Each preemption function will be given an early return based on a - static key. This should have slightly lower overhead than non-inline - static calls, as this effectively inlines each trampoline into the - start of its callee. This may avoid redundant work, and may - integrate better with CFI schemes. - - This will have greater overhead than using inline static calls as - the call to the preemption function cannot be entirely elided. + Select this if the architecture support boot time preempt setting + on top of static calls. It is strongly advised to support inline + static call to avoid any overhead. config ARCH_WANT_LD_ORPHAN_WARN bool diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 66bfabae8814..ec71c232af32 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -270,7 +270,7 @@ config X86 select HAVE_STACK_VALIDATION if HAVE_OBJTOOL select HAVE_STATIC_CALL select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL - select HAVE_PREEMPT_DYNAMIC_CALL + select HAVE_PREEMPT_DYNAMIC select HAVE_RSEQ select HAVE_RUST if X86_64 select HAVE_SYSCALL_TRACEPOINTS diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index d95ab85f96ba..a382716ea7b2 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -416,19 +416,13 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); */ void raw_irqentry_exit_cond_resched(void); #ifdef CONFIG_PREEMPT_DYNAMIC -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) #define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched #define irqentry_exit_cond_resched_dynamic_disabled NULL DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); #define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)() -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); -void dynamic_irqentry_exit_cond_resched(void); -#define irqentry_exit_cond_resched() dynamic_irqentry_exit_cond_resched() -#endif -#else /* CONFIG_PREEMPT_DYNAMIC */ +#else #define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched() -#endif /* CONFIG_PREEMPT_DYNAMIC */ +#endif /** * irqentry_exit - Handle return from exception that used irqentry_enter() diff --git a/include/linux/kernel.h b/include/linux/kernel.h index cee8fe87e9f4..cdce553479b4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -101,7 +101,7 @@ struct user; extern int __cond_resched(void); # define might_resched() __cond_resched() -#elif defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) +#elif defined(CONFIG_PREEMPT_DYNAMIC) extern int __cond_resched(void); @@ -112,11 +112,6 @@ static __always_inline void might_resched(void) static_call_mod(might_resched)(); } -#elif defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) - -extern int dynamic_might_resched(void); -# define might_resched() dynamic_might_resched() - #else # define might_resched() do { } while (0) diff --git a/include/linux/sched.h b/include/linux/sched.h index c5b0ef1ecfe4..66f520954de5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2084,7 +2084,7 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) #if !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) extern int __cond_resched(void); -#if defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) +#ifdef CONFIG_PREEMPT_DYNAMIC DECLARE_STATIC_CALL(cond_resched, __cond_resched); @@ -2093,14 +2093,6 @@ static __always_inline int _cond_resched(void) return static_call_mod(cond_resched)(); } -#elif defined(CONFIG_PREEMPT_DYNAMIC) && defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -extern int dynamic_cond_resched(void); - -static __always_inline int _cond_resched(void) -{ - return dynamic_cond_resched(); -} - #else static inline int _cond_resched(void) diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index c2f1fd95a821..ce77f0265660 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -96,9 +96,8 @@ config PREEMPTION config PREEMPT_DYNAMIC bool "Preemption behaviour defined on boot" depends on HAVE_PREEMPT_DYNAMIC && !PREEMPT_RT - select JUMP_LABEL if HAVE_PREEMPT_DYNAMIC_KEY select PREEMPT_BUILD - default y if HAVE_PREEMPT_DYNAMIC_CALL + default y help This option allows to define the preemption model on the kernel command line parameter and thus override the default preemption diff --git a/kernel/entry/common.c b/kernel/entry/common.c index ba684e9853c1..38593049c40c 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -390,17 +389,7 @@ void raw_irqentry_exit_cond_resched(void) } } #ifdef CONFIG_PREEMPT_DYNAMIC -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) DEFINE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -DEFINE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); -void dynamic_irqentry_exit_cond_resched(void) -{ - if (!static_key_unlikely(&sk_dynamic_irqentry_exit_cond_resched)) - return; - raw_irqentry_exit_cond_resched(); -} -#endif #endif noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b43fda3c5733..51c992105bc0 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6885,32 +6885,22 @@ asmlinkage __visible void __sched notrace preempt_schedule(void) */ if (likely(!preemptible())) return; + preempt_schedule_common(); } NOKPROBE_SYMBOL(preempt_schedule); EXPORT_SYMBOL(preempt_schedule); #ifdef CONFIG_PREEMPT_DYNAMIC -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) #ifndef preempt_schedule_dynamic_enabled #define preempt_schedule_dynamic_enabled preempt_schedule #define preempt_schedule_dynamic_disabled NULL #endif DEFINE_STATIC_CALL(preempt_schedule, preempt_schedule_dynamic_enabled); EXPORT_STATIC_CALL_TRAMP(preempt_schedule); -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -static DEFINE_STATIC_KEY_TRUE(sk_dynamic_preempt_schedule); -void __sched notrace dynamic_preempt_schedule(void) -{ - if (!static_branch_unlikely(&sk_dynamic_preempt_schedule)) - return; - preempt_schedule(); -} -NOKPROBE_SYMBOL(dynamic_preempt_schedule); -EXPORT_SYMBOL(dynamic_preempt_schedule); -#endif #endif + /** * preempt_schedule_notrace - preempt_schedule called by tracing * @@ -6964,24 +6954,12 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) EXPORT_SYMBOL_GPL(preempt_schedule_notrace); #ifdef CONFIG_PREEMPT_DYNAMIC -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) #ifndef preempt_schedule_notrace_dynamic_enabled #define preempt_schedule_notrace_dynamic_enabled preempt_schedule_notrace #define preempt_schedule_notrace_dynamic_disabled NULL #endif DEFINE_STATIC_CALL(preempt_schedule_notrace, preempt_schedule_notrace_dynamic_enabled); EXPORT_STATIC_CALL_TRAMP(preempt_schedule_notrace); -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -static DEFINE_STATIC_KEY_TRUE(sk_dynamic_preempt_schedule_notrace); -void __sched notrace dynamic_preempt_schedule_notrace(void) -{ - if (!static_branch_unlikely(&sk_dynamic_preempt_schedule_notrace)) - return; - preempt_schedule_notrace(); -} -NOKPROBE_SYMBOL(dynamic_preempt_schedule_notrace); -EXPORT_SYMBOL(dynamic_preempt_schedule_notrace); -#endif #endif #endif /* CONFIG_PREEMPTION */ @@ -8583,7 +8561,6 @@ EXPORT_SYMBOL(__cond_resched); #endif #ifdef CONFIG_PREEMPT_DYNAMIC -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) #define cond_resched_dynamic_enabled __cond_resched #define cond_resched_dynamic_disabled ((void *)&__static_call_return0) DEFINE_STATIC_CALL_RET0(cond_resched, __cond_resched); @@ -8593,25 +8570,6 @@ EXPORT_STATIC_CALL_TRAMP(cond_resched); #define might_resched_dynamic_disabled ((void *)&__static_call_return0) DEFINE_STATIC_CALL_RET0(might_resched, __cond_resched); EXPORT_STATIC_CALL_TRAMP(might_resched); -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -static DEFINE_STATIC_KEY_FALSE(sk_dynamic_cond_resched); -int __sched dynamic_cond_resched(void) -{ - if (!static_branch_unlikely(&sk_dynamic_cond_resched)) - return 0; - return __cond_resched(); -} -EXPORT_SYMBOL(dynamic_cond_resched); - -static DEFINE_STATIC_KEY_FALSE(sk_dynamic_might_resched); -int __sched dynamic_might_resched(void) -{ - if (!static_branch_unlikely(&sk_dynamic_might_resched)) - return 0; - return __cond_resched(); -} -EXPORT_SYMBOL(dynamic_might_resched); -#endif #endif /* @@ -8735,15 +8693,8 @@ int sched_dynamic_mode(const char *str) return -EINVAL; } -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) #define preempt_dynamic_enable(f) static_call_update(f, f##_dynamic_enabled) #define preempt_dynamic_disable(f) static_call_update(f, f##_dynamic_disabled) -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -#define preempt_dynamic_enable(f) static_key_enable(&sk_dynamic_##f.key) -#define preempt_dynamic_disable(f) static_key_disable(&sk_dynamic_##f.key) -#else -#error "Unsupported PREEMPT_DYNAMIC mechanism" -#endif void sched_dynamic_update(int mode) { From patchwork Tue Nov 7 21:56:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29BE6C4167B for ; Tue, 7 Nov 2023 21:59:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91B868D0065; Tue, 7 Nov 2023 16:58:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C84D8D0066; Tue, 7 Nov 2023 16:58:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FCA08D0065; Tue, 7 Nov 2023 16:58:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 158B38D0066 for ; Tue, 7 Nov 2023 16:58:53 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E60D3C0BA8 for ; Tue, 7 Nov 2023 21:58:52 +0000 (UTC) X-FDA: 81432523704.25.42EA960 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf06.hostedemail.com (Postfix) with ESMTP id A07B018000E for ; Tue, 7 Nov 2023 21:58:49 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=JFxoWFS6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Z1B4RG2l; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=05a/YnKdi4LgWgtnGSqIsbNgxNTD61Wh2OdNihh31Hg=; b=LUXssZUcjICwhyX8ou4L7NFvPDBFGL21aznU2AVle2HLHbUr2CMdzysi1zyMxqvyVBA5ED hddiUaNvEqV0cdoZVxign39JhjwZAa/y1Cb7j5yi+BDZFg/mi8byvNn2UfAvUTvrnBDYys LOqr1LbkPVo7GpC/T/kgqgPuOMlbqns= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=JFxoWFS6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Z1B4RG2l; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394329; a=rsa-sha256; cv=pass; b=jAIm74xOBLD5ScnK1Zg1yNufu5yy6Ckp/VrOmcoZzeq9yIZuBilN6MLR+fAZpwVeOaIKLS kYub7u1dkBPDl9jQy6UDcH3HQEuPMjSqcMjDQFNTYqg1YRiQmDbYQKFIA7p8rG7mnMHpUO PKEkwQ0QKYJsDwVXUQ3tY7nMydXiP0E= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJLZw028111; Tue, 7 Nov 2023 21:58:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=05a/YnKdi4LgWgtnGSqIsbNgxNTD61Wh2OdNihh31Hg=; b=JFxoWFS6y9ak6XiGNiBWkfzP8/V5gdnj/pSVrwpkjDTzPhxF/r4CAlYKUp5Peqb9EBcF SEltDgf80hShsf9Qd4ru/7QXx0DH4VhwPZUYdEnzLxynN65wctHhGOWT7GFET9z9U8FX nh2UpUeeeetUN86cehWdG2wuNt/tIR0yEVvc3IFZcnP8Cx2Ht8+kHEQSjf+OWs3L1edY +MikgTjsDx+E3tDLY23RxBV6m1pZwpxB9q89TiW/uEI7LACn2rilEDFGRm/YiVLNmGTR iK57hMJ4sZFeCwMQmLUWceU4ry3tcvcPHbfIG4MNnTMLqQ1IxDcNBhfa6ocRRd1PVv6x /A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w230299-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:21 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrHf003903; Tue, 7 Nov 2023 21:58:21 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshdn-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JJSiqpnWHHLNvMAoVBjEUG0mhCeVCJpWwKslW04SpBjfea4XoHGDcEXLd12htNuoN3KvkU1FNrhensDwbZsAejq+tq30cR+ZBXzxNqU4X1+Yu5t07qHdSUxy0aosqEHVG1oE/E7TWXNepFPqt3sh5yan5RL4Z5IiNgtffndpZWPP/sAOiW4h5ojlLphEYVmlXkxZLobDlu0pYOS3BOXH1Iyj3OEeM03JfpLUzpLDrksR0xZnOYTbGXwN1a0ZV13rkxc+dxQF7Dcd5QkjMfxdpiFDbMWe+j4LZAD80SKz+UaVWDLiwllmYiC6gTAA6WJ5OFmyAkL4qrtsLAQDnd8S4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=05a/YnKdi4LgWgtnGSqIsbNgxNTD61Wh2OdNihh31Hg=; b=Sydn4grmQhp9EYEyrd+iv9FI6fT1Np9aHPZDVzVaKjbaWvQJLvjKETZ3nkZtlj7BeJ0JgazHqCvIHve2JNvxZyUg8XKfWYSuXPWpZai2QPr4ZFnmGawOixS3jHe7aEztMAr0BAfRn+tSsi+pMJHl+8b8tNNqJiDCGSVlzzOPw3OQfYPG5o4mQjizyg3s7uoxHsAVtKSUTUcpmOa6GjLuXW2qJjHlQFFDqbe1fPmrARFkNb6FLiyg0svFhumbe6jsqWie6bhFE0NG4Y6c2JMAuemUH3gARxtnMfSbYfjvwdYT2nZOyqaCx+kfCrO09ETYUmfkkTnn4Qcqc3gZnpc/CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=05a/YnKdi4LgWgtnGSqIsbNgxNTD61Wh2OdNihh31Hg=; b=Z1B4RG2lMj62/CjdGe8JvGMytscATerlaErz/nyzKuLoX0WvmB+Smw+5bsZRGWkmtmBkk+L+/soSkzmheqYfKqz0KAAmv6cEwXsqLbRKMRF2VLYVv/JFfX5fjGhoh2rkaj4FHEouB6zO+dbLnaDUpgXJ+cBrUJCtKuznEjRrPQ4= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:58:14 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:13 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 10/86] Revert "sched/preempt: Decouple HAVE_PREEMPT_DYNAMIC from GENERIC_ENTRY" Date: Tue, 7 Nov 2023 13:56:56 -0800 Message-Id: <20231107215742.363031-11-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0276.namprd03.prod.outlook.com (2603:10b6:303:b5::11) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ea3c12f-57cc-48e9-3f9c-08dbdfdca3d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J1qWcMTfmW823oOfMF677F1HSnfr8dI/MNs1gJgw2PYExtGieF9rHz23gQG+N/rOf1AEI84Dfqbui348LxCqjgcmPdwztzvKbUrnox19VilmI3+rt1ll885rbQT+FrZgGBEATMLSUUOY7ilhAbFm4DngJ+qn5L7Vc1zRyGW5t6ad8TXrR56G+bYnFTVZhd6a1OQ+8BKHySLsw3yHRjEHeI5z++V7/o8TJ9CoxjzAVRLVrSU1Z4mqZxIYvtcCFIMiQH7uBb5KdDlHB7bD9y1D2WewQPJ5S6ifLzAU8uOqMCl0/sx4epogWY63+z7N5FRlyanu0+EtUy/aZy4B29aqUQRaiBq5vesKr0ac5TXm7aKjMU3wfiQIBaxvqPqwijh0XV1vPtYkI4fp5/x/mFleechteiTwJcSoXcYW9QTmtdiLmZP7QNdfPOn2h34QtssRQiNCGOIjOmCa0u7tNMFXwmwEyEenl+RjwbIdhTr7+aBHjyI1H5XYb3l7Bc0LmcgOyVvfPtfd574PI4FLp3GVnecjgDs9pUOa6lBlVt7wixekKPCcnHihxXF3jEFChradw2PW6Ul16TNfVWfZ8pHPE2Mm9yNy/b/r6Wy3AiWM5HM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(4744005)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qxeEMRUAqTVHFFBuClu9E/kD1BKyDVcQBUw64KLATTegKcKK3zPfvsKzxW/ACbDPVN7bmjgyvWMpR0nVucr7+dc79aGYyfuP+Jwu6PpYmHUAnUVXdj2shv7A3g4oYCMCpCtDdwBMioECPAM4AAbfI98ujjQeRwf9dvR2qgIF2brBZLNs7n3vD1LHsbXFofMuaj7k7GDC8pIbueyShsaDFQtRzDq0Fc9QOe4epRTX5nRKnPZHSZEE+/HFXOGWmJxjSasGU70E4J67S6UASm1a1C4T/a471lz+5/j1Ofs4RWQF4cZ94BthDgQ1ddu8LOWwJQk2Mkg90Nsa1BrOyiWlyWPZb88jaO0sgHzsYSQGTLY8BaReFW83sipSuyDgqg0397aydEiYlOIZBg79Ifs2Paa4TdupP2atp5fyLQbqqrhzvRXGykUROZ3HdojvKdxbCmHn2vVKo/MFUkrBeXkkJJ4ID0Qhj9AITaScLKDMZMCZoLqaXd3mNlHsuuOkWt0blTPJ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YrECi7s4IGjjPll8fb8x0i8lTf1/grUwZhhfWf0IZHcvaEybWDVA83it2lSSzXw/wol2kFbL7ZGmbYpE7WZJLvplQPRSCJI/tXrYvn8bIYBwtyg+GJg7uJXAu0JypnhhpQY4PTztoEIrpTifcp/oUBEIqgmFVtqQgTn36Immogx7f5Sh8f1yiBgKaaXFJ/yDGLvko7rG+km+N5S1fDTvS64UPzrkYUojLSW1dZoGl6ZXm+SeAfUHTC/3lmI5f1QLsF5ct2vWcT7SW794FaGh+zf1HcMv/ah/EN5tM0P0IsKaE/JuXszraL7bxFAnyjaEwXQ1Ot5B9lANYjt1Zbm3VAQsOtbxlTvHbWNzTtPDj2ILM4RGY4dIynfgKwf8b6BfcGg7b0YTa7fe4MspIRnuEws3IUyP5HyMvwmt6fNP27W6gopWEQwDVY5NpmjP3j2p1iM3ISM+y5SVc/hlNKbChyuoh/5I2f40k93wSTU1cmXlkBH1xsxqy+92Nt5DZoUgS9fsnf49RDKEw9IlA+88WFyPDlE4O0p1z8OKo8Pv1B6uN12yaB6mc3A4CB1JECyvuWQ5L7VKc8pv1REcTvSA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ea3c12f-57cc-48e9-3f9c-08dbdfdca3d9 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:13.9198 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hx0+IPMylS87UtvceO0MmExl2B2N/SANU8FrR74xQWpvQieD9soyYyAFLYleeFVKX0e+SLWDjmSE8KVclgKBqksbosK2055Iba8VSJBS8Uw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=876 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: YtHjBveuWjnMJjIJCYFSLG0xsat7B67Q X-Proofpoint-ORIG-GUID: YtHjBveuWjnMJjIJCYFSLG0xsat7B67Q X-Rspamd-Queue-Id: A07B018000E X-Rspam-User: X-Stat-Signature: 7sr3qjdkrockkxdscna3ojcnoupnuz97 X-Rspamd-Server: rspam01 X-HE-Tag: 1699394329-242760 X-HE-Meta: U2FsdGVkX1+VchJiRv9LsW6CPyvsgz1C/qWLHL1udyAOBS5mHv3IFRI1I5q/Km2Yfm2q4A5tey8qobv5CPej5tnUSg/V+zDRB7wupz0cE2tXRYwk/dildM6/LqozCi22p+ANO5tSHC/izyXctjT6NpMwIbuyV3mEAHNQ1HnSJUkv7lkZn+cIqKO020OnvCn87X9TKpw6LfNSHwcHK3g/qESipZtdD/BCTwBdBqv/erdLTqmOjvDWC6h6lyQcEpIsJzyyMyqWcUkL/Dmj89vwl9OS3UXWzsVbMEkJs7HKf8f2Zd1BKTgqd1UTbDgT8hYKEtQ5/0XYA7joatWgHyDFgehrMkLNYVjhJG1pw7AQ9XTALXnVT3JyFFlXQvOvX3ts0LlEX6tv8AnK7i342/RXfPRdsuGFql/aV33DUBrak14BSgsgce9KyUDzUGgMM2kWiIFa7CfbqrofXE/rKv4Opey7tDZLDoOOcXh21oUMCMKUCAIQXru46VR+yMnNpt4KNQeW1/MDExL/irt/551oio4P4sPIuM4FvigYNX7/LyTFqpCsgHwSTLtRiuAPcF4/XMlltT6U187zgXgL7MeYDeqZxtjdSu1Hg57bwUUo2nTBXU5C3ARRU0shgfsK2Zmm7+Wxrfz1M8V4JF9HE5v8sTFd1vMPS+zU0B/fGNcuDxEscIoH6i6UhoOiEKt2FslIAqEZzNvVsnK4w2uwDIS972xboD9rWl+YK/d9ScVCU3pbzOP3uA51tGtvnJzEEYAZialn17+vAoZMKIPz/KEmnXzInqj6NA8uEpklzviiSNLcVnwQx5XHkhMws8MuUb6J/6V5Gy5TR9Dj1MsEkYKt4KaH1MCRbQxfvAFD4IH/AMHwsD0LR3z3D4Q7bEbPys6uFeeJxtK8azSPy8Wk0Iut9O8HRdvEqV0rk5ReSsl2rhj6sbiGOxfpZkLkhXZzRp1iRuiCat9a6LpdRfvCGCH Hh/4pORi j9Gd9muDSi/LWA/iVNvL66w9gBLt7tFqKVwZ1hEsahpJtQXG62Ps2JKIcY79+zEHh31ajqPwfCajOgMtPhRB1VXhBCbh6v1BKFddrGt7/UHlz63f4tqHkFsOmOTeg0KKprlhDEza5wOkS7r/I6Bd1aHq/z8j5UH++mYt1MIo+u708JswGItTpQXYmVqSB/gKbhO81GQAkcFAY8USJ/+a3WVsUXMu6JvForcjCVmk+YSQUS8gnu9mXfUtyIgGHawG73iUg6Lso402mZuOwoaGSUK2TLMpabCKWscz6FeI5zqCsgorWtwI3+syVBPE3wHrdNVsIN/SqxAhM1lvK8DIdQQ9kbjwcVAerttBaEGjriCD020qH0Yf4nUrU+ReJhbXkUQ2OvqGQPDnEO/41u8DvuDCK66SufhmozgAVCM59SruTqACzx/vdAdkLDFStyFJFe4mmEW68D3enD8KSo1+M/vvH2A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 33c64734be3461222a8aa27d3dadc477ebca62de. Signed-off-by: Ankur Arora --- arch/Kconfig | 1 + kernel/sched/core.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 3eb64363b48d..afe6785fd3e2 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1396,6 +1396,7 @@ config HAVE_STATIC_CALL_INLINE config HAVE_PREEMPT_DYNAMIC bool depends on HAVE_STATIC_CALL + depends on GENERIC_ENTRY help Select this if the architecture support boot time preempt setting on top of static calls. It is strongly advised to support inline diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 51c992105bc0..686e89d4ebb7 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8636,9 +8636,7 @@ EXPORT_SYMBOL(__cond_resched_rwlock_write); #ifdef CONFIG_PREEMPT_DYNAMIC -#ifdef CONFIG_GENERIC_ENTRY #include -#endif /* * SC:cond_resched From patchwork Tue Nov 7 21:56:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E21B1C4332F for ; Tue, 7 Nov 2023 21:59:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 19EA08D0067; Tue, 7 Nov 2023 16:58:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 126488D0065; Tue, 7 Nov 2023 16:58:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0CCC8D0066; Tue, 7 Nov 2023 16:58:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B3BE68D005E for ; Tue, 7 Nov 2023 16:58:52 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7C02180BBC for ; Tue, 7 Nov 2023 21:58:52 +0000 (UTC) X-FDA: 81432523704.02.9DAB473 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 0D1AA1C000D for ; Tue, 7 Nov 2023 21:58:48 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ipt9p2RP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=X1Vu+anK; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf21.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=77+FBkBUzVWyDU8YjIAJVQ5OkN6O8nF00abGUXbnSB0=; b=KQogdkL9YwDDbgN9SFKXfugD+9q0BGOcsRaFwlGwceSph3Bqy6MOdG6Dml4hy03zoFWRZn D4ZKlyKfHus3n1n3bih9JAnj68Y5BP/TSR3Y6qImyCHOPGtvLIY5banFzx/SCLZp56hSJK W8TKtunWzm1I/+Qh2H7sj4YcFg+McDs= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ipt9p2RP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=X1Vu+anK; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf21.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394329; a=rsa-sha256; cv=pass; b=o8o0DwgE5ji4IVlCvS1h6rSaV+X/JZVPsA4Rdg3kEhDWJE8qL7n6fQG/tQxVnEdvG3p6hg sSW/JjYsYyeWBD4Zg9BKzY38WafCGgjrUZzrrI/1DJOJpiNOtNDK5sV51HcYo3fdImtJGR bXWmeVlxznR/KWi9HT8/mSXYcRyUzUw= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJmSr000897; Tue, 7 Nov 2023 21:58:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=77+FBkBUzVWyDU8YjIAJVQ5OkN6O8nF00abGUXbnSB0=; b=ipt9p2RP/bj4dLIt8tlb7rC+gbAdegH+9BfhPXV3IfgFPSH0Pnuexp9M8WmOkoPeCaM0 cESXDzj0o/5agnr2uE3R7qwKruY8VxfZ8Z355lkqz95yQBLnUSgjhSv5LqF0U0QkFeCU jFL+2/LjfMm01NZvBBJ3XZN2Yc7RWLtiWQ9I572vVTKfXH3WyqMLzxE5gj3D4Ovc5zQg P6SK1LVmtQMV3ErM6OTZ2MKfGHhw6Dz9a1FNSEgcmLqYa4wCX+k55omysymdXLLxCKP3 GPrYdEaT3jcAlBIeRM4vxRBSrDruN72ZVCWee+M+BVnzcjmYdmswEtzL9F6lj6ZfJ+Al Vg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2a3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:22 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrDQ003912; Tue, 7 Nov 2023 21:58:21 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsh7b-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iGAsJfsn1PpO+ucsOg4vxuLLx9U1PA5gcvqqQWlq2lu2gpsTFXLodpi0IS5UbjSKUPu7wYpFoUtoOee4U7SL5tBwCCzbXUGeIPLpF4RdcM7Zyqy7NMJsgAlDlGbfEs5RZ0ZJ2IInCuNu95JtetRz2EyPNhjxW8l0nlVoB3n5keoh8pEYMyHVKT2U/j7FLZ5IP7y0w9ehdxwutc9Zyuu4SHUwr2tT/Muq0SmuJHIDlt0a6SounwIjYT8VkzWOlv9JX7EV9g7BOA7cT/uCs9aFzcw5JRLWoRzTvnNoHFw07S9c1AjJSY3OUHGe49yxuLSl4bNqCAwhWp9+0Eg0p0KpZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=77+FBkBUzVWyDU8YjIAJVQ5OkN6O8nF00abGUXbnSB0=; b=HWuF0y8e7vqIeDWWyhYQg1uIvfkwI+IRCGOwsKBcoVf4COmb3TF2WFAKN8nzhpFILonY+HJSWMz8h0zUHOaXB4fyG18bTamMVMHA84R+lQdqtwIXnwThoddO7vMVF/3ptlkNCOX2qJFC+2HFtrFT+LVgtpGwbdeoIsJ3DJxzxuzkSfXz32WpMAAKn+2VV2Tsf05+fYfzySwsPTztpELN+mI9KjLhWZAjp/Vd1D+2m0w+M9geQwdVerL2i2uRqOVwaYlePzvl3fk+7Z/wtPBzncxJyLqjjbNM0N0Prf859+QQsqDmNXNT7w6T+ecT4Hb/H4K3ZDbLfeKy5XkglnnWFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=77+FBkBUzVWyDU8YjIAJVQ5OkN6O8nF00abGUXbnSB0=; b=X1Vu+anKQeuVEqHTB52YirP/BUQjC5DhanTb5wU2yC8nhFxmI+wnY/fKcZEOjToooQkgVO2e/K0tS0/XpIGen4iiWmF6m4i3qEywW/+zS/gBIFSD+b0FfjchbfNPwUdcgnIkO6RJQL3eIBlI+B2EOoE3StoezxJD/M0xaPMng4A= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CYYPR10MB7651.namprd10.prod.outlook.com (2603:10b6:930:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Tue, 7 Nov 2023 21:58:16 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:15 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 11/86] Revert "sched/preempt: Simplify irqentry_exit_cond_resched() callers" Date: Tue, 7 Nov 2023 13:56:57 -0800 Message-Id: <20231107215742.363031-12-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR06CA0025.namprd06.prod.outlook.com (2603:10b6:303:2a::30) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CYYPR10MB7651:EE_ X-MS-Office365-Filtering-Correlation-Id: a60f8f50-ff73-431a-e8a9-08dbdfdca500 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mBg3kSVTYjt6TBbKcsuoz1RUASbC9wSHhpZHcUzK6cMzmZCTs+mz9iuXKYL/SrD8CkNmS74uf8K1+AKamzEbywQFXlW+06DedlaV8jLLycjOQezf6O8pPxU3jrYWjmH4h++uZSkdbe2jwDNNON7xNtvVsn7zGzBggm8vZpdkGyAhjmZcaKIIIKrUl1OOhVCie9KCg4YGmvdnoFEnzVdO3unRH/HgCgFcZTztvbtGv8fCwi48gv5BoSOPoOyULlCgFNAS6ESuNuqnaKjPjX6VrBwMcSvaqusIJuc8TQBrS9UxT2TpW2Ib/DsQ/f2w9xdvZwxu3opjeu+mryaNWr30FHd1P9GGLkRX7Y39pA7Jw5Zel2z2610+2CgWe+TWTSt5zMkDUg83eM/DIBoNwdDfspcF3cNRB1wyAb2uxhZmVw2PWAhOiDm08PBOjSC1VxGOx4IyMieqBD6ht4KSpfioHEkngL1tTPNnYD6HVGjmW7TdhQzG47Har53WXmdLwhB0nbS0D07NZOpZTV44ErfmB1ayh2qm2dmTxyrjhsX9FC69UV3xr/nu6p4Le0kDgc2A X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(39860400002)(136003)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(6916009)(41300700001)(66556008)(66946007)(83380400001)(7406005)(7416002)(66476007)(316002)(478600001)(8676002)(6486002)(2906002)(6666004)(5660300002)(4326008)(8936002)(6506007)(6512007)(26005)(1076003)(38100700002)(2616005)(107886003)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /hNybEJi/4S8nIwQ/jm3sVaNhUw2a0E9HXgHp25tUbGqvThSSqcY89TjQYQnNecEo4fNhFV5elkRXIYWAkzhj3LSzZiaH72IFNjp6lfU+pZO2LFnWacFcyZ7pq0y+hb7GQq9H4C8//88It/G+0SEpNS8Ujp8ud3W6w08zhX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qQmXDNB9/POIHlviN4aphWzwq2uLT1299mk26uE90Qew7B41BcZ5vf00rIbOVpTvv+2UuvDvm7CyBEmLAZgoQh5OUOjTfCWuXM14s8aguz0ohwOJij+YKLiNHFugZp2RK91NuFS+ukgsRsyub+tigW6NUPQi8CYnNPtcB4IrV8BOU76CgafXH1VX+2aJrCW9jtS4suxFxnx44TfTQ2imcMj3HIQsCDMJCih6dbF0sv545JpsJAXgepl7/nuIYqOtYpr3N7+S8xvSAg8NcI4e1+NpNpAkW34vdTCx+OEiND7oALxL1UTjbBCc/nH5oqyYhJil68vp9iIyJ5geSQuBjZlytyOq/mMDQh+cv/j6El8KwzivDPqesIoJw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: /RBqNFH1XrUKEUtqyXSyh34ULP3tGBclnLskzpoF2fqOUCQopa9Isxiaxrzz0HQbSGexdcnBEnlZQ3U2XsIk06/Zg3pSDNaCKQgRbUKL/n02p4NNIeuN7aiJwHDb2ZruOCdV2cipWjJO/wL0zSNif+uDaanHuCKxBf9y/PX15Ied1vxHmfVQ6WtLoQyQJyWeEjmjZTZZjITZrva3m6ZUWWnLDqloC/UpunmxAN1nG7M186hhu3caNUcOrwX3icB+4KY/yOi2k1ObOzaz08/JCS8avX7MI1aVRxni2bcKMyT15/tJy9A2PTMuMGpRfPKoW9pKqzJ5UVxI0KmdG7sSdkriYrNLO5/XenfQzdjV9v9yzj1tzjsOcN5YrnUwFBIvDklg+4A1XC2N44l+SKuaQfWYmc4yyuk0QSyZUpyv9IsnhxJriFs45Wcdj8lODkTEWDZQ5QZECVWTMEZ/M38P4ahlkBa9lXwX0S9gmQDkuTCDLbxOQ7FVSqY3M1dhZ579vftUo28EnmvF2JZhq/QXen8NobC2UpvV8AH+unP6eMGIL/YmghD2tTn9R5mnGrn8/4/uPz1/ao7qS3C9SIxSQp5fHDUmtv9oMur3EJg42dN6MouUyCXYK0Oaqvklj9qycFk+VvKidJWhVWoTqoQS3seb74Ci4zZfjt9Q6wZ8ev3Zu2w+CkPfBHiz3m62pq2NdDGz5GnJQfaC8dPtFN9lZdpDbV5dVv+75l4bCICA6Iydq1iy4rLhbmAi3+yvqlaQOmtj/h1IyLAJj3iJKY1TgjL3xj3JmDfUx1BO5lLmCNhSewQ8BW9lLH8T5dCJAYBe4BCENz1hgVAIjxG7QttIBdeiOaSXGhHuY5n+XN70vfHgygVu/E9UOeuVEYMzo7TpPoanUNYsCrbpGeagpaECYu2oQkDfx8vWMQLttPG4+RWZU+0MbX5vVfChjLLQVWJFKmxriU6DLuWrTCgoqbOHz3Y0geLDLust4qWIfaksVp853eF5bYWOPnUnBaWNFkKcSGxlVhGanIJ/HviwMQIFvIqBaMYrioqhI+b+CndwOcDsQelxn5ate5kuHozTaYwCFzJx4nO38MPyI8B85ydWNwfVqb6maA8LApAGV+liVDjX2CuD+HzeNlUUDy/TdL6/qbyDO7vVG0PuOrE8Jc+a8iuCIm14SyQ4m1YYWOpFvRvIl0SE+vK42stWhqhud4k5QL2l7hsZUTbpAwdo9xNMPkMGlNZIkBI/FYecHmUKjv14JHDAv9eQwQ5dpI4fjY5QCxpjFmXiSfFcTf9Zn8SFnxVMJ7dM3yWJecYGH2wIKlSm53YIgsCfAfFfUkdn99n+gBOIisrjZUuU+mZaJ9VPzth+VBIO+eo5f2Vz1/+mubaopXxMfLYy5Xt1zVYb5LxC76SLBX4aIUfjBjXxbWMo2flh1AJ1sZPhsTy9JgY2sYjQkAoOxAASC2kv0appSVSh/KaJDfjuNZx690Z3ShJjLs9r6Txj28esJcM4v137QBCX/t54wWz4SQl2cSJG78243yd7liA1OExpyhQlJv4v0A== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a60f8f50-ff73-431a-e8a9-08dbdfdca500 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:15.9016 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Akvo/+2Ak/oL7dEBLHJz/yNcmsSPecmefS0pI7S50R6SqoQpFf4d8PeSFwRYPpsPpabfP4SQ3cKH7RMgP2lzqxyjJuyu3Qyb2Q+bTh8LqPA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR10MB7651 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=871 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: VCxrgEeSUzfhKW41DeMbYxvg38-oY1_x X-Proofpoint-GUID: VCxrgEeSUzfhKW41DeMbYxvg38-oY1_x X-Rspamd-Queue-Id: 0D1AA1C000D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 6dcb51wkxdu8kb7u9oj3jgzranrndqan X-HE-Tag: 1699394328-199467 X-HE-Meta: U2FsdGVkX19QU2OjD8cOTXnxvEC0QjyT+QibYQteUSgHBH6hUmaIUTZslXi4bBeiNo6sqe55CiZJtCRyZ674L2C6Wy8rGjyw+JMIpbJc/Pv73UmjvfepEzglH3ucAPzsXbSpTj9iNH4frwmqzDbKTK2UXATBL3jDBWlR6C8r4EJvBxP2Ik9ubact/AtJdNM7ZgoDpmTqTeAh9ZTPxpB3x3kpVQnvoOLpikaWl6XBZTkzl7PMZbnlpLs1He+7K4EaSlFyok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MU8F25uM76TkwAubs4pRR4EioFtsMeZ+GcFQuWAbNUX2xHQXrd9TEe34PfE0sZ4eROQWRj9EU831Dsf0W6p2alkPCnJCWxAUzvzCjypadde060Xw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 4624a14f4daa8ab4578d274555fd8847254ce339. Signed-off-by: Ankur Arora --- include/linux/entry-common.h | 9 +++------ kernel/entry/common.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index a382716ea7b2..6567e99e079e 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -414,14 +414,11 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); * * Conditional reschedule with additional sanity checks. */ -void raw_irqentry_exit_cond_resched(void); +void irqentry_exit_cond_resched(void); #ifdef CONFIG_PREEMPT_DYNAMIC -#define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched +#define irqentry_exit_cond_resched_dynamic_enabled irqentry_exit_cond_resched #define irqentry_exit_cond_resched_dynamic_disabled NULL -DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); -#define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)() -#else -#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched() +DECLARE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched); #endif /** diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 38593049c40c..b0b7be0705e0 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -377,7 +377,7 @@ noinstr irqentry_state_t irqentry_enter(struct pt_regs *regs) return ret; } -void raw_irqentry_exit_cond_resched(void) +void irqentry_exit_cond_resched(void) { if (!preempt_count()) { /* Sanity check RCU and thread stack */ @@ -389,7 +389,7 @@ void raw_irqentry_exit_cond_resched(void) } } #ifdef CONFIG_PREEMPT_DYNAMIC -DEFINE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); +DEFINE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched); #endif noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) @@ -417,9 +417,13 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) } instrumentation_begin(); - if (IS_ENABLED(CONFIG_PREEMPTION)) + if (IS_ENABLED(CONFIG_PREEMPTION)) { +#ifdef CONFIG_PREEMPT_DYNAMIC + static_call(irqentry_exit_cond_resched)(); +#else irqentry_exit_cond_resched(); - +#endif + } /* Covers both tracing and lockdep */ trace_hardirqs_on(); instrumentation_end(); From patchwork Tue Nov 7 21:56:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F92EC4167D for ; Tue, 7 Nov 2023 21:59:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4622D8D005E; Tue, 7 Nov 2023 16:58:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 354C98D0068; Tue, 7 Nov 2023 16:58:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DAA0F8D005E; Tue, 7 Nov 2023 16:58:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C5C2E8D0065 for ; Tue, 7 Nov 2023 16:58:52 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9FFF780BB9 for ; Tue, 7 Nov 2023 21:58:52 +0000 (UTC) X-FDA: 81432523704.23.98F6E80 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf23.hostedemail.com (Postfix) with ESMTP id 2AF5B14000F for ; Tue, 7 Nov 2023 21:58:48 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Mks59KGe; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=NUW4SUMr; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf23.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394329; a=rsa-sha256; cv=pass; b=M3xs09Qc6h3qjDwERsrLWDDurCY1ZSIgF5U1kBJyo+iFk8dRBQAvDnLL25BJbUInyLwnoU A1vQisVrikcCQS/YOkRK3LgFUskOerfMqAc3hc02FL6NGOX44URhKmjhgI8C3hzp4x9vXB xWVKWqul546RQ0sNJvL/eHVyfXGTSQc= ARC-Authentication-Results: i=2; imf23.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Mks59KGe; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=NUW4SUMr; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf23.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=z23gi0AtPCZZif+I2F8wsU0hcS0zcnRuySiHcw3gMC0=; b=lIyHCDqRbElO7cht38AE/cwiR3DrP1w5vmvsw/UNSZ2X426JaJFZJ+akw3bf+KuoRR6VUD zXCH4s48tO1y2Y4Ydl74LJIfkOmaHlPhUtBytZIXAKrff2AByYqhxrKzYLbM42mECX1M28 QQp8QbhdxW9ObFlkuMFaE57O0vBI4pE= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJLZx028111; Tue, 7 Nov 2023 21:58:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=z23gi0AtPCZZif+I2F8wsU0hcS0zcnRuySiHcw3gMC0=; b=Mks59KGeX405Q3IgJ5hTuBU9MQdOgWh7PHXUqiAPjslkjNP+baul0f9D2YWeGtNyiIFo yEwSTOkv5j7ef7Mc1J1Id3wU0WV6MhfuVW8T+UuhIUdQXFmJAX7kyudRq0lpbQrQrP7W qH9/RKY3+wu8W89pk4pcQneTxS14AVv3+gBylPP2yRf0WPB2VdDeDG2vwA0vv6GQcjbA zpzMPP7ljnxiONWZXKJrxurX+yjYYH3AhyJCt/tpKKHd67HbDqxXDXvuREJNg5XVC2T4 TTn3XUWA+wGMt4aZ1v+QnnCn13V+eIQR9Nq3ELxF2wFFycPO6Ow7w4b3ZEaWP6l5uMA2 fg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23029k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:24 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LItT5000430; Tue, 7 Nov 2023 21:58:24 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsjve-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kH0jKf9JdPgE9jJt3JVYPPEb3nZvEsD8SqLPSa7yGaRJjXG36xVrpca8gvWdoBWSaLR/RlAd7H3QgqZa2c6frHT/YRflbX5XY09Atb45JN0WVXHUnd5VnNP3gUwWEOIycmXAKq5/SIMwephmVc/bHh86phsETREGxRoAIJBPlJe+f0Zzpf2V56u2ffHkIs6hIqEw+Yo50llbWrMt0PSsdBHW5AxmVr9Bkn7/pitklawc60KEFED/T/O1L5rXimGAZSgHG1c3dq5wqgygzD8KQ86pTaFC7E4LhnzXLobjARGcMMQGlMW/rdKZx6rXFpx2YWEOqKe7MwfP4ET0aNy/XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=z23gi0AtPCZZif+I2F8wsU0hcS0zcnRuySiHcw3gMC0=; b=LTOZnm8AiYEwp/Hu6YctvDGwZsEFrKIg7ZDNN/ESseFn2i2X7sOAuptQUkuMd01qMObZkAazKE30PSdAXHiXb7I6Ok45S0G4CvybbS4Zel0yKAb94aVcyYNuMnwNpJ51mZJeAmofTk1or/FzxP/MT5ZzPHg8aHTQ/ug4jzERbQKAPccFgLkwbZh+DxbZxANo15CbdKXKEaAWh6ldJxzbBKDXbFYQeR7X8fANliFRwH5lTEUpy4LjfI1hZlkK6PH/Ug5Ay7GxASEJHjRdhvU6iJ2EUZZgnIsUZskCQGvBKlurHeK58qQCs1mujwbAM5rDEqWWYkrLbBAkDdZe633V6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z23gi0AtPCZZif+I2F8wsU0hcS0zcnRuySiHcw3gMC0=; b=NUW4SUMrtSVI+bDj/sw+0O7V+GzregqnvGl59eEf8CnCtZuthbOop0BdmvIAlFHyTzCSBrXUbg7cg/faAh+YOhTcI/LjKZE/SrTP2Pr2a/1oqetRcUNxWrPqyjHkCGZNNO6ZGtYuzujaWzVVc9jaW5IZ8KB0AzH8LAodZMR20eE= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:20 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:20 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 12/86] Revert "sched/preempt: Refactor sched_dynamic_update()" Date: Tue, 7 Nov 2023 13:56:58 -0800 Message-Id: <20231107215742.363031-13-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR06CA0012.namprd06.prod.outlook.com (2603:10b6:303:2a::17) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 320f4a32-1e51-4f5f-98d3-08dbdfdca7ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dMHsp3s+HoPVPw2EZbN2edDtvrtSP1qzdWLj6bjOrDToo8qagclXp8rwEW/rUN6uNyiYK4FQUMCd+M6pW/VVhs7HacklTrZWzpanaB8xnHHIrng3fAsQs6dyK942N4nfX7eJkNkOQSU8fAY3JQeBPtfwpsfcktU7feXvB2LqVIgXxlK6RvuOgeN1yhZZWxzOa/+0syL/+oSMmsEvETVSraH/98Rg/GZJYJrbf/ZldHUhkSWXoQdiK+UbdgyZ5MRfGWg0kq8PeoEiZDUajQpN/lhH2Ug2NJzxjsiw/AqQzN/+eeAe7xa2yesa8unUC0bQmAFc/jV2rH5dgNhw4A5BUriu+mSaHMhetRGTIfIlpq0kBMIo+0suQZaqP7LbMR42G6OR6HWBAiS+HsH7X5YMau/0hJkdc614waTePZYKlNEx6OGO7CwAZEQFGwhp/1mRVVGISStjipCc4FIjhWZVkDipW7mY28eqfafcg9mKDNsSGUnF0iPLN7ScEP2VHRfcvX4XKAnBCFtMiSAge4Uxf2MCqDNNHG2CfJiZZ6Echu1OOuMOunZHP4CGlMWiF0QV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bx9YM9m7pPPC2+G6Gy3FxhJ8+Bz8GFh6fR2m9BFg4F+QDU++anm9MQj3QWu4Ng0qZ2ZkbZf20fuPQIE3HTFtUohpkczcLnDXVFRUBYoyf+8SxvqlFupxrZm8srRLnjjUSax5psnEfjOh0226kxJ5wVOmhwS+jKSTfIXcNcMuHh0PIL27gTXXMHaMuX9BvJ9rX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vC1F1sOz/K4hVH90Q3x+1kATzaFvll94GfnYLb70O0p6nFNoaU4rOWFWmWfXqjzKWizpfd9EpEmO7IVQnc/rtjBdU2FLdv8kCg1bIM/aGeqwvBQUxXoT2dC91Nz26sAOMbjqcPzV2Iq1h6JJrnX/adLeVBKJ/jq5olt3bNdlQaEKzmEvbj37IpgzQr9+x5xUvWIkGhovF7pWBnf0JGP+LP41Kod32i60b05Z+PIE9nZNZs7aWRjGfRvfmQteEtu/U858tKH3E3gE5K4ezgJDayOzKLA54+INhd/3q0ol5wdA/pBJ14gpxEix7uY78LPIMCBLNm8ahWGHeqRRhTzImD7H30uNpDi7WFIHSHkH8I5BJ8OW4PZSrRuq74396edUJLno45mqoiBKqBxjKJw0iI2mMA7oe2XqwsrZ8pOdoKzQcXid7W/1r/mpk32pl2oCEuKnJIQ6sRRDmrpB/3Xp4Kk4eX2dQ/u/dn0Izg8LkRPMG0bm6JDfIM04qfindVcU4WPoKgS/yZdexwMN2PBdM2Ungih8XEMaQY3rbYQCb4y3SjujkItOfwDMg6iREBnDnx0jD2yFwUtkLAtLAjlwFLMxWGAgoxbTQc4e3JzkZugF8MMPLrp3kqT5n92YeojJNOWYdm5zPudDvlkyDlDn+RGrYErBgcPZ7PQuwr7AczG0ejSAx6PHgvVjyTlOR8vDJtpEJTVmHVvV1R2hUmUrfabQ5FJEbHjYWpprjQJsS4J/d517o4nA/xh+vV5xKOOkD3ocX937XyUFnIdh5erIaBkYvMov5fEzMMgLnmvuRw8pSKx3Bm+9lqnlrV8xDCzLEtpRkeJg3TbvJDU3NsMO0hu69N4e7P0j3c8mxo4waLZ5qQcmZLH7K0QaaS7K7dYglBTL1TABYVm6JDes4ZP9juRRnMl2zqeCA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 320f4a32-1e51-4f5f-98d3-08dbdfdca7ed X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:20.8165 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L3Y9KvHETsUeBduK9r18QeP0BNuCkUfu+AwspQ9vn31HQpeoFDbzmJomqZ7pW1w1i5KknBdA/24b3VL+R3AZ/quB1xZLMyOhPkGenpeon1E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=862 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: z1oN0H65vRw59VGfHUa9iBN_-9hL8IzC X-Proofpoint-ORIG-GUID: z1oN0H65vRw59VGfHUa9iBN_-9hL8IzC X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2AF5B14000F X-Stat-Signature: ai1atnrnta5stm3sitkik51x1beanid5 X-HE-Tag: 1699394328-497767 X-HE-Meta: U2FsdGVkX1+9lo6MGDK90Z9qc9Q+2h4H10To1oMTMQ42FYv/qb+Wrm9KgMU/HT29gNwR+0zlpmNwVQar6sYmE+x9Yx8kcJ3zk36YWjxYCaq67bSJqVH96W8vB4EPYUc9CS3EcySZ0x3T6H9ji9FKExupdSYbfDqwhonxA+ZdAeVhUoZiFjXq2lW4Z4e0ME4QMOtAB9RlLwdPsmF4wzmmQJf8cUI9j5X0e41R/wWTa7e42amkyA3CHJgOXevC+X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DYqhcVdG7gjDL90n1cbDFGEccAjIszQRjYtNr/T4A4SJJeLN2UY6RvXXQJtbvGIDQq9oTxP8LPddFFzchA+v1ATUfiljeshiNlvzxLIYC9kLJs+2m5ZikXDqNamV0UotLEH6A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 8a69fe0be143b0a1af829f85f0e9a1ae7d6a04db. Signed-off-by: Ankur Arora --- arch/x86/include/asm/preempt.h | 10 +++--- include/linux/entry-common.h | 2 -- kernel/sched/core.c | 59 +++++++++++++--------------------- 3 files changed, 26 insertions(+), 45 deletions(-) diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 2d13f25b1bd8..495faed1c76c 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -109,18 +109,16 @@ static __always_inline bool should_resched(int preempt_offset) extern asmlinkage void preempt_schedule(void); extern asmlinkage void preempt_schedule_thunk(void); -#define preempt_schedule_dynamic_enabled preempt_schedule_thunk -#define preempt_schedule_dynamic_disabled NULL +#define __preempt_schedule_func preempt_schedule_thunk extern asmlinkage void preempt_schedule_notrace(void); extern asmlinkage void preempt_schedule_notrace_thunk(void); -#define preempt_schedule_notrace_dynamic_enabled preempt_schedule_notrace_thunk -#define preempt_schedule_notrace_dynamic_disabled NULL +#define __preempt_schedule_notrace_func preempt_schedule_notrace_thunk #ifdef CONFIG_PREEMPT_DYNAMIC -DECLARE_STATIC_CALL(preempt_schedule, preempt_schedule_dynamic_enabled); +DECLARE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); #define __preempt_schedule() \ do { \ @@ -128,7 +126,7 @@ do { \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule) : ASM_CALL_CONSTRAINT); \ } while (0) -DECLARE_STATIC_CALL(preempt_schedule_notrace, preempt_schedule_notrace_dynamic_enabled); +DECLARE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); #define __preempt_schedule_notrace() \ do { \ diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 6567e99e079e..49e9fe9489b6 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -416,8 +416,6 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); */ void irqentry_exit_cond_resched(void); #ifdef CONFIG_PREEMPT_DYNAMIC -#define irqentry_exit_cond_resched_dynamic_enabled irqentry_exit_cond_resched -#define irqentry_exit_cond_resched_dynamic_disabled NULL DECLARE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched); #endif diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 686e89d4ebb7..2268d9e23635 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6892,11 +6892,7 @@ NOKPROBE_SYMBOL(preempt_schedule); EXPORT_SYMBOL(preempt_schedule); #ifdef CONFIG_PREEMPT_DYNAMIC -#ifndef preempt_schedule_dynamic_enabled -#define preempt_schedule_dynamic_enabled preempt_schedule -#define preempt_schedule_dynamic_disabled NULL -#endif -DEFINE_STATIC_CALL(preempt_schedule, preempt_schedule_dynamic_enabled); +DEFINE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); EXPORT_STATIC_CALL_TRAMP(preempt_schedule); #endif @@ -6954,11 +6950,7 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) EXPORT_SYMBOL_GPL(preempt_schedule_notrace); #ifdef CONFIG_PREEMPT_DYNAMIC -#ifndef preempt_schedule_notrace_dynamic_enabled -#define preempt_schedule_notrace_dynamic_enabled preempt_schedule_notrace -#define preempt_schedule_notrace_dynamic_disabled NULL -#endif -DEFINE_STATIC_CALL(preempt_schedule_notrace, preempt_schedule_notrace_dynamic_enabled); +DEFINE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); EXPORT_STATIC_CALL_TRAMP(preempt_schedule_notrace); #endif @@ -8561,13 +8553,9 @@ EXPORT_SYMBOL(__cond_resched); #endif #ifdef CONFIG_PREEMPT_DYNAMIC -#define cond_resched_dynamic_enabled __cond_resched -#define cond_resched_dynamic_disabled ((void *)&__static_call_return0) DEFINE_STATIC_CALL_RET0(cond_resched, __cond_resched); EXPORT_STATIC_CALL_TRAMP(cond_resched); -#define might_resched_dynamic_enabled __cond_resched -#define might_resched_dynamic_disabled ((void *)&__static_call_return0) DEFINE_STATIC_CALL_RET0(might_resched, __cond_resched); EXPORT_STATIC_CALL_TRAMP(might_resched); #endif @@ -8691,46 +8679,43 @@ int sched_dynamic_mode(const char *str) return -EINVAL; } -#define preempt_dynamic_enable(f) static_call_update(f, f##_dynamic_enabled) -#define preempt_dynamic_disable(f) static_call_update(f, f##_dynamic_disabled) - void sched_dynamic_update(int mode) { /* * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in * the ZERO state, which is invalid. */ - preempt_dynamic_enable(cond_resched); - preempt_dynamic_enable(might_resched); - preempt_dynamic_enable(preempt_schedule); - preempt_dynamic_enable(preempt_schedule_notrace); - preempt_dynamic_enable(irqentry_exit_cond_resched); + static_call_update(cond_resched, __cond_resched); + static_call_update(might_resched, __cond_resched); + static_call_update(preempt_schedule, __preempt_schedule_func); + static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); + static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); switch (mode) { case preempt_dynamic_none: - preempt_dynamic_enable(cond_resched); - preempt_dynamic_disable(might_resched); - preempt_dynamic_disable(preempt_schedule); - preempt_dynamic_disable(preempt_schedule_notrace); - preempt_dynamic_disable(irqentry_exit_cond_resched); + static_call_update(cond_resched, __cond_resched); + static_call_update(might_resched, (void *)&__static_call_return0); + static_call_update(preempt_schedule, NULL); + static_call_update(preempt_schedule_notrace, NULL); + static_call_update(irqentry_exit_cond_resched, NULL); pr_info("Dynamic Preempt: none\n"); break; case preempt_dynamic_voluntary: - preempt_dynamic_enable(cond_resched); - preempt_dynamic_enable(might_resched); - preempt_dynamic_disable(preempt_schedule); - preempt_dynamic_disable(preempt_schedule_notrace); - preempt_dynamic_disable(irqentry_exit_cond_resched); + static_call_update(cond_resched, __cond_resched); + static_call_update(might_resched, __cond_resched); + static_call_update(preempt_schedule, NULL); + static_call_update(preempt_schedule_notrace, NULL); + static_call_update(irqentry_exit_cond_resched, NULL); pr_info("Dynamic Preempt: voluntary\n"); break; case preempt_dynamic_full: - preempt_dynamic_disable(cond_resched); - preempt_dynamic_disable(might_resched); - preempt_dynamic_enable(preempt_schedule); - preempt_dynamic_enable(preempt_schedule_notrace); - preempt_dynamic_enable(irqentry_exit_cond_resched); + static_call_update(cond_resched, (void *)&__static_call_return0); + static_call_update(might_resched, (void *)&__static_call_return0); + static_call_update(preempt_schedule, __preempt_schedule_func); + static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); + static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); pr_info("Dynamic Preempt: full\n"); break; } From patchwork Tue Nov 7 21:56:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AC3FC4332F for ; Tue, 7 Nov 2023 23:39:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B76BF4401B7; Tue, 7 Nov 2023 18:39:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B268644017B; Tue, 7 Nov 2023 18:39:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 951F74401B7; Tue, 7 Nov 2023 18:39:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7F83C44017B for ; Tue, 7 Nov 2023 18:39:14 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5302380BE2 for ; Tue, 7 Nov 2023 23:39:14 +0000 (UTC) X-FDA: 81432776628.17.5A3D946 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf08.hostedemail.com (Postfix) with ESMTP id DD3A1160013 for ; Tue, 7 Nov 2023 23:39:10 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=AqYwNjap; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tXkXiv4+; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf08.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699400351; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=L0Mjat5vRnelUd0kb9wZr4KmZFbXuFTujcTfmbGjq5A=; b=ddzlfW+XnFmyDcvMv2Eo+swDidqxnKdLizyy5MKPluK7Hhg2SHpIVT/frBK+jdeUVXhOxu JRg3WJwJzGtsYoz4q35tFbiY/Z9RBleJH7c7EOW8hMFb0HI43yS5BQGFGvqGr2KjLppE+/ QG6Mnfj4L+/4Ge4VQqZc6MEMnJLrkIU= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=AqYwNjap; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tXkXiv4+; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf08.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699400351; a=rsa-sha256; cv=pass; b=qaUdEQ4cndRwIrcChb66DIHMaveD7p6uv8KSK4ip8RKy/ikIbC10hAElbOYdv9VILENvKA bpt8nkGoCZejkNlnANmRD+Ue4XyBqCV/FI8WaT2X6mHsDLohtEclHpRgf8gBGRYtxSDFhN oEDbaA+6OtBZcrZA6JsQV2NJZIcXdIM= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJjVx014999; Tue, 7 Nov 2023 21:58:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=L0Mjat5vRnelUd0kb9wZr4KmZFbXuFTujcTfmbGjq5A=; b=AqYwNjapBnx+iwsCNfMlqy+8tLtmkIe8tS+77Ng+HvzbGy3IjJj0fu5ba9t65ikGzRi1 ExunaT9wnMk6OQc+jlWkSuo/dRUofV4RqlO9IfZuygZh+LducbhMGrx79CmFCs2xyIU1 VnFYS5k5BS2mqmRD0zYL5ZE9JaXuN09XBR6W3ePm3W3pedr/ah4fCUndg7fmFr3dcr3i 7D4ahCxauMQ3Hygsg+nsicpdF4TD8hoawgBSHurOZzkA1GnIxMbRls2VD7kChQxRQBRv qkL2guMhpb6DiBbxYt6q9/xy7DctmKPO5RAhCt3zr1UsMcHewAABnz1Ztl+jLN4hahAJ mg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2c4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:25 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LItT6000430; Tue, 7 Nov 2023 21:58:24 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsjve-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O+ktIALRarGJbg0YLRLH/OGMNfTd5yCM/q+bkUGKKdpz3jF7qoSLUqsGVhXXijdRHv42WHA/f8wWL2vh/VhKyNttF+Kg5FnFDK0xO90jVoXVEX0Qv5is6GOYa82wxuHzSEHp0AWDlQAc47h8nJPHJeWPwPD7PxuPgW3fHUMzlzlK2AJBt5K+6JPNj/GXl7ZB6UH4H8Y/2Z9JLg8zmo/gnPIriyjWmkSP0ddWDZarQTXL98ygqdT+6dOtmNduG9GdLKOYVjKfDJSlnAgPbX4D/VnVj1KRjBMyOE8zntWh3Mk7tRpu9/y5yKXi7WTHB0Sc7M9M9jywulS4Ec/lfQ390Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=L0Mjat5vRnelUd0kb9wZr4KmZFbXuFTujcTfmbGjq5A=; b=iB2/B4lKEhjoRC6srivv/zpkpWieuUp1nslRNkJNXk5qT5bvADqVNe3j9I3zeuCcHlTWRhAvAmRQHfg7WSk7B8MS4C4wYrzQ4rd8+5Tmp5BRmvL6RKGcG7B+Jvm/+djMMndjP85CCn170U4tCHHsJEIuCO/wH0Twu4Lv/Vt56/N71AD0KpTjUfYTbFYO9KqrwtBWMa2YsflhOJTgMRDUHMSh0VCUHBrk75zwKzQwAc4cuwM864gb9bstEzbMKkmSydVNFwLrxWcIMTkx1EaoDNgn11SUgk7e6wUT2fAtX8GBEe5SZVi1Xw+l/UKdPhwXw6gSi/aV0DIU1I/pkkMh3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L0Mjat5vRnelUd0kb9wZr4KmZFbXuFTujcTfmbGjq5A=; b=tXkXiv4+ZyENhZZrnQOW3lHbc0NBvpN/popHzU53RSagr3jCvL/0ikCE8kZv+LrQn1Uy5l+FHgD9gNa9F+t83bS9b6xRG03ob8TsrGckByC9AiKelfaQadfi9mzl2bdHj8lXvGfFg1mDrWjKPn7LBpxK82ZAkbdwoj1LJtbaKhw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:22 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:22 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 13/86] Revert "sched/preempt: Move PREEMPT_DYNAMIC logic later" Date: Tue, 7 Nov 2023 13:56:59 -0800 Message-Id: <20231107215742.363031-14-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0154.namprd03.prod.outlook.com (2603:10b6:303:8d::9) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 29b21837-f81e-4f11-9114-08dbdfdca904 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dIcg6s7UwAU0ygsMBEvM/wkZwydQpU3On/0LlaJh548RaHXo5kq/wCoJcFZxS1jmci4KLvGNLFz5cBBeCRHe6/3VnCwzJT0j+izVg6Og9HZ2+1JiFfrNsnGnBJc5r5SiPTPbjdnriWxgMdY8AOS5QlbeaSLGDSRD68cdY0ukzPqYrsnREIdp8lXQ9OMJZVD9/MoiKVbET6zybn4GArrWdyvRHIC95oe0hJh7fO3wEDlAKzk1Yw330IxWdrW4hCyltMpjIgFSqmsexLoEPkdY06vFK5ilSCzRhWaAtTBvpT2HWgCGjiEJfdZgdC28AbaxwLBCJP5Ul3EreYQKInxqHJ1Ur/4QE8/xS8+BGhkF1SNNTP5D5niZyQzYQkBNnseD9c6sTrK/McD87QVxpIfG5sPxmbRnay1ETSowf1KV2FsYoZuiyVUpfzTJ23KOrr5XviFSnzsglMJKxDA0zY1wZ0A588vKJLMlOupGWHjJZMMrPzlmPSxxeGMnB2cWfu+g5cOsx5es2/X5e7P+Uz5ETkRjT3bszuxtGj4hf9s3+npIBDEP25nUf39RdlRYeIcy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6eZQPH0rEo0uYgzsUWFTSZqRiehH839v9osJE8fzD6AaB2WSC/4o2/Wt+NsVvRUb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21837-f81e-4f11-9114-08dbdfdca904 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:22.6361 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iYdqJLWXDXSRgBAzeqKHTsSYdy+39NMqkm7BY7u4PmFlBlKeOlR5/mWMgGyiZVQkYgDi6k1TTY+ep5UqYLXPVBexKDuaosHVhbdNgLgbA5w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: q9W8fxkBWK4Q7nBCVHIzibgcUBRSfdnu X-Proofpoint-ORIG-GUID: q9W8fxkBWK4Q7nBCVHIzibgcUBRSfdnu X-Rspamd-Queue-Id: DD3A1160013 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 9rzn1c4983hmysh6fgktu95waxpkm74b X-HE-Tag: 1699400350-21737 X-HE-Meta: U2FsdGVkX19eSqtR+Z09KGCrd8MRCOZpeEnN8BII34uEtBkRUl956EBL5phHf3u+ZTRvxXiJ5kMTVo3bR/2TPGW2wF8xm0bmY86C7YJ657uNi756OVmgtnBYQXuX5o1plWucOV4HHDmODVaPi/DnXST/qLmTJc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bhauI7Pypuugk3Kql4ePowV5cFtU5wJLjSDrPtbSdamYSZbOlw43ERkcySGDMsLmcSMwlHmBnOqWDjJt2kP7Lqj2QXm/fnMHaUXSzN8UlP/f2CRhp0zqXcae2lhPXXepVnKCNgRcsWky1J6d+6V7if/TbBkppPRlGGnqE7tXiEP/IffX0B+uy82X3I6ujiVK1I4C8uEdie00= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 4c7485584d48f60b1e742c7c6a3a1fa503d48d97. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 272 ++++++++++++++++++++++---------------------- 1 file changed, 136 insertions(+), 136 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2268d9e23635..f8bbddd729db 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6956,6 +6956,142 @@ EXPORT_STATIC_CALL_TRAMP(preempt_schedule_notrace); #endif /* CONFIG_PREEMPTION */ +#ifdef CONFIG_PREEMPT_DYNAMIC + +#include + +/* + * SC:cond_resched + * SC:might_resched + * SC:preempt_schedule + * SC:preempt_schedule_notrace + * SC:irqentry_exit_cond_resched + * + * + * NONE: + * cond_resched <- __cond_resched + * might_resched <- RET0 + * preempt_schedule <- NOP + * preempt_schedule_notrace <- NOP + * irqentry_exit_cond_resched <- NOP + * + * VOLUNTARY: + * cond_resched <- __cond_resched + * might_resched <- __cond_resched + * preempt_schedule <- NOP + * preempt_schedule_notrace <- NOP + * irqentry_exit_cond_resched <- NOP + * + * FULL: + * cond_resched <- RET0 + * might_resched <- RET0 + * preempt_schedule <- preempt_schedule + * preempt_schedule_notrace <- preempt_schedule_notrace + * irqentry_exit_cond_resched <- irqentry_exit_cond_resched + */ + +enum { + preempt_dynamic_undefined = -1, + preempt_dynamic_none, + preempt_dynamic_voluntary, + preempt_dynamic_full, +}; + +int preempt_dynamic_mode = preempt_dynamic_undefined; + +int sched_dynamic_mode(const char *str) +{ + if (!strcmp(str, "none")) + return preempt_dynamic_none; + + if (!strcmp(str, "voluntary")) + return preempt_dynamic_voluntary; + + if (!strcmp(str, "full")) + return preempt_dynamic_full; + + return -EINVAL; +} + +void sched_dynamic_update(int mode) +{ + /* + * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in + * the ZERO state, which is invalid. + */ + static_call_update(cond_resched, __cond_resched); + static_call_update(might_resched, __cond_resched); + static_call_update(preempt_schedule, __preempt_schedule_func); + static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); + static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); + + switch (mode) { + case preempt_dynamic_none: + static_call_update(cond_resched, __cond_resched); + static_call_update(might_resched, (void *)&__static_call_return0); + static_call_update(preempt_schedule, NULL); + static_call_update(preempt_schedule_notrace, NULL); + static_call_update(irqentry_exit_cond_resched, NULL); + pr_info("Dynamic Preempt: none\n"); + break; + + case preempt_dynamic_voluntary: + static_call_update(cond_resched, __cond_resched); + static_call_update(might_resched, __cond_resched); + static_call_update(preempt_schedule, NULL); + static_call_update(preempt_schedule_notrace, NULL); + static_call_update(irqentry_exit_cond_resched, NULL); + pr_info("Dynamic Preempt: voluntary\n"); + break; + + case preempt_dynamic_full: + static_call_update(cond_resched, (void *)&__static_call_return0); + static_call_update(might_resched, (void *)&__static_call_return0); + static_call_update(preempt_schedule, __preempt_schedule_func); + static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); + static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); + pr_info("Dynamic Preempt: full\n"); + break; + } + + preempt_dynamic_mode = mode; +} + +static int __init setup_preempt_mode(char *str) +{ + int mode = sched_dynamic_mode(str); + if (mode < 0) { + pr_warn("Dynamic Preempt: unsupported mode: %s\n", str); + return 0; + } + + sched_dynamic_update(mode); + return 1; +} +__setup("preempt=", setup_preempt_mode); + +static void __init preempt_dynamic_init(void) +{ + if (preempt_dynamic_mode == preempt_dynamic_undefined) { + if (IS_ENABLED(CONFIG_PREEMPT_NONE)) { + sched_dynamic_update(preempt_dynamic_none); + } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY)) { + sched_dynamic_update(preempt_dynamic_voluntary); + } else { + /* Default static call setting, nothing to do */ + WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT)); + preempt_dynamic_mode = preempt_dynamic_full; + pr_info("Dynamic Preempt: full\n"); + } + } +} + +#else /* !CONFIG_PREEMPT_DYNAMIC */ + +static inline void preempt_dynamic_init(void) { } + +#endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ + /* * This is the entry point to schedule() from kernel preemption * off of irq context. @@ -8622,142 +8758,6 @@ int __cond_resched_rwlock_write(rwlock_t *lock) } EXPORT_SYMBOL(__cond_resched_rwlock_write); -#ifdef CONFIG_PREEMPT_DYNAMIC - -#include - -/* - * SC:cond_resched - * SC:might_resched - * SC:preempt_schedule - * SC:preempt_schedule_notrace - * SC:irqentry_exit_cond_resched - * - * - * NONE: - * cond_resched <- __cond_resched - * might_resched <- RET0 - * preempt_schedule <- NOP - * preempt_schedule_notrace <- NOP - * irqentry_exit_cond_resched <- NOP - * - * VOLUNTARY: - * cond_resched <- __cond_resched - * might_resched <- __cond_resched - * preempt_schedule <- NOP - * preempt_schedule_notrace <- NOP - * irqentry_exit_cond_resched <- NOP - * - * FULL: - * cond_resched <- RET0 - * might_resched <- RET0 - * preempt_schedule <- preempt_schedule - * preempt_schedule_notrace <- preempt_schedule_notrace - * irqentry_exit_cond_resched <- irqentry_exit_cond_resched - */ - -enum { - preempt_dynamic_undefined = -1, - preempt_dynamic_none, - preempt_dynamic_voluntary, - preempt_dynamic_full, -}; - -int preempt_dynamic_mode = preempt_dynamic_undefined; - -int sched_dynamic_mode(const char *str) -{ - if (!strcmp(str, "none")) - return preempt_dynamic_none; - - if (!strcmp(str, "voluntary")) - return preempt_dynamic_voluntary; - - if (!strcmp(str, "full")) - return preempt_dynamic_full; - - return -EINVAL; -} - -void sched_dynamic_update(int mode) -{ - /* - * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in - * the ZERO state, which is invalid. - */ - static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, __cond_resched); - static_call_update(preempt_schedule, __preempt_schedule_func); - static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); - static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); - - switch (mode) { - case preempt_dynamic_none: - static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, (void *)&__static_call_return0); - static_call_update(preempt_schedule, NULL); - static_call_update(preempt_schedule_notrace, NULL); - static_call_update(irqentry_exit_cond_resched, NULL); - pr_info("Dynamic Preempt: none\n"); - break; - - case preempt_dynamic_voluntary: - static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, __cond_resched); - static_call_update(preempt_schedule, NULL); - static_call_update(preempt_schedule_notrace, NULL); - static_call_update(irqentry_exit_cond_resched, NULL); - pr_info("Dynamic Preempt: voluntary\n"); - break; - - case preempt_dynamic_full: - static_call_update(cond_resched, (void *)&__static_call_return0); - static_call_update(might_resched, (void *)&__static_call_return0); - static_call_update(preempt_schedule, __preempt_schedule_func); - static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); - static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); - pr_info("Dynamic Preempt: full\n"); - break; - } - - preempt_dynamic_mode = mode; -} - -static int __init setup_preempt_mode(char *str) -{ - int mode = sched_dynamic_mode(str); - if (mode < 0) { - pr_warn("Dynamic Preempt: unsupported mode: %s\n", str); - return 0; - } - - sched_dynamic_update(mode); - return 1; -} -__setup("preempt=", setup_preempt_mode); - -static void __init preempt_dynamic_init(void) -{ - if (preempt_dynamic_mode == preempt_dynamic_undefined) { - if (IS_ENABLED(CONFIG_PREEMPT_NONE)) { - sched_dynamic_update(preempt_dynamic_none); - } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY)) { - sched_dynamic_update(preempt_dynamic_voluntary); - } else { - /* Default static call setting, nothing to do */ - WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT)); - preempt_dynamic_mode = preempt_dynamic_full; - pr_info("Dynamic Preempt: full\n"); - } - } -} - -#else /* !CONFIG_PREEMPT_DYNAMIC */ - -static inline void preempt_dynamic_init(void) { } - -#endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ - /** * yield - yield the current processor to other threads. * From patchwork Tue Nov 7 21:57:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEC5DC4167D for ; Tue, 7 Nov 2023 21:59:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8C8698D0069; Tue, 7 Nov 2023 16:58:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A1978D0066; Tue, 7 Nov 2023 16:58:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67E338D0069; Tue, 7 Nov 2023 16:58:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 59E748D0066 for ; Tue, 7 Nov 2023 16:58:56 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 3A9E01CB818 for ; Tue, 7 Nov 2023 21:58:56 +0000 (UTC) X-FDA: 81432523872.03.D7C37CF Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf24.hostedemail.com (Postfix) with ESMTP id C15D5180014 for ; Tue, 7 Nov 2023 21:58:52 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=QYkWYwP3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qszcH+Hq; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394332; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=VmP+ZWs+YonczYedN3nVn9It2wcp8EZ7uEC8aRAf/IE=; b=tEvLRP2YAxe7Uq0ZyHrXyum0NxX8nHlLN8WM2wV6euoQdxEyQVSN1kvd3BKR84BrbTLBcp CVKvyXegbBiY96MWbTh2L0/VVg2egyf5wypk1YVyfOqQRSJMy+leqOPP/XsYJBuGPCeKu1 bN+XrDsiugzIjTg8ueFhGJaMwuuM9sE= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=QYkWYwP3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qszcH+Hq; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394332; a=rsa-sha256; cv=pass; b=8X6AEHeuSvYvQBLdOpnYrmhSZ44kzhbUmpMcTTqlAEe9p3GS87yY9b/dnKHTs1dbGspRjS 14hGzWIx0dyQLBFYA+4nskApgqTJE2g4+pAMxiaS0qJCFej2udEwz/YEmYI7GxHImymyEj 5C4LMGphQTXCjDOBoHmNiGFLzQgo4bQ= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJoBc000910; Tue, 7 Nov 2023 21:58:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=VmP+ZWs+YonczYedN3nVn9It2wcp8EZ7uEC8aRAf/IE=; b=QYkWYwP3sr0bdXStKqMP0FazAJu8gR5NkebLt9m3kjJwwWMOxfk9AyA4hNITWF0joS78 30eEEXZ8b0Lnina7yCMYZUtHC0b3ROPgEprER8gbmVvmo25GSWuw0pglwzPr9wOXxvI7 +ehX1w+XsDzpd/Bj83t+QgvnDt251TxyTrvl1YcYXSgieGe0j3a+AtxDvG24rthUExmp ve0H1KVVGI0HZzg6oJuTw/GnOFIikD6h8LSCeVQJUwcDPmYM5Bv8pgtGIJyu4s8EIFeD xH46J9sdwn0y738nyF60cY/WyFGpKygZz7jDXDsi1Hbp8pjaQJWDoSVjwEzJC+Bx+aE0 eA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2as-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:28 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPRq023854; Tue, 7 Nov 2023 21:58:26 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241f6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKBdrk2K6FEczQ2InT0jEI8bBHFF+T/0MkPbe3TzzDDIJgo+312qtNJoVIbyCEljzIcwhbua4v8of29nCljGHGldwPeT+bkWF4Cr06LaZOxOseLj3Zj01/Hu3CRmNmIBTDupAYVn4JlegW0Z03nbKH3DxB1iZhOk1YvsoR4o5sVNw+7y/WIOCXEhHeCLvtT6hftTJhug1bR/4tIdwNCh7g1d+6xRk2/B23yZXofMBCQajl5/ZxsHwO3btee4/RKr6Hs0oEnQUPT8jDKimmtkTN2bHCE5eSuJ4bUQULiFGQm0FNTvMbgnMcKEZwKb3d1D+sCBm5G30Aek3v4s2u4itQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=VmP+ZWs+YonczYedN3nVn9It2wcp8EZ7uEC8aRAf/IE=; b=N1ZjqLfwuyz4g7Q4ZgscsxNnwAUTr7eGHhgYJdMXSdrVbXIzeEHYOb7k8hwp/FL994xe2jDR9VwN2W25LfZxcevrn8uo8qisHj1viugIvYkF2wHU2nipxHEGierhh8TQW+3afLZLzysZnepTAV2CGfQjZGBqm8zyxknrLdJGit539Rb0ETE+FlboIeR8PIE5Ka8053VRCW4FA/8lWTnAPlA9wSKJU9fO4OTOWaTLyuYYn9tUwyv2iiVgaZiU6g6AmMTeO4kI3FxbawOa6CRHgznH51yAIuCeUJhj1Eq5wBh1rRDTVHjFPGQDFKCmgjLKk7v5cXUH+tyxmYx1oEcD4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VmP+ZWs+YonczYedN3nVn9It2wcp8EZ7uEC8aRAf/IE=; b=qszcH+Hq5Qj6WwlyOy6Q2/hspFV0uNQxbhKc+d06hRCDr90JkXWkC61u0nbkWZGU4Gd0ie23b8mPI/jDMT+/1UIhDWGSZCWRQQP7YenHfPBWoAmJVZlOrOMYbY4Ex3mcWStpVvXyAlGBpu+Ezk44mBgESSo+1/gbdd3M6tSNcWk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:24 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:24 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 14/86] Revert "preempt/dynamic: Fix setup_preempt_mode() return value" Date: Tue, 7 Nov 2023 13:57:00 -0800 Message-Id: <20231107215742.363031-15-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0370.namprd04.prod.outlook.com (2603:10b6:303:81::15) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 35e612ba-f21a-4375-9bca-08dbdfdcaa4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PFmT2rSQal8IW+hUXgGIqtSI6riFlY0Qt5hGEM2KqvM7qtGHcwipu6PPezpycqyzeVaOqNeOZ9uPwse/czp979ennxZqCCHPPrw7fIPiuXwnRrlrUQR9dGtsDO5y0VpgXNmWY0laiwDOYG2NyHOR6iGE/wqZ9OWbypQ+tMX0rXvrQNaNkO4874/pOyrpZQgy1+CAdTFQ/g5pChY71hMa6VsUZcH7BX35l1u7A6BEiVuDdTcgn//Ydemvfx4HUsBtuvnCbHL68tPCTbvpADsO/RoCLppLG1eTAU+yJhJhY5wiX9EXL982kPAN5q2cpeBx8Aj9FpUoaQZOjgf4pBTwjUlfT1uskYGQXT/iqG9l0MQAB0zcBnJTxLTzzr8ubrhdGcFySGSSn1XuPTcXLanL3zdz39o91o1rKFU3IfBWGXJB9wXwrVk6ndWpriVARsbnUnJadrHm0wHukj2CI2Ril6IHGQjTAvFZteZwPPjGKXz/kQ/kNFEHFNY93WJt/RPCRR2saswC7xCVHl8GnKPoYx6bomOyx/RNcR2jCCrGgo4zM+XgJ3+PXWDV838je6zI X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(4744005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m9naqQ7Au/7KYWjJdG+Sl4A/X3h1KAKyrQz6UC1r6b9Ch12a+xOYTLXQ1sseKJ5Evrw5YHvDoRVaWfVdIw9DQlK9/rSO3qyXIhp1SVnzMgLR9mucESZ4bicmcIcAjTh9TB3yet/tBsGklhJmOaYhoFcpH+pX4dUfbjE5ms0O6h3+USbXDMI+IbR5dQJPvq+zht5QQLdhMX4dWT15hh/NRt+XSr/ZM7TY0+BCq8mxsWD+I6FP7v1ORiS8xXdNPiUUnJoDwLXKdXS0o1XRJaD6zBv4K5InF/j238eT93HQ9RIV1ih1vR6OG91hcWAGHHrymWrCP1Tyn73Rf27XmxMOlvbHEezgCR+C72OFuXNUN8b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7SifyYlBrie14CTr61SZFhA/Ur4TMXCX1A1WCkFWhYK0tT1UaT4uL9HvZJcVhLzSBKTpWJuH7W4wH8tGBpOgoTWPvU+zqWLCadBhNvkmXMQe2GUl1wO68243P7o66MP3b0xDv/QvdgnPoM2ZOvgY38xnkSoAcYNgNlkkhmvlHIW5AHl+P2qJM45XeLDXpql5VYmSK+nAEaf0WISGhIN5jvvBL+f1wGap4cxehKqJUHBQeOY+l/11FCiKXJlCdXKqK9oYIvuZjmr6fYaO1Lo/Q4hADfKVctRswmWVczwK60mOaVr+RNJBWksIlwBfUPRvcTJ4/gbtOUJnmKfzwVpSU7AZZKEiExuPJb9/JnMI1cpjEcEzTGcJg6za78zLd11N0Yxt+XHBCl1ERHr8eq4khIb1zE0XLhwpedxkEBY41y35TGiuS1Dow834kjSeUtP20co5AbYSF/COcdWQbTrtK7q+EIzBb0omo3QzAKbzDzfWZXfLCrRvHNN9Wy2j6/G/GVrLl3/DQl9ztF1t0DmbuBj5n8oh/RzVGRWnlSCSnAHhFIDlaTa648Bm/v7SrcoQp9Y1TyEjDXunSLxx4m81EHQ0hKX3H/eVcAOzhFjveyc9of/gMJaDsYDy1aXPxWTulZtcjZsuGWcGnQzgsCMiQGYCkXJDZ5tGDcw+66OK6r2NQR6kXzgcH3WKvan/l+oLIT+XLONArGlLuFoctXulTl7xrMUuQdbFZk+ZVPK+479PpxHH/tQOyg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35e612ba-f21a-4375-9bca-08dbdfdcaa4d X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:24.7484 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SFPpV2hG2X/Wg4ImLZjqCQ3UdygvEPE+reIxZe29utAU1tlXGAy3vxgmM94L/MiDzvwUIYPNH7ve9MDgbnfAcmAdJLy3zRedU/DLV0zaCXk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=955 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: 3ITykoKS-g5GdNFIEjQEJ328xqm7QPj5 X-Proofpoint-GUID: 3ITykoKS-g5GdNFIEjQEJ328xqm7QPj5 X-Rspam-User: X-Stat-Signature: tnoizth91rb4yibcfke1a43b3b8dyas4 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C15D5180014 X-HE-Tag: 1699394332-787448 X-HE-Meta: U2FsdGVkX18wsvBh3ju5Eu7Ltw7oKuESLpX16Q0gYvKdSwpfijl/pooxrPYE2dSCXgl7tizidQ2Nbh1OKrZ7/cNofRSdtWFY5IQLlExJRBf1cm23DZUVPQRWMItUI/XfOU3Ks8X6sg/LdrwxFY9mHL1p5QIAxDq/UlO6B7jeqZXkeS0t4nhax2X7rStPfwgA1DMvnkIktBdoc8HeF0NABxRM81LAzBfztJ2PfclpQOzNl0EKyI4icqXG/2I1DHjdvS6jNrAjRxJv011jEefx9tdB+ErWjCNfLa0G9gTytWYXoVfeFjyhI0/Bca8u/I4sVhEywfI6xgDXHtDNS63vcgXi5kfPYbp8ZBZjfYTkbBSfXGQcHDQmgXtJvCQn5STN8OaPNgo3gsN9KbJ9brvIZD5EsNCjX4RieuK2At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4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 9ed20bafc85806ca6c97c9128cec46c3ef80ae86. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f8bbddd729db..50e1133cacc9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7062,11 +7062,11 @@ static int __init setup_preempt_mode(char *str) int mode = sched_dynamic_mode(str); if (mode < 0) { pr_warn("Dynamic Preempt: unsupported mode: %s\n", str); - return 0; + return 1; } sched_dynamic_update(mode); - return 1; + return 0; } __setup("preempt=", setup_preempt_mode); From patchwork Tue Nov 7 21:57:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB02BC4332F for ; Tue, 7 Nov 2023 21:59:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8313F8D006A; Tue, 7 Nov 2023 16:59:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B75D8D0066; Tue, 7 Nov 2023 16:59:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56CEC8D006A; Tue, 7 Nov 2023 16:59:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 41E9D8D0066 for ; Tue, 7 Nov 2023 16:59:03 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 17C6C40B41 for ; Tue, 7 Nov 2023 21:59:03 +0000 (UTC) X-FDA: 81432524166.15.C0A4650 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf24.hostedemail.com (Postfix) with ESMTP id B928618000E for ; Tue, 7 Nov 2023 21:58:59 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ZDOclOr4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=yVbV1gaO; spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394339; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BBDmbv6t4bIOhWhjzk0+j/+zRLSLKl8O3zxrtXMpl2w=; b=UzAgvG/AjSMyCaAhWAQy3wG2KMFhXqddjcLqGtryVPNjbExVc4Qc0JlrZUraUhuj2qoj2C qC4xRtXeebgNqCaWbSknDP0ZwxLZPCC2/s2B0Yc3jxc/+sm0DG+jmONC0tKyrRs0pIV4v1 3IXaC6fhBldjG1YAON4Ai3SDD0P1yQg= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ZDOclOr4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=yVbV1gaO; spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394339; a=rsa-sha256; cv=pass; b=hrD/7C/uelhugVQj/wwuMeRLhw+6Wvg63tzIFeGkkmHTLAozGEc8PmrfHnRdrw0PbtWhKw IRQAnJ+85yo01JfseO6GUxJg9dR5+WuJWwdP+v9/xQ9ZxYDXm2KD87gQOyUHxeJ3L7uBMv yX8glAH5bRiit3LPAH2bX/MCMsqB6sY= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJxhu005003; Tue, 7 Nov 2023 21:58:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=BBDmbv6t4bIOhWhjzk0+j/+zRLSLKl8O3zxrtXMpl2w=; b=ZDOclOr4G2PrWZ6+HxqGb70r5MHoymMHcmX8wHc47Iv+SvpKiHBEfsBU861rFb0zfxDm Bp0F3eT3rce7qGohEpobkd0vN0zj6JVe/kjKaIZKwWGNLxGFCdNA08jBv9w0RmeLDHxU 7buWOMYaHYjuJ49HnN1ULyqitNAw95MPsqq2dnaT1+GzRMqQQywaFjjcL12XPhIP/tn6 +5v5rucYVDi9IgVOt/HlQ0KgNCOLOQEiB2RYdC1V8fZo+plehErRUm8TkD5XzQNbPJdo 21XDwC+k4HWJHvmJsneisc/GMWv35oTJzNQsus2vzKPKt+FUzPTe5KYbGyGkyZaPAO5c ZQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g2ka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:38 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgcS011085; Tue, 7 Nov 2023 21:58:37 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tshe4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DYTitQ4jqh/i5JJX0EPXgQ0BT6LWg9OOutFla5ja7+Vcy1m048wtu0wt6wdfUWwWrLNS3CQQg1EFACpNRi5JKi9R5TVf4Jx3YUAKJ0rX2Gd1fG8xdGfIQpiUYmDo1Idx8DRg8Ha7UpPI017N/ptHCWelPMjfVkcS4VC8srj0Dv39nYs8xpllfTSog2yGDs8mKKCSNEkZPifq1Ia5rhO9LCZedRNccfN9xOdguDykpz7iile4khqJ+TsV/Js03jxDQmfMKBsC6vkV2T2+wAE8oNLAZMahKs4k9dYj9k6WTrvr7MGqq9uz5CYD1k6R9hZm0Z3B1u4sP83GNI6k0qMYgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BBDmbv6t4bIOhWhjzk0+j/+zRLSLKl8O3zxrtXMpl2w=; b=bTLMMds55AaXrlK1fC7aeAZFWiqK2iR3rBonf3NgKQY5AlMZOnuFrKeAXNDEUqIAYApqvuO5hbYmXlxMMIkQ3WlOPofJ2KbOq1Pq+e7Gc6PhWDeyNg3KdM4yJU7mpQhlznuzDnDKCfl2NPOZpv4+z48qoHso0uIGe2S6famRYGnqOqEd5MSjYLeXf131EjKu8+i8oB4wEEy1sY/5pioO2y6wDRd9NLdN+3VtWkk4SLiKD5CWXE7scGA7hhoCWobUYxh0VvZq52dL2iQ6CaXXB/MACqCLGJSaWrkgrFM65bsh8oXmwOFDk4sCUWcOgEG/J5kzzkdiFgOKd5AGiigspQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BBDmbv6t4bIOhWhjzk0+j/+zRLSLKl8O3zxrtXMpl2w=; b=yVbV1gaOJmgux4lmQf9yMhbmLpOWWj/o5q1CVvjFjKoB1rPmt08jQpFwwibKT1Yk8VUepsNB8+TPrKOuGxE+JjCopafimCqvXO8cQyYJAx6rEANA8wBaJf1Tr+ohNKURGaBd2FvWlEAURxN8zu1YvIvH6pQr65jGFmklvqKq0pM= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:29 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:29 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 15/86] Revert "preempt: Restore preemption model selection configs" Date: Tue, 7 Nov 2023 13:57:01 -0800 Message-Id: <20231107215742.363031-16-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0031.namprd04.prod.outlook.com (2603:10b6:303:6a::6) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: f01641a2-ede1-46cb-e880-08dbdfdcad56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kCgrjoYkbWxj3GPOynMkL+z5Yh/VD3qrQqGM6KzOI/1GSsUv8ywVISCHEf4Ie7ChOOkI4Fn3bOFJ/4H3B5Fy5CpfsbqGK6F93/cNYxhOJgfZCQqddhW3IC7tsntvUuy/RkxSEQM7yP9oFp2UAPqVJXer4Yq1KXE5StDrpzVZo9Uc7m/KjZZclzM97OR1l6bUH4UvGp7ktjhxlo2SPXx1IAb+3PA1VYWO3K8erHdnMIrPHCfx8Zw3UjYP6GcIuPbvr6mCTZ8fo592+NBG7lJufL4khuRYqZIk+5eKHu9dn50e/fGS43UdP2ehGKNIL/8v8SqirP2gMR3PZVM6qFO34kcw0K/ldmw3SSzMzTXsODdqcKja7c8POH3aR35HHh4fvFei40wNE8RlO21/7UrCaUYlKmApXt0UT3vImzZAIHepY6Stm8LgUgzNVZDlpMWAzuPypsjNlDAmi4d2wmLDM5h24AA9axNDJiT3j/kBbRNDh8c4wr34D/eb1ZH+6MqoUBGR8YDI9B3iMe1t2NVljilxtYnuNdKc7VA+Hn1T7qX3DK6G9WrDbdsEd3xXEMgf X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: psFjpO4w1m1a/bNaO2laBdNnimFtNZgoOw/MaX3BJIgM1BJ+ZRl2YFu32/M5N4dJI30U53bYA2uvL6VgF/+4Jsm3FohKcSk3ns4He58KNTXlHBEhFZTXuGAlcrlaIhgH85fHoRoNPFyTYca9jYOb49mMP4JUGJu+0Kb4rg7w3NSMrfvwVxfKQ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LXzCdhu257eE8vhmAhYmiEFIrvxTUQr40N7i2cbSbzh3+gtQhLaQkhZFPrZFgH10jwvzjmxBEQVSG9DlY544BGbUQOpMT2EVmMt+/BLbLu6qiPV0YRrp3XdMomM80tICJnKQNh6Z/DtcJAAKGmkH6QWNPeoK2P8ZqV96cx1XkXfOhaiasiUQS188aIVBkQmnRW/FhWxi7/IN9f7ZuTcIqkmCrC58SqnWK5dkpbtHQIjTFAq/q6lC9FoLEc9b7ddauADNe62vS3uB5vZUKOGIW5PfecJQi3+Q0czeFNWL4RJZC/OXErXrZgfAN058PkE8RpE8G3RJMI5Q4erRo+L4I62vC61JgX1Pda3S13yn4tleh7ystctP81T88FqUYgcvlpkTXahq2SA9KlatBfB3kw5UhCZTTJge8JrlJ9VuVyAQWj5324ZaNsOOVLNXxlBusuEbw5tf5FD50skRXADVxqLXjHuT5jR2WXTVFUDGwyRIjXDoqJFnbcXg2jQHLevpH/dmLQJOKvK8O7QxnZr8uuVPuxF5Xshldt5xmi9uTOvheluTLr9NkqEITIrW50hsCRb7/Ci3sXZOKZno09dqk2mdr5pIL3kNMDIKIEr8DnmES0RXB92e92Ck7iOLl/e9vuWFnj+nTmx+aQAhMByeea3HUMzAGeUtezGcO87+QCA297uIOvAi5/7Akzzyr3EjSvWIBFm9uh6ry5XaY3U1tRGAHMf4vVwi5iDm4KmEa9pRz7JqJrpgXiDqtK2lmL+C/9oyFqsZtm9HMhA98axKfhknfT/vHYhC5vB6egqygjWVJ6hMJvrpxVCZrwmBKhhZcC+JAZuxooTCf3drlOfnF5ilYdFpI6ag7G013jiPm9+y+nzq9rMiOAPHsDHuHwlXqvTImBvxbQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f01641a2-ede1-46cb-e880-08dbdfdcad56 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:29.8342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JnHjJw03vGLBWIKe5HufAIncZPIGe6WiVr1HYW0OWnGNL7fCpD8EORTsnKkwed+Xw9dMM+Pb4ektAO9aZcZHHRjsNvjVjFZGkeZ0KDxqD04= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: QVLbm3B3XtOlNYjRz8o8pn3FUJovaFGh X-Proofpoint-GUID: QVLbm3B3XtOlNYjRz8o8pn3FUJovaFGh X-Rspamd-Queue-Id: B928618000E X-Rspam-User: X-Stat-Signature: bnac7koi4ko3jwx3h4r164tdehnkeatb X-Rspamd-Server: rspam01 X-HE-Tag: 1699394339-545215 X-HE-Meta: U2FsdGVkX199MaIAnaY3kpzpxA1pHgHB28HckUE7nUnmtcVtUkqMI1drvzXU1NVdA6/Bky6Np6M4n2ytEmdQAtd27t5lCrQkaT7J+sZs1THTXnSfAaTv1wCT1J1q0fne4RbYIkrZVUT0L+nT47F/ov0GrVeVrgstdIFGpsQJpNjFA5up2524/g1ouFJzeX0eVQmK4VfZ3HPb8TEI70sOTOKy8GxncrCk+AazcgAttN9CfCCMZaaTwDcR00hcdsa4m6ru9QjBWBQFkqBkFoAbsGDeyscN0c0D029ggqvxz45d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1zzhqH2ANrPNBjvl1IFlFoGSTQB86t05qdZEnreu X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This is a partial revert of commit a8b76910e465d718effce0cad306a21fa4f3526b. There have been some structural changes to init/Makefile so we leave it be. Signed-off-by: Ankur Arora --- include/linux/kernel.h | 2 +- include/linux/vermagic.h | 2 +- kernel/Kconfig.preempt | 42 ++++++++++++++++++++-------------------- kernel/sched/core.c | 6 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index cdce553479b4..b9121007fd0b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -96,7 +96,7 @@ struct completion; struct user; -#ifdef CONFIG_PREEMPT_VOLUNTARY_BUILD +#ifdef CONFIG_PREEMPT_VOLUNTARY extern int __cond_resched(void); # define might_resched() __cond_resched() diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index a54046bf37e5..e710e3762c52 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h @@ -15,7 +15,7 @@ #else #define MODULE_VERMAGIC_SMP "" #endif -#ifdef CONFIG_PREEMPT_BUILD +#ifdef CONFIG_PREEMPT #define MODULE_VERMAGIC_PREEMPT "preempt " #elif defined(CONFIG_PREEMPT_RT) #define MODULE_VERMAGIC_PREEMPT "preempt_rt " diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index ce77f0265660..60f1bfc3c7b2 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -1,23 +1,12 @@ # SPDX-License-Identifier: GPL-2.0-only -config PREEMPT_NONE_BUILD - bool - -config PREEMPT_VOLUNTARY_BUILD - bool - -config PREEMPT_BUILD - bool - select PREEMPTION - select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK - choice prompt "Preemption Model" - default PREEMPT_NONE + default PREEMPT_NONE_BEHAVIOUR -config PREEMPT_NONE +config PREEMPT_NONE_BEHAVIOUR bool "No Forced Preemption (Server)" - select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC + select PREEMPT_NONE if !PREEMPT_DYNAMIC help This is the traditional Linux preemption model, geared towards throughput. It will still provide good latencies most of the @@ -29,10 +18,10 @@ config PREEMPT_NONE raw processing power of the kernel, irrespective of scheduling latencies. -config PREEMPT_VOLUNTARY +config PREEMPT_VOLUNTARY_BEHAVIOUR bool "Voluntary Kernel Preemption (Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC + select PREEMPT_VOLUNTARY if !PREEMPT_DYNAMIC help This option reduces the latency of the kernel by adding more "explicit preemption points" to the kernel code. These new @@ -48,10 +37,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_BEHAVIOUR bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_BUILD + select PREEMPT help This option reduces the latency of the kernel by making all kernel code (that is not executing in a critical section) @@ -69,7 +58,7 @@ config PREEMPT config PREEMPT_RT bool "Fully Preemptible Kernel (Real-Time)" - depends on EXPERT && ARCH_SUPPORTS_RT + depends on EXPERT && ARCH_SUPPORTS_RT && !PREEMPT_DYNAMIC select PREEMPTION help This option turns the kernel into a real-time kernel by replacing @@ -86,6 +75,17 @@ config PREEMPT_RT endchoice +config PREEMPT_NONE + bool + +config PREEMPT_VOLUNTARY + bool + +config PREEMPT + bool + select PREEMPTION + select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK + config PREEMPT_COUNT bool @@ -95,8 +95,8 @@ config PREEMPTION config PREEMPT_DYNAMIC bool "Preemption behaviour defined on boot" - depends on HAVE_PREEMPT_DYNAMIC && !PREEMPT_RT - select PREEMPT_BUILD + depends on HAVE_PREEMPT_DYNAMIC + select PREEMPT default y help This option allows to define the preemption model on the kernel diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 50e1133cacc9..d3828d90bf84 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7073,13 +7073,13 @@ __setup("preempt=", setup_preempt_mode); static void __init preempt_dynamic_init(void) { if (preempt_dynamic_mode == preempt_dynamic_undefined) { - if (IS_ENABLED(CONFIG_PREEMPT_NONE)) { + if (IS_ENABLED(CONFIG_PREEMPT_NONE_BEHAVIOUR)) { sched_dynamic_update(preempt_dynamic_none); - } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY)) { + } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY_BEHAVIOUR)) { sched_dynamic_update(preempt_dynamic_voluntary); } else { /* Default static call setting, nothing to do */ - WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT)); + WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT_BEHAVIOUR)); preempt_dynamic_mode = preempt_dynamic_full; pr_info("Dynamic Preempt: full\n"); } From patchwork Tue Nov 7 21:57:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449382 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 691BFC4167D for ; Tue, 7 Nov 2023 21:59:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1ED0F8D006C; Tue, 7 Nov 2023 16:59:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 19CF68D0066; Tue, 7 Nov 2023 16:59:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6CF18D006C; Tue, 7 Nov 2023 16:59:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D1C2D8D0066 for ; Tue, 7 Nov 2023 16:59:06 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B3EB51A0B2E for ; Tue, 7 Nov 2023 21:59:06 +0000 (UTC) X-FDA: 81432524292.12.BB9826C Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 3E81E18000E for ; Tue, 7 Nov 2023 21:59:03 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=qyRZXRWH; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=asTwSQyg; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394343; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=DMUkD8VVua9HrGNysHhMP9T0hjlKGMUGQzHU+hlGhOE=; b=mOvuZt9q+bATwPvoxZWhhetcMyFkjlKXzgmGUs9AmmzcOyKTQ4IURWroAyHxywxpuOddiY xPM72ePGmK71ovyx9cLYnvfIbpBDJVOmk4Fg6g/QkuTAYfPz/hx1flkyBlaejvyEljPBn8 0JQaFmi7ovO0FvRPOFjw87YQkK5nxmM= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=qyRZXRWH; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=asTwSQyg; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394343; a=rsa-sha256; cv=pass; b=XxDHfDpAKfUSLJ9vOsnUzHt+hm8XhOxtRqjmmVIZSE2gEXvMGIH+CKR2VjxZchRJxV5b2g 43ZXTTBpdQNCXYIDt2+wHDAwiGBEf2MDEf9AL9vsghl3tlUJipEkOXDKuBLZMdDXYbCOxD GL09tWILh2RHcuefYCvM3ZeAZSJ5Sao= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJWLU005429; Tue, 7 Nov 2023 21:58:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=DMUkD8VVua9HrGNysHhMP9T0hjlKGMUGQzHU+hlGhOE=; b=qyRZXRWHvTTLS+Fm5Nq5s7ieBWX7syqEBPj8kqoJR+uVHnxyWNncKr+w2MiUh+ohqEFH 5hT6MAg1WZ1zUOXdbcAwzHov5M4mMTyg4V853JGRw3kyxPDih1HydZyDxbKi7/HYcxwW 3z8jkHrcMAQp/kxHLDiM4Cg5H2h3MSwgPBZQjM4A5fD7ArGZsi6qoFvim69zjI6y3ixn r3bDUBisLRMTggUZ/NRaJJzOyNoCm49ZoJWv6Oe2XLWjDQpXY/3LyWxQnrCLbvYjbBxM GQQ0ZGBeUxetsf5i6DzwUbgFwQsCtVvR5vNkrBcnwYVTkLmsxPjUwZYiKNzcJj2q84+s 9A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2bg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:39 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgcT011085; Tue, 7 Nov 2023 21:58:38 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tshe4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJX8VRrcL+W6eWEGCEWtM+TJMKKDM7nDsx+ShxnJzUr04TJ9gWKFEQOE4GYU14Ay4/X6xVmsefR7vMNlRj5IKQADVOQ+SDO0GrtTDHl6xZjdYMgW27TGlkHd24GxEkDkTXuuxZKwUgtmhby30ivAg7tICEiEJfOQwV/VjSFWCu4sJqw4iv7RrpsJlAXdaIjGteQItvsUvc3mw9oBuW/o2P28cdh8ypMfx7Fkv6esKIWUMBMHzp8cXllrHc4KUyg7rNfWCgIEK68u7bEzWNXY1athDtn8z/UsCE1KXxCgR8CZk6DBA+T0gb0uSDbOj18uBNq/LFLoyRryFWOMmKfnoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=DMUkD8VVua9HrGNysHhMP9T0hjlKGMUGQzHU+hlGhOE=; b=LB1eVr4KG4Sglc8GkKhUFPh1cfiPFEBEUlZ1/f0OmDDsTyWPoZXSF42MnOQw/AifwITI/AZSAdMl1eBeDylGyBLVArrTnjCVGtEj9vFU4+0Ar8hQXcvum473Stx2T+TC2+ecy8NPX63gc3+F56GaI5TPDd6+50s9yXRHAtwZ1zbhqSP9fXyOE2eRhgdN9UiJeUlBDZeBNhDeHvE5i07vvCSVlAHRwwhdqfYyd3Ah+WRP/9RV6GGr0xDxemi85Yz+wUo92VxBGn+FIZm5I0sfR5GYuF48qUT5t4rRxae12THlUIlnSnG59wwtKLaSoygt8mKmwz2M0urfK+5kRzGTCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DMUkD8VVua9HrGNysHhMP9T0hjlKGMUGQzHU+hlGhOE=; b=asTwSQygVeRTRspwYMVvWq/BYtumq+Spv+ur7q5u+Gx/+/T6DH1EPZO42xMvF07e3DCOep9fujuIaWqu0F8wMIpjQM8W5ozM9fmOpzs/Q5nDg+6r3S3TQgWEs2H5WIqOi11AHgl++40sgkfI6jQ2K9PNpcD1pNvJBqVISEzmxuE= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:31 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:31 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 16/86] Revert "sched: Provide Kconfig support for default dynamic preempt mode" Date: Tue, 7 Nov 2023 13:57:02 -0800 Message-Id: <20231107215742.363031-17-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0013.namprd16.prod.outlook.com (2603:10b6:907::26) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 96208147-3296-4164-6a63-08dbdfdcae77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z0/MRD51v/l+y5uSj8FZ2rSmnTZEiHVtLhITct+CXCKwpdH2BZ+5NCvAc2Cs09ulxx+ZZyLr7esL5ru0WQtIEgaK+yqwb536W/AjyCEA2H0pL7u2ifXa2Lfw5mkKMijfqADTZd3OCxRsxFai3qLfzixYkQ6lys2zrFEVupDC3C+8BQLqXM6F3gPRLbx9OOR5/mob59CLxfCKJgtCli0BHDFJlqQ8YlDjRb04cJX9jRw9oDH5+QSfN3u05lPup1ydFL0lbv2SYtqo1Essijp39W6AktJjQ3qhSLSeD9yhNMN8Ob1xfIJK4FsYGZ5w2nN4ZufjzbuB0xdacxWxLfm90oVKCh9OULU23BoyLAoJ6L7dd3ZlAZoVKDFLRxisbfqf+ydwI+QMbb3GXdkdRjsArSk//9s3yjtsYaCtbj9EMQZXrX9ycWqE4qwGBGwpmwXPMyY9ppNofoWabylUTpSXavflOcdfbzOfOtUlSo49fULRcVxj77NNY3PqzGUMlhIyRycmlcJNrZE844lvBDLVz0ENzjdui04FjOZLAxYuud2Q65QR+JawYnBgwYD5PVMk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bQ7dIqe1oIA0gFNEebTCYB8JpT/rB/GRsrmcVLlXoBsv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: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96208147-3296-4164-6a63-08dbdfdcae77 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:31.7229 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4gweT+sutDhTI5suVpMtzPOIwgOxjk3vA78Y2NI71kD7jjkZm44ViDzIeFGrtvk6PGKZv0QiS6x7h30WbKIL3avoDn4cPvNgOvcpP3omdj0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: E60aNi2XA_0laaOBTAOdJZY9WD7M2H7r X-Proofpoint-ORIG-GUID: E60aNi2XA_0laaOBTAOdJZY9WD7M2H7r X-Rspamd-Queue-Id: 3E81E18000E X-Rspam-User: X-Stat-Signature: 1ccqce1aj3663uz9idxmj5gobwpfweac X-Rspamd-Server: rspam01 X-HE-Tag: 1699394343-676229 X-HE-Meta: U2FsdGVkX18+8wriaJTi7pO9av/lIhvQt70Rfhz5Mf1mp9mVUOYFuqvIYW4I1pbNSnIsBcRwb7EYEYtGPnVBGbdI0zCJMNKLE5oIG44P7q7AorQMQsVJmgjoKcsv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nng7vKroV355yWkeuyPNar9gor2YErCYw8B0Vqai/dlsN2uM4EJSwoLkRQPI2fK7silmVQ5O4ANVtun8OS/Zw9JpyzPp0sySc0UUl2/P5hiZ5ehVgxFXpiiF2YiLoBsluu1pWAtG//aInPvSuKP+kgL8kpqIu+d+PAUoChsvxyoOLQDqAh1Rwm X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit c597bfddc9e9e8a63817252b67c3ca0e544ace26. Signed-off-by: Ankur Arora --- kernel/Kconfig.preempt | 32 +++++++++----------------------- kernel/sched/core.c | 29 +++-------------------------- 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index 60f1bfc3c7b2..5876e30c5740 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -2,11 +2,10 @@ choice prompt "Preemption Model" - default PREEMPT_NONE_BEHAVIOUR + default PREEMPT_NONE -config PREEMPT_NONE_BEHAVIOUR +config PREEMPT_NONE bool "No Forced Preemption (Server)" - select PREEMPT_NONE if !PREEMPT_DYNAMIC help This is the traditional Linux preemption model, geared towards throughput. It will still provide good latencies most of the @@ -18,10 +17,9 @@ config PREEMPT_NONE_BEHAVIOUR raw processing power of the kernel, irrespective of scheduling latencies. -config PREEMPT_VOLUNTARY_BEHAVIOUR +config PREEMPT_VOLUNTARY bool "Voluntary Kernel Preemption (Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_VOLUNTARY if !PREEMPT_DYNAMIC help This option reduces the latency of the kernel by adding more "explicit preemption points" to the kernel code. These new @@ -37,10 +35,12 @@ config PREEMPT_VOLUNTARY_BEHAVIOUR Select this if you are building a kernel for a desktop system. -config PREEMPT_BEHAVIOUR +config PREEMPT bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT + select PREEMPTION + select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK + select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC help This option reduces the latency of the kernel by making all kernel code (that is not executing in a critical section) @@ -58,7 +58,7 @@ config PREEMPT_BEHAVIOUR config PREEMPT_RT bool "Fully Preemptible Kernel (Real-Time)" - depends on EXPERT && ARCH_SUPPORTS_RT && !PREEMPT_DYNAMIC + depends on EXPERT && ARCH_SUPPORTS_RT select PREEMPTION help This option turns the kernel into a real-time kernel by replacing @@ -75,17 +75,6 @@ config PREEMPT_RT endchoice -config PREEMPT_NONE - bool - -config PREEMPT_VOLUNTARY - bool - -config PREEMPT - bool - select PREEMPTION - select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK - config PREEMPT_COUNT bool @@ -94,10 +83,7 @@ config PREEMPTION select PREEMPT_COUNT config PREEMPT_DYNAMIC - bool "Preemption behaviour defined on boot" - depends on HAVE_PREEMPT_DYNAMIC - select PREEMPT - default y + bool help This option allows to define the preemption model on the kernel command line parameter and thus override the default preemption diff --git a/kernel/sched/core.c b/kernel/sched/core.c index d3828d90bf84..12f255e038ed 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6991,13 +6991,12 @@ EXPORT_STATIC_CALL_TRAMP(preempt_schedule_notrace); */ enum { - preempt_dynamic_undefined = -1, - preempt_dynamic_none, + preempt_dynamic_none = 0, preempt_dynamic_voluntary, preempt_dynamic_full, }; -int preempt_dynamic_mode = preempt_dynamic_undefined; +int preempt_dynamic_mode = preempt_dynamic_full; int sched_dynamic_mode(const char *str) { @@ -7070,27 +7069,7 @@ static int __init setup_preempt_mode(char *str) } __setup("preempt=", setup_preempt_mode); -static void __init preempt_dynamic_init(void) -{ - if (preempt_dynamic_mode == preempt_dynamic_undefined) { - if (IS_ENABLED(CONFIG_PREEMPT_NONE_BEHAVIOUR)) { - sched_dynamic_update(preempt_dynamic_none); - } else if (IS_ENABLED(CONFIG_PREEMPT_VOLUNTARY_BEHAVIOUR)) { - sched_dynamic_update(preempt_dynamic_voluntary); - } else { - /* Default static call setting, nothing to do */ - WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT_BEHAVIOUR)); - preempt_dynamic_mode = preempt_dynamic_full; - pr_info("Dynamic Preempt: full\n"); - } - } -} - -#else /* !CONFIG_PREEMPT_DYNAMIC */ - -static inline void preempt_dynamic_init(void) { } - -#endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ +#endif /* CONFIG_PREEMPT_DYNAMIC */ /* * This is the entry point to schedule() from kernel preemption @@ -9966,8 +9945,6 @@ void __init sched_init(void) init_uclamp(); - preempt_dynamic_init(); - scheduler_running = 1; } From patchwork Tue Nov 7 21:57:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCC21C4167B for ; Tue, 7 Nov 2023 21:59:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8CD798D006B; Tue, 7 Nov 2023 16:59:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BADA8D0066; Tue, 7 Nov 2023 16:59:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45D068D006B; Tue, 7 Nov 2023 16:59:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 31FA78D0066 for ; Tue, 7 Nov 2023 16:59:05 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0A575160276 for ; Tue, 7 Nov 2023 21:59:05 +0000 (UTC) X-FDA: 81432524250.23.B71135D Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf12.hostedemail.com (Postfix) with ESMTP id 9498D4001C for ; Tue, 7 Nov 2023 21:59:01 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=22e6S27f; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=VwyEexzW; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf12.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394341; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NTfjEQR4AMJt6yyeprogGA5Jroe7rXtQxKX8KmYRzE0=; b=Wjna1X96ni7gCYnm81Ui0vH96luY7AyjIJswJQX3ymBlPah658QDROD8MXwOxlizG7kwAX HUwzLGbUSmZ6qjy1u8SFbJqCcspAzYgGJXYfTfU+U0q0oQ4DFr4RveDcJ+szUjD5uAdhKl u2q3A/GewpzjZYEtp2xL1nV2/y+TwNQ= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=22e6S27f; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=VwyEexzW; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf12.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394341; a=rsa-sha256; cv=pass; b=HTYqB9dVWizYQVI0O3TGdMMfpkS6BgRf4nI9Dp4psz3fWU5XXYfxM8bg8kuFtnw7XEcFJW UmzlavLx8FHqrSD0w092GuDoZmcVSD7qOYYDUp5lLVPEwJyoG3KEoheI8U/vH1P0YuezH9 2cs4aQaZY1pQDloP/W1QYIIri1hyECY= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJdAA029149; Tue, 7 Nov 2023 21:58:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=NTfjEQR4AMJt6yyeprogGA5Jroe7rXtQxKX8KmYRzE0=; b=22e6S27f45NCH/iZ4Yx8cFAHRCb9YqptVAsTzEjWoxlrSbDLJs3aA/LvlDzImfNLIaM8 SCCmEL4037P5i9vPiXpYZAXOUQnygF8zqzQ2KVhMJipk24nB5BL/8u8ujJ3oHrm62dmq uJWYM4+Dmob2GBlTo47L9Cduixn8mo9xWJ100dJ7U52C7Ny2e+7TLaKuGDkyhY79ilxX Q73LO15V3+v9QjBJSJpPXpNMfg4soUbo5hNPHIuS4LT29c77DBjxmmj7ebTsWl7+5zt9 C2tH7a9vIB/I5/zzq2NX/zvirfTvbk/eLhDYnqGWBZHSqORjmfIltZf+UVAuiYsODXwY kA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2302ae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:41 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIsFb003945; Tue, 7 Nov 2023 21:58:40 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshv7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aTQPrGhwIwxjg/L105hkN5Ll2q+d5Nw6ko8eehrndNWm2oVDZOrggmRu0bknR+6Gm73Rsw7AhD0G6cXbf7HXCBBOsc7tCxPN5pYTC+WVhNjXmDDlt/+DGpmxa3ZXoetIyOQRxY77bmsePUSMBjUTgokvLKBSmq4KVQ5xgkyMButP8OG0vZ2GrTLRC3JqUTVPTSnnwe8a2cQen/oCb+1yN9bz+mO3xqUUH0Sf2YNxKiamTK+z2sDX7UKQLWPdHPXrVALiKRi4ztBD6P29AvTx6vlsXRu42EBGD6XdQG0wbiZXDITa6iPuzTgsOx7NtDIbQx+FzK8TYhMlWwt/0yQGPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NTfjEQR4AMJt6yyeprogGA5Jroe7rXtQxKX8KmYRzE0=; b=QYSLX5r5H4FrZevS7mInBf0xPqaXP0rHosLtzUKS9AUrk+APnpRcCAHLqN+VPX+Xlim+Oc9c/CCeqpY3qQmWsII9y1Y2EG+pWYFCrEQaOGcnb0OPW8KzJWXDjs+NfHHy02FaVbHMiLMJCVccsmGYgfRMddAJFMf0tI+BjfUy0UL/XJa0wyfDxJcYeURmoQTgxFnkaKTaU9c9jh1+anaIgi40fT8WbIEajFm98LeYIF4Q8p3wbhjZ+zXqAXwhkoDC4+hpRbZ+t4/woInEiOgHWYs1IzTrJ9ykS0cfE8QX1eoXDyXcDGOWicFAAEvtr7IgsY/DNLD4vSVQQDGGktg1MQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NTfjEQR4AMJt6yyeprogGA5Jroe7rXtQxKX8KmYRzE0=; b=VwyEexzWdNLTNSdUtqscg1tvSaUOzxoBmhsad2TB8rPYx0qhMJa0QONivVSszzdIbgM8ZJUewkWCRBjBzXKXk17a3r+9AXDgEPWBXybld/cLoXmIrgiIM79MTZ+5wklOSOd6cmyHVhLCE+WEu6wijTpJdm6A/bVYclayUsvgc+g= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:33 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:33 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 17/86] sched/preempt: remove PREEMPT_DYNAMIC from the build version Date: Tue, 7 Nov 2023 13:57:03 -0800 Message-Id: <20231107215742.363031-18-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P222CA0007.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::12) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 25d0db53-4d01-4aec-c504-08dbdfdcaf90 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gUPLLcVKLDDBAoL5Hqo8wVmAhMyZntpkcpe8IIFD76SGpT8KcEh2kCpQkF2+L9Wq7XLojqqqMUD9gqbs2z13D+Fy/0wiFwQOeRquu/MQ3NJFgaaDO86OJGmM/cY5tYPhV9qTSUQRLs5amNn18cVLc4R71Hi+1L9I5p0g3WwXkjgxgVNxDwDXuJha9DGGU95bRWwSIgMPZoB/VSWsnofe3IFd5VLdEBgb1IX4yaeaHIS1ysCTUy9/ImgHE8aXuQzExyT09eLpS0O6M8dghvBmy0G3Fg1/vI5de/FUSCb8HzSb7DUK0mQDesP7LHu7eV50GTTga+QPbci7Qq3T8yz7hkc+Fw00eNICzzBXO7YoFO+0jPKhIpxDlssNhQHPYwdMQxjNFge39ZKn/qmK9r6NFQWvY5ADcvREgAcJZ2odcE7rfSOzyC/JHzP+IugKiFx/Qf1pluImJOT9WrFVlu5Frm54swU5AEUffmsLOHjRplBSMxaBYVyeiTt2iBvTuMXAHqSEhLGd9tJtvn2AWdwY/2jJnCX9/CIEYsyZFYJlAGB6mdbFblFyz+nHgF2j6AwA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(4744005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X0nsSWZmQ05bFPBpIOe4Lng0RXOBRlRGE0OoOo+l93kifBPW2AmHaE/RzK8kPla8nl0sTyWnKCrBN5wLg+pHg0rpG+V7g3LBz/AmtnyDMOjgEjnulm2dlAy+9nwIOvrUWQHEXm9i9vqilAl/xfLATxUxcjOhXeJ20Mc8lA3KyTs/W2xzfddbgujg6yXbwC4pC1TRYyIXoribAGYRDQNU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hPXjnk0FRuGRDHy59jgF4JEdhdPqqsISo+ZqL4qdAX5PrCnkSHR303kbBlp3AQZ2SSqjPXzAegyXGrpwD+kSIYvkY69xhWg4B1XNAfQcNIhNhsmB7m+u7MGlyhKa2h22ByWC9fPbwToWyWplnXf12crdO1nPTYTbiYinUGhPcrKr+3SAz9iDi6RXyZZPBbXLP2UibUUKr0uMKb3xIxMqY1HjjGjvAImT9nWpkEmG5IEYHEO7txU1q0igPybACqUtWaEp5y2FQdrVbvxQ45PmwW36YNU/tdrjptybUiX8SOzKm2ryZJR4vsp+n0bh+wNfdslcDsXHq/Wf0cKeqv+ubYgXfFQAYFNl7S1b62TMs7GRNpyLggpiiHWLLXHZ0c+/poJ6qc/gfTEJqgapmtMDFU9CR17xt7IY12IoA/zI1napb8oMftz5XXAiP0V1MWEAJLHIBgiuS+G2zENdHaR3uhvsT2u4cPpGvjBC+SgkMl4t+3i1NsM0YBXnxUn/NQbe/dOYRfsiHYX/BbD+h7tSDYng/eSQkTZcce3ufbAkuoysE02iav8Aew68QdY1lgB0+Dl3c6SaJVXYUvJyF2SjKhwEXfs3MfbtkihcAJoqWjJkdNyUGz7vniM9A+pkaG8Hde9GA5HL/k3wcJ+NbuTjzDRYTnG/MmWpwhiJdp1ynrCeZzjrVXlCsRtBvrFCvC5uM4ZC7X6/SKH8MYan6Z75oJ64zbbz8TdqqyYt+xSh0L39S33jxxjcBMlz0P2W4qHDBV+2nJb8pi2DIVn4fZY6Bkrvv9Ze9PH4DyZi5gfa4qOxOYagoUG9uNtI9mFggvps73t5L9dvn/sPc5q5QkyobScxqteT+pSsEVuB4713edw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25d0db53-4d01-4aec-c504-08dbdfdcaf90 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:33.5927 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NDI1hXQrN+7m3kMGTYc8NbUz1MvusiwteEx4H+PIdQ9kUWjYQLr7BHhdOYcL/bQ+LozahYDGubrIS3Or9P9n3FL5d0hv7uWDMFYBs+HV3oM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: UzzuxG8LG7qRi1b78612fWk3z4lRHVPS X-Proofpoint-ORIG-GUID: UzzuxG8LG7qRi1b78612fWk3z4lRHVPS X-Rspamd-Queue-Id: 9498D4001C X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: eabkpouuomwhjsm15wy64x473ymkqet4 X-HE-Tag: 1699394341-975498 X-HE-Meta: U2FsdGVkX18SarAMr/gO9BZYKeeHzBCuWEGzq6oG/l+LCDB0zdagsy+bwsRffeuFulw1m3GXYVaNysxrhNJrD2WgANzbK62acj4/2HIa7u0hXgyDEI4bDCAXSoaCwiYWOQqANj1z9UEh9J24uQEkfBueQ/2ldOJqFzbTNGMVum2JjP8AOQsZ5q2Ejqgx1mEjE2w2yWfAX3XEHAXwZSMYgvpAa7tbOBjRop6QqAK7BL9CghW8L/kshDrVFr4/gwHeLj+DH4AXiL2EIgfloJhKSi2ACBM36kM3ArbYu1ofBHIpj5AwreNchFESQQR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WWunaWz0Bo33C9TjPwcvzwTUmurYOY7y0V4cGpBcWVfv2YiQ91CjVRneX87K7GltkhKsCVsOyH4D55YC3BQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: As the PREEMPT_DYNAMIC logic is going away, also remove PREEMPT_DYNAMIC from the generated build version and go back to the original string. Signed-off-by: Ankur Arora --- init/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init/Makefile b/init/Makefile index ec557ada3c12..385fd80fa2ef 100644 --- a/init/Makefile +++ b/init/Makefile @@ -24,8 +24,7 @@ mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o # smp-flag-$(CONFIG_SMP) := SMP -preempt-flag-$(CONFIG_PREEMPT_BUILD) := PREEMPT -preempt-flag-$(CONFIG_PREEMPT_DYNAMIC) := PREEMPT_DYNAMIC +preempt-flag-$(CONFIG_PREEMPT) := PREEMPT preempt-flag-$(CONFIG_PREEMPT_RT) := PREEMPT_RT build-version = $(or $(KBUILD_BUILD_VERSION), $(build-version-auto)) From patchwork Tue Nov 7 21:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95F84C4167B for ; Tue, 7 Nov 2023 21:59:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AEE5C8D0071; Tue, 7 Nov 2023 16:59:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A9E4F8D0066; Tue, 7 Nov 2023 16:59:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 855758D0071; Tue, 7 Nov 2023 16:59:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 72E668D0066 for ; Tue, 7 Nov 2023 16:59:19 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4BF32160A8B for ; Tue, 7 Nov 2023 21:59:19 +0000 (UTC) X-FDA: 81432524838.25.656581B Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf04.hostedemail.com (Postfix) with ESMTP id DEFDE40019 for ; Tue, 7 Nov 2023 21:59:15 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=cllncWun; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=EFmNyBak; spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394356; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZcgAHLg6hzjX72ZMxUiip8gq5zvpdyLYBHZBRJ5W448=; b=b9kIZwYplGMAWYnVG3xKDlcrRCwckA5knDFklBikgDMUJGM8IJ6VIeEa0iM5OwfioEkc97 L28kgCsLDtz3zpMVckopeXlG/77VJjw2uBbsSE8AOWg4JTmsQ8AZSp7XBOYpbkoZLVodyY sjsVsQdUYTbEGlWUhSBqfGKRLRPMLwc= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394356; a=rsa-sha256; cv=pass; b=cfZ7RU5z/IK3ExuqhJ5Z/gikk778eoFPcBAR3peA6/p94/VNJ/JOEOVZE7N+k1/dAk51NE UrFWQHuXFiTEvrO02KhXG8kfimBoosHn4aQ+MQ6S2WQMGTQmlx2z8UMK7mT2eQ6eUZPLbX m4AK8CIpsAR3DJY0Llk88DJbfP1CIoQ= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=cllncWun; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=EFmNyBak; spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJoBe000910; Tue, 7 Nov 2023 21:58:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=ZcgAHLg6hzjX72ZMxUiip8gq5zvpdyLYBHZBRJ5W448=; b=cllncWunkDmOrXibOlcJZyjRGv7sbhWNdwdvfIBl5Y/U20lb9JafeLfJFqp6070/5Zad XvCuZE2+Babh+puODb/UMu+OwiRA1ipUQ1WBgr6PWD+M5OC4+hJ7GZd5fzKlQcVtzVe9 /v6FWiFYEVyuE5aOV1WRXju8D5aYExr71kYKmMhQ+NLgfdEN2mjJ7c5Kqtj/x/7GyXnS ui1latzP9Ayq0Kja3biM7a9ehrVxG7eRQ65HwPWUZrDMGkHk7N8y12Re1dV+t8krxqs4 rhWnoS5hwH0TtOwkNG9uUq25kiXESB4t4rEQhOGjBtmNA8whTmC3WrV+PCyxugKxD5wg gg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2b8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:42 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIsFc003945; Tue, 7 Nov 2023 21:58:41 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vshv7-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MidSblmpioVxYIdiB9HynhZsI/PfjYpelnD+yPjTPWlJXFnn3oJCjDbyXnamv36uIUNhMJi/9G10diXigBKqRVYSbKD9eIwJrKiEeUe4mcXUq1VXM60UpR3KvuyC+hXadaTpmUm82PTBHIwbkOEFwCHl4vcQ5cJbTKo0GLR705y7Z++PS+j/Xa9APXGIGmHisfx78LlgQGxpT+1IfuhTOb0srHLZ0dbsqvQ2jDvTCLRko7/fNY0oohj4RvgZI2hmiqOyDbKx9f1+C8Mly+jGVyXyCKhCyDALdNpsyj+G3MsjEpuTx357G72I0VZqO0F0bP+nQ/Qo3gFPVVMtdn5pCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ZcgAHLg6hzjX72ZMxUiip8gq5zvpdyLYBHZBRJ5W448=; b=Ab0F9uSy7IcZQf/XPgZxZkZ/8uiMse/sR2ZCqDcMrLd4h026sohU56DEQJWKJDGEejqajxzXM6Bh4LgOyFVz+3Ub9sUN91rfJBENKhRrDsGOKorH7I8CM37KRjnZ0gYbjvtWA2ul1d+3JlRllwqHo/WrwSyHltmAEiYr3vJs5cDD83Sxifbls0oGAuIBfrnbmT5n2PzV/lDAWzb+djbPAC+Q7BdWuV1TG/3XS2FtAOwO7FtFdNIN0hoAXT007Zc2D9busW7vEynX7Sib4ptfYypfc39ZCDbV9A8MtReoYWlGuMJd3up5ZPLBaR+7A5Bu2jChaYJp3b3dkcnXqNfpKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZcgAHLg6hzjX72ZMxUiip8gq5zvpdyLYBHZBRJ5W448=; b=EFmNyBak4qPlEPfq5B6McLPaOo5e/qRsOQsORF2XrDzG8WL8QvJkP3/HgqCEMiXARHof+kkuW2jJBXVebfnfWKC/PTtB7if2VBfUy5QvHoTFE8oLWJlmuFPWCieoL0dYbP1ypcomvIpzqwkxUcO6U6z+hNUVJeImiue+8R3PqkU= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:38 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:38 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 18/86] Revert "preempt/dynamic: Fix typo in macro conditional statement" Date: Tue, 7 Nov 2023 13:57:04 -0800 Message-Id: <20231107215742.363031-19-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0006.namprd16.prod.outlook.com (2603:10b6:907::19) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: b65ea8a3-1408-4899-b058-08dbdfdcb278 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8/igqcYhRa2pMjgy3MzRuzzNiDX0ZMGEKQxHUqjVwZS3NqtMEnN4gAOWurMHPggqRJjmp4HtkLL16oh1OcI2rbGLv9Xj0Qv9s+BuYtXpePXNf5J1fVV8zth2ioXamPzqpQRLCH7rQJ5dyqA9eY4cLl97R6WlkcH9fthtS0WfXcAcy9TpEnq/hiGzxU3icmNGMS1ue/gMDiishPmF0wI48qhq4PKG0U2nfSSu1cK210AmlMXv3W3GQSJfqeuMFUiTBIxXBaacrGB0JtXA+zECcF2fFoMbnEJ7nbsnNlXAFtyob9omEkrlp6fLrfIL4j6JTlc/9VnCHg7uucWKuQX+krM5tJay3ocbNrGJzRfu3EvkdiecAOunuC4mtRZqKazAMF3s2o+Ox8mv6ro3yy6sv/CBxbi42phOUaLUH1u+OCpOgrjIc+CDD2ZSkVScOnQYDeKMD+Y/hGnIoSn2TWW1k7KksaQCkPvZ9PrfTup7L8dmVmyQ7extmXtJ5ugBbxFxpitHd9tKmqL0snQ96GxRE/493NJjDOmZtAX0XBeA0nxQwjHTnCEQdonsFXSuItZP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(4744005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-Chunk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nSJNdS3SkV1m+USDkava8TPmWqPio7nSYGFUmDDq1EA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b65ea8a3-1408-4899-b058-08dbdfdcb278 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:38.4606 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4xr2An5sjFfFRl+AbIVsTaO8soe2hUO7/lSO9nMswXa6levGx9WoL1HaTrDbot9qfhkwIv7SpcAwHOBxtTQ5nJVfhdFgXf8ZfUWJhgmtJvE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=990 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: 1X_lREiIyBoE68AD9CmShD6U3C17-FXO X-Proofpoint-GUID: 1X_lREiIyBoE68AD9CmShD6U3C17-FXO X-Rspamd-Queue-Id: DEFDE40019 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: h1e3gyrzo6yryi8kwjeka7uncwmzkc5k X-HE-Tag: 1699394355-835099 X-HE-Meta: U2FsdGVkX1/lvTd0nGNpWrCFm3ntSr6d6LXW6l2bn9cC2gzqpWD77MwnMxxNXTfi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1t6v8aBkeM730YMnPzNhOOYDgWQljVxNzkgPgggp2V7MU2aHihdo5tLQdTQu4JdMTJSoqHHfXvQGXILe/mD1db22vQt9F9PjpccDsMkJkru+phijXcWDVUX7yv6y+obEH4C2HTYBvXZX2kO5zIjj+iVx45eFGFVmEGJhP93sHRxmvwOgJkT6dv5TeUOImgxcNrHCj3ytLwYNbrOvI/Krbbj/jUMsI X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 0c89d87d1d43d9fa268d1dc489518564d58bf497. Signed-off-by: Ankur Arora --- kernel/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/entry/common.c b/kernel/entry/common.c index b0b7be0705e0..d866c49dc015 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -418,7 +418,7 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) instrumentation_begin(); if (IS_ENABLED(CONFIG_PREEMPTION)) { -#ifdef CONFIG_PREEMPT_DYNAMIC +#ifdef CONFIG_PREEMT_DYNAMIC static_call(irqentry_exit_cond_resched)(); #else irqentry_exit_cond_resched(); From patchwork Tue Nov 7 21:57:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76FB7C4332F for ; Tue, 7 Nov 2023 21:59:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 96C228D006D; Tue, 7 Nov 2023 16:59:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 914BA8D0066; Tue, 7 Nov 2023 16:59:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CC928D006D; Tue, 7 Nov 2023 16:59:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 569DB8D0066 for ; Tue, 7 Nov 2023 16:59:08 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 225E580BBE for ; Tue, 7 Nov 2023 21:59:08 +0000 (UTC) X-FDA: 81432524376.28.4D3B42F Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf03.hostedemail.com (Postfix) with ESMTP id BE4DE2000D for ; Tue, 7 Nov 2023 21:59:04 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="qMT1v/hn"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JQN4d8PP; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf03.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394344; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=A5FpMHsAQP8YoR48V58OEHzKSjNZ0+wz+DG4FqeREDI=; b=d8IY0yw2Ov/00dP55WxHPGd9xZke63mnvY8dZBVeAGpRuA/gDZY/Jx+T6ZpZYkUGfQxLII 8lISG4117hPlDqz/Q4cvf5vH6b6/1JLaXot4c5h4QL/cK7c3NwbND3xwajtfsy0d5jkcs5 6b8drn+kcj6L/+lkbZDXKoTrmxTZZok= ARC-Authentication-Results: i=2; imf03.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="qMT1v/hn"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JQN4d8PP; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf03.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394344; a=rsa-sha256; cv=pass; b=bvAKJRJeyS2hu3w31Qch0aA8GoXew+clYmyKrkpoL0GyfjhjhaUI+L5i9QnKaFpSjaKkv+ NJEYqqgCA3kyNPTqldpdJsdHuu+QbxvEFRlSB2kd8gPy4JQUJqiMtOEQUnOAqPXN/o2mbE R1HPCNqCJXlycm3vNg8Qe/6o9gYNmTM= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPwM028640; Tue, 7 Nov 2023 21:58:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=A5FpMHsAQP8YoR48V58OEHzKSjNZ0+wz+DG4FqeREDI=; b=qMT1v/hnr4rYALACbPMidvOZDUF0CzfEDv0WukZ2ZkYCIaAAP6m0V7Dbjwt8IDGbsgEy Gmlxn7ccnKTHNns+6XNRzAZE9oFZYv+TWttRncLIvgggB1T8E2tDh6zcohSluY6UJ943 C8DlEwOPFy4vBsxkQNUKM5iEG0o3aMD65Ru3xeeYW6wjer5Kf2x0VtFMzzeYJo728Isn UICldqaqmpQPGOA3PBLlUmq5ylR6+uf0dg0K6WJOSkM0Q6Cd6sqhuKtszKxaDAOuHRJX Aup9jUmhC69+DJCaOGq3w+6iO9h7m/pQqY3/UDodDpfMhfAH6NUM1dniovnQNSJ/kCcS kA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2302ag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:44 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIx3v000599; Tue, 7 Nov 2023 21:58:43 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsk7d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bvkd06S3nzc4qGk4t5EIwQnUgLk4fmK4X/oLO6bYmdM0uwMxSAdHqjf0AnjvD3BdObrJV6zuVsPFuExJfHeoO4Jo+s6scdNvAVEsEXnG5Tn7GO2HUR7W+dTTRkC64kqCevYaWXAzsfHt2OYtR3qBTbkakJVwN7GHamzGQ3JbZRXvCRgxo863W7R/f5kQQHHRDCXrGFDsdRIyNlk2s/iEyXPQ8bk+VXDSwTGe76NxahECz7MQ7flU4PWnWNIr7jd60fbQKgNfyGoW75HuVY9D7PdDOUxeQddlpAUezNkSvz0SCiZqGB0og/EAN2lfcNExo4tY/vrA6/chvQt52GB4iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=A5FpMHsAQP8YoR48V58OEHzKSjNZ0+wz+DG4FqeREDI=; b=gHAl6tHgD4WVweB8Nc+FopNzpIRx2odwg3FO1o5gwsja6yeRjGCS/fqICm3jLd0Vq8whfOTS52ztbrbHuTkRS9ObH4z5mJalh1ln4QrRExkqEJuRE0+2E+YOT9C5rsLzb8gVVs45ddh0Q00VRxp7WTfOh/RDyMmgydUfxgfIzK0QWJhgz9Vp7LRnjYw1ZMfV94WB28Tfa6QD6u85by3V0YiOFlAGlT68wOEe2vCG6BgDzlCscyBrGvI3Ske6OLjKpbdsM4XAH43JJJ4c9qS1eL43sAuE5hEXDthkAjH6MfPQJD07cVJnYRRSI5h1g8ZBKcuLcSgKgOHOYNaffO3YmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A5FpMHsAQP8YoR48V58OEHzKSjNZ0+wz+DG4FqeREDI=; b=JQN4d8PPOgJdKJOcIg0FGcqDwRgR+5yhBZSY9wJ71jz7cvVOsXtQt41NmveUZUeVA/OzdihIjhum2dGPcIHreik5205SZmJ2qD6dG0ms1ZOLI0VlOcn9DmcnJ+1N+EThXeY66r0iRuy4mXT0OK1G21lcPP5yZPYn6I4c7h3DBEA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:40 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:40 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 19/86] Revert "sched,preempt: Move preempt_dynamic to debug.c" Date: Tue, 7 Nov 2023 13:57:05 -0800 Message-Id: <20231107215742.363031-20-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR02CA0001.namprd02.prod.outlook.com (2603:10b6:303:16d::21) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: e06f2d25-b826-45bf-597b-08dbdfdcb3a0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W6EjMv+lkegtoDUtL98K9cHt9QVt+z2y8x0F+jfrfeqidwQ+gdYeyFxv01980SKmM3VYnczuMLLZ5DYfdBr3RCjtnJl9GIsROdBm2e2Vo4YZi+/DB6mmMJ50EpLZWXv4iLyraxEnrz7B5zfqgehjUAYhuOhsrnCnu2oI83mMAQDcg2pBjFcVlSy3oImzCejjZ3JmaNp7N6X6OcawRta9zenExKgfn7F7zPgb8lgXW8LqmRj7nB06N9+hxVlQuXZM533BENezDJnNkpYt13L1ow32VyqFOsf5VLO3vgqkL56XZoeV562Z/LxbKtukhaecrhc0ltpqliOYvKquE8TeTGCeTfU/gEJxnbwsbpXjeUUqkGvCD/bdUTdESEYcxTBl1gVfX9kPqTn3ANOHUERrtuXXATGWhiIYAHu20cB6b2ZZDkJ+iIk80RQbgaxDUjZERfSxVT72YpaJMl7LSSJScRTFNw0EhG7EvxcMX2QSItP5LMwrb836aF2CQ0RXVxX0ePszme/VN1R7gznMYyWwcbLoQ/gWrO1mtVz2fOBuK9PEOLNXtk6iMwc1z/Djriut X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666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xV+OAy3k+Xvqzw3/2p6IwqLvCbF6QruxGvF7a/GCmKadTryRSjn8ZSBEwGBKOfVFd7nZ79U1fqZo6C4sdripOhA5WchnAI8KnZA8drBE2hcAo5fHhI/IvhBg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e06f2d25-b826-45bf-597b-08dbdfdcb3a0 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:40.4741 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZA8w1RJUaUqFpl3aym0TlVzhT40ytjQk0ezcl2rx+ouj+/LnOysxFe7KvfEpavqDQTitQvC+Rs3ERrsYchFDjaZyjp9P+jHIALn54jJpb70= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: C3nnT7L_-Q7eN--ZZLrsCERwiQP8VqST X-Proofpoint-ORIG-GUID: C3nnT7L_-Q7eN--ZZLrsCERwiQP8VqST X-Rspamd-Queue-Id: BE4DE2000D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4ip8fi1emkuy37uwgbdxrw6n589mnyd6 X-HE-Tag: 1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I4+SI/yRbGzblW8Sy2e45ndEsHvV/N9RCUO/J1cAEok5IqFYFSWjTS0U3LyBfOkILyXy03jhvLvgWSSdPwGDjccfeB+hydMoMnEF7w0qgeLh/3nXpXsqk5hZC2utkhBDl0F7/mSVZ8J49GcVMkBrTzAyG05InJ6KvAsl95fFf2ify+XYgzF8Ril4zzgFY/7G1N6jOaOr543V9rmJTwh+cKd19THQRMVLyiNaAbr7LB20yr/ZR3HGDN3HcbYQtkSHJLYGlEOjoLCZZHImHdIyERHL9RnnsMYM262MBeh9SODnFWfttM4DMtvf/7Qr2EmAxucZlr2kgcs/9+S4MMnzVg5SJVjGIFXMp2p6r54YA8xFXDESJ9HaECfsaNCdqv+FbKWUgCGrXggsHeYknNWZ/OObZhala4K9Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 1011dcce99f8026d48fdd7b9cc259e32a8b472be. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 77 ++++++++++++++++++++++++++++++++++++++++++-- kernel/sched/debug.c | 67 +------------------------------------- kernel/sched/sched.h | 6 ---- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 12f255e038ed..abc95dfe0ab4 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6996,9 +6996,9 @@ enum { preempt_dynamic_full, }; -int preempt_dynamic_mode = preempt_dynamic_full; +static int preempt_dynamic_mode = preempt_dynamic_full; -int sched_dynamic_mode(const char *str) +static int sched_dynamic_mode(const char *str) { if (!strcmp(str, "none")) return preempt_dynamic_none; @@ -7012,7 +7012,7 @@ int sched_dynamic_mode(const char *str) return -EINVAL; } -void sched_dynamic_update(int mode) +static void sched_dynamic_update(int mode) { /* * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in @@ -7069,8 +7069,79 @@ static int __init setup_preempt_mode(char *str) } __setup("preempt=", setup_preempt_mode); +#ifdef CONFIG_SCHED_DEBUG + +static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, + size_t cnt, loff_t *ppos) +{ + char buf[16]; + int mode; + + if (cnt > 15) + cnt = 15; + + if (copy_from_user(&buf, ubuf, cnt)) + return -EFAULT; + + buf[cnt] = 0; + mode = sched_dynamic_mode(strstrip(buf)); + if (mode < 0) + return mode; + + sched_dynamic_update(mode); + + *ppos += cnt; + + return cnt; +} + +static int sched_dynamic_show(struct seq_file *m, void *v) +{ + static const char * preempt_modes[] = { + "none", "voluntary", "full" + }; + int i; + + for (i = 0; i < ARRAY_SIZE(preempt_modes); i++) { + if (preempt_dynamic_mode == i) + seq_puts(m, "("); + seq_puts(m, preempt_modes[i]); + if (preempt_dynamic_mode == i) + seq_puts(m, ")"); + + seq_puts(m, " "); + } + + seq_puts(m, "\n"); + return 0; +} + +static int sched_dynamic_open(struct inode *inode, struct file *filp) +{ + return single_open(filp, sched_dynamic_show, NULL); +} + +static const struct file_operations sched_dynamic_fops = { + .open = sched_dynamic_open, + .write = sched_dynamic_write, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +extern struct dentry *debugfs_sched; + +static __init int sched_init_debug_dynamic(void) +{ + debugfs_create_file("sched_preempt", 0644, debugfs_sched, NULL, &sched_dynamic_fops); + return 0; +} +late_initcall(sched_init_debug_dynamic); + +#endif /* CONFIG_SCHED_DEBUG */ #endif /* CONFIG_PREEMPT_DYNAMIC */ + /* * This is the entry point to schedule() from kernel preemption * off of irq context. diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 4c3d0d9f3db6..67d6c35fc5a4 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -216,68 +216,6 @@ static const struct file_operations sched_scaling_fops = { #endif /* SMP */ -#ifdef CONFIG_PREEMPT_DYNAMIC - -static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, - size_t cnt, loff_t *ppos) -{ - char buf[16]; - int mode; - - if (cnt > 15) - cnt = 15; - - if (copy_from_user(&buf, ubuf, cnt)) - return -EFAULT; - - buf[cnt] = 0; - mode = sched_dynamic_mode(strstrip(buf)); - if (mode < 0) - return mode; - - sched_dynamic_update(mode); - - *ppos += cnt; - - return cnt; -} - -static int sched_dynamic_show(struct seq_file *m, void *v) -{ - static const char * preempt_modes[] = { - "none", "voluntary", "full" - }; - int i; - - for (i = 0; i < ARRAY_SIZE(preempt_modes); i++) { - if (preempt_dynamic_mode == i) - seq_puts(m, "("); - seq_puts(m, preempt_modes[i]); - if (preempt_dynamic_mode == i) - seq_puts(m, ")"); - - seq_puts(m, " "); - } - - seq_puts(m, "\n"); - return 0; -} - -static int sched_dynamic_open(struct inode *inode, struct file *filp) -{ - return single_open(filp, sched_dynamic_show, NULL); -} - -static const struct file_operations sched_dynamic_fops = { - .open = sched_dynamic_open, - .write = sched_dynamic_write, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -#endif /* CONFIG_PREEMPT_DYNAMIC */ - __read_mostly bool sched_debug_verbose; #ifdef CONFIG_SMP @@ -333,7 +271,7 @@ static const struct file_operations sched_debug_fops = { .release = seq_release, }; -static struct dentry *debugfs_sched; +struct dentry *debugfs_sched; static __init int sched_init_debug(void) { @@ -343,9 +281,6 @@ static __init int sched_init_debug(void) debugfs_create_file("features", 0644, debugfs_sched, NULL, &sched_feat_fops); debugfs_create_file_unsafe("verbose", 0644, debugfs_sched, &sched_debug_verbose, &sched_verbose_fops); -#ifdef CONFIG_PREEMPT_DYNAMIC - debugfs_create_file("preempt", 0644, debugfs_sched, NULL, &sched_dynamic_fops); -#endif debugfs_create_u32("base_slice_ns", 0644, debugfs_sched, &sysctl_sched_base_slice); diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 04846272409c..9e1329a4e890 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3274,12 +3274,6 @@ extern void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *w extern int try_to_wake_up(struct task_struct *tsk, unsigned int state, int wake_flags); -#ifdef CONFIG_PREEMPT_DYNAMIC -extern int preempt_dynamic_mode; -extern int sched_dynamic_mode(const char *str); -extern void sched_dynamic_update(int mode); -#endif - static inline void update_current_exec_runtime(struct task_struct *curr, u64 now, u64 delta_exec) { From patchwork Tue Nov 7 21:57:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449384 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB7B7C4332F for ; Tue, 7 Nov 2023 21:59:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CA108D006E; Tue, 7 Nov 2023 16:59:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 154C98D0066; Tue, 7 Nov 2023 16:59:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E96D48D006E; Tue, 7 Nov 2023 16:59:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D6EDC8D0066 for ; Tue, 7 Nov 2023 16:59:15 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B828C1A0B05 for ; Tue, 7 Nov 2023 21:59:15 +0000 (UTC) X-FDA: 81432524670.17.18BCFAE Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf19.hostedemail.com (Postfix) with ESMTP id 5CE7C1A0009 for ; Tue, 7 Nov 2023 21:59:12 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=kdd4acaP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=oY5tJreq; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394352; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fKRDx+uw2jyDRgUp71qjdHwT8NWG/kxW3t5ad5n6A4A=; b=qg8oB14Z3qT6omToIgyommDNqpiv6Fg2U2d+yTSzsF6sCBr0J2KGI3CodECDb6n/1wW3qG chBkrwfgyVyratrUJ1PxnV9Zk7HLgq9/tqFNsdxmC1FirAkebT2yfmC+tJcFf2mRyZWdax iikW80Uigb9airr6NWXIwsIMx9c94Sw= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=kdd4acaP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=oY5tJreq; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394352; a=rsa-sha256; cv=pass; b=3p/xJMr9KR4oYwKoQ9g3EeO8gPiIoP6NqUOWVIRWblWqG+7EuK/xx5HOI/rWG/9Rv64Ea7 N7q//AYhT4JVfExr+Gf9eiy8hTNWg81DOSyEgRGimhZbWDOb8bM31FPBpM0rchv8bVmZxn t/kP8T3oVxcrsB1TbFPCy3bB7wEfhfA= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJdAB029149; Tue, 7 Nov 2023 21:58:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=fKRDx+uw2jyDRgUp71qjdHwT8NWG/kxW3t5ad5n6A4A=; b=kdd4acaPmGwx0f99J4PXoPpZN2jKoR1D7LrujC57dvMGnT4L5imbnELeItWef4Y3KEwU e8Dz+pROzkl0szquZmSaX4WFaZ0oG6barG8Lie/pNibzf3xE2sWoGz3K01dOJreqT7/e A+ozcFrNqFof0CUEXiFMCZacM7ojiITo80TgrCQRtjUnTmr3MaePi68corrmEjXLVa1G 9e5sZC+D/bASzpkOgLUdl488RjgmoQF97Wx+23dcW39Q67kYP1sBZDrTS/eQ+2/IoO/f B5cjGht1onnDHi4+CYklQurSI2zpksgQpitUOIhcy5EAv2iCJD7IxcFLV8vGApjwYFvo fg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2302aj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:47 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJWws023940; Tue, 7 Nov 2023 21:58:45 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241fjn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fdLJHAyspE0EhQsAOTFbiKy6839fzqUfK3paYokdZ+F6d9jZ7pxlXVoGGGZeikxSr46jS1ZrJlO//F1TLyZkMRJx/55nEXch5lrJUYWgS+uvoWziooUp6URIPNXKSrqInn1JoxuaT9G+QM1kuMyyvctyptRPOyajjVzbxWlELUx5T8XxfM4tdzdjwyu+GbOBKksqbo3/DXSWBcShg7daf9Cat8gGQMPeLapfpqOIGNRTOXcFXZ1kZEFMxF8mlONY/fwZStXdTBoUcchyKrHSNiWXu6YwN/XSgWI0pHKJiZSLunAZiFSqpVXHCCk0WJScjGkZ7AgvxTAUdwnPHoZoOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=fKRDx+uw2jyDRgUp71qjdHwT8NWG/kxW3t5ad5n6A4A=; b=BqPQIunDol2XTAQFTCNdTp9OTtw/4dZh9gJ48KlKcdILohePCBQql7iJQksCZ+gFIIPRZ1/izTPrtXixp0DNdibuc/01jeweA4AcHtZ3Kjfute59ug+bwY52bpBfnOwIRxHqTCrob7CA2XOOFmP/fNtCB+7/5aKcZ5qoas9TU6k1G8McEKFD8y39wYYKDAxKeaqtKhjFsR3OlO1+J5GmbAgWFPIU8RtHGPbBAC1qgOKsy7ki5+I3+pEhzHDDnhG5RRFuuU45TZJuTTXhSdR7QXNqUCjMz95pH+/VwrzRZHx7rRhCq90HWbzq5KSiJnNVAsxtYwPBCxHg/KkFofA09Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fKRDx+uw2jyDRgUp71qjdHwT8NWG/kxW3t5ad5n6A4A=; b=oY5tJreq6VeMQHQM/wxX+zYDL+6lqjSfq6KSbBRPigwkXsrZ2FM6h0QfZ0LUJIxT5I+ydmPlvNIyuGPpyrcOwP4t8PWpUlqpZk+3rreaYRQqweGMWx8c7OVwHcTDAs9orJzJ1Mblj6x7KITDMfOAW18S9wPCLPKR65krOAUFq2I= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:43 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:43 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 20/86] Revert "static_call: Relax static_call_update() function argument type" Date: Tue, 7 Nov 2023 13:57:06 -0800 Message-Id: <20231107215742.363031-21-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0195.namprd04.prod.outlook.com (2603:10b6:303:86::20) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 532b585b-b3fc-4425-270d-08dbdfdcb52c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yf4xMFmLFiK3DShR4B9LmDnoIdNppEoP18SvtFDC8M1IUSxBMh+yaB5EP06/ac7JUgR4o0rcO6HoHXC+Pvz81WZps/fN+cIvq+FyZeMa4tv5U7DJ+kibp7VejbRxFkLGHScrcWAR7wRoFbOwoXbk1B6Obz2cqKBVVnylOexXeFDCfxyauCU7Lp0Ca5r4aRCt4OeaDsPdg/XwXodL5E0XcW6wQ01Wjs9S3nb9PdXqA8PItsaHQnLIlEhS5CFdp5oME6bsShjCG9oBZdQahnJp+c0fAFlam83G6jUKZD+0z9bBwc3jissjJf3Dl1O/SCkt8+p2GSO3T0xe5FQ5+g2yZD/80T4fAPO7bX8s1f9EBB5C4sbO3UIRCQJ/ZfJHXfcSTOD27Q7uI/m1sYKJhIM+SZAseYGMqWw+t+Mxe9vPyMjnwWf/3TmrQRhGu5UAjpTDT5QgxPik0nn4Whrp3mIOYq8U1ZhSDvNjJGil/2lggZc2FaDIlO5e49YGMCpfju/iLYd3atriMrQwcgLFMyhfQJ6aiVwFw444exmWZ7jZLVrQAFJlqg5Pen4WOHWTT+E6 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iVI8N7LDCvyKXab/Zsn8eqwbDpdIc3L/dqdLxCDcxIzNyqqqS4M5HFsM5Zks1b68/tYQVVFaQQ7jDPWqsHNaY28g3jhyOwEtxKrRZSPAYzME/lxRwGG+RLD6BO0aNSCUr9Bt2lAj1QGLZLYUqQz/SsEiwXLSziVTyG2ZKX6DewkZu6BzPdiOovPHyl57hSM2iSgtSS77TtIL3DpW/x2OmeTA8ES2XdAHDrgIrVyxfG8SX13+VkZ8l+c5ptpL+DMYY6xIlcO726yfh1Aaxv8ZCZwLHrtfSQGwaKEdY1w0mFrcsbqwB1DZpVOMBWDLYxyus9reTft1Ym4h9X6jlnhp7QkFX0o95pR+qYvUiX7eplo4Yj+7BPU0I3OrTwhagKEixcRw3tcXA0SCLoWN45OZ6ok8rx0EJfOTTAsiIl13WV2cDf7OLdS/YJw0g/He41x1q+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ph15/qrqWhz5jZr465om0C8FKst0YBS/kcl3Dn+dh45Et5lPy1Fye4J5a/eOgshMUY8VdEJ5wa8tL9GmoSRXutRYatdjEDT67wjHGhy0bdMKtEG4nL3eEi2I/2e6NhqIZOciM6cFYL6uXllf+1cUYYKS2Ypgkx9ljWCtpOwZvTvd8oBs/DStvydu9ib8fNXCZzSMwdA3vcELRSk+6pucLqxj2hF6KHjTqii+txYW9JXApugpN/boohTbYdi6YsnsCR7uoZNqwWd5NIzDQPaLHRCMKf67phUmTydgohV8nOdWeudGiMgDfDxkAmftdbwRIRAOBFDZK+Dxu6jKH2yIIZHB1PHZHDrBJe4BC8PTQcOMfe86JdrUQ8bHIeYbzcToeUUKD+mIPEUvA2dayPJfyens7Q9kP4gDhtrPocDq1JAUuvlFJX52UIUUwibUGlLEzpwr7Si1oO5HoTBtbkaYC8BirgI0I2O+dF4xcErSe9V9F2amxrW9i8TSOJOtWmtojsI/fdxxlIii1Ox4M5dIMfxz3lFwsITHqvXwVuMFd6c4bKcTv5IlmOf/cDwqY1q/ekE5TPhIGpyy32zHoUWclgdJKxpqLmROsvwwEz2LazjIK41Qbo65PcYXjLB2dgQA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 532b585b-b3fc-4425-270d-08dbdfdcb52c X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:43.0906 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9nuEOnf6vkSt4J8EItg2d2lx2F8rh8Un51sEwch5QB9i086pEHJV5pxqUoX7Q1QnNeuiu+rLZujYeBs4yi9+Gf6YvluBNKvGi5pwpf7CWwY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: UVGXckBUdH_1Q8sPGEAs3KcQ8aoyAwzU X-Proofpoint-ORIG-GUID: UVGXckBUdH_1Q8sPGEAs3KcQ8aoyAwzU X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 5CE7C1A0009 X-Stat-Signature: 5p7uqe9d66jhz7o4ofo7ogigx33ca1ax X-HE-Tag: 1699394352-422214 X-HE-Meta: U2FsdGVkX1/K1J24Jsjuxp5u7CLb6L8EL04MpulmR9PqEYBt2qyGUb930mDfsYOiiu0HfpNBUfQpbuh9yhsweMsaelgNtRqo2cDbwQRczzupfa9lG55Z78k27fmPr3XUWLzXuQtc4Em85YmGPEbDhihzh8nXD4bojc+3zGZ6iGll+LMmRvLZFVrBu2u98J92BmqOQFK/TauW5oMup+Fr8d2wlYLk19Os7QhO75tXCV/3fF6eDOnN3D5rACZPbBaPHW1DtMd7zAmSV1yQqmsy+t3k3fn80uBBzwDSxJ9+9Os2ARcWK8JuwStrSO2MJEMd/zoB625z93mnNuu63Bbl5tOIpfosxaUGBqw+blDelVffzg4V3MqBswpKC6xDA1dGPNq4+qfc0vqlxmntLpqfKJ/s80wJCVTzUS4m02J/nhwEX74NynHbC8APPkuBv2zwTluVAX3OAcdRlWD7rpsXmmaI7uqE0x4ZCxEpxdRF3o5p57hE7G2ywvef/OzsFPCtqUo57J1q18/UO5D/Q8wicTfRDCtJksRCbwH3IXfqK3vKkerZaM0McuIy5a0/jYDnaC7OT4Dq7OtUQWa94yDyJMzH6oJKsWvlp8j6n/mIgyCIv/bqEK9g7j9Lhc+7bsZwn4fJmPxa4CIymamYNX2U0oGipVjHjUzZN1EvFQZt4X0VloTJDRAEIFZFvNxRKJfwiAlLVKxOleQNFZKanwVOl7b8IcVXHqBs0te6FfE86Laqsrfq1PKR7lXYyD+ugtyz0inzUM4OP7FwKPx+UQWusdyGRWuFrQnoLkJVdoponBtn2JcZr2/4HtvU9UO75M2kqGl1WeNfta8zzPlfokwcbUXwkGM0TizDgawdkM3HHg90GJUtiMObe+nIBalmVQWSsDbVa+EDyRdF3Wu+2it4ASkNB32RgCyC96+EPUOh9h7AINIvvnF9cHLXuPKsfpT0bM0kbum/cUt11VEgUj+ eupIYzKD UNUe5bzC2IAp7VQREooXau0SwgnJCiiLoSq9kvaxZtoqgQDKguDqPkFuSOVzzAd2K2LPYYLFHihzNPGBuHUcmW8Wb2EsZffei/SlLsQv8wLArgbyDAhcQuxYDplwG1lewH9edaDh7RgG7yITqeYAfJ/XQk/sJNZrOP3K8oHe/CrI+VgUNIahWq9nUln6sNPRklVz2NLaHGqTogoM8Pg2w/gb8hUR6QBSH2wg5n69XQfmwPRd/0Vy9rQcxYtVhGh2STOjV+736dxykAr8WkVy/S2vqi/yJhdVoBvRXfLeE2WjZ2gkLELSb3Cv4/TIIY8/H5xXbCPtGWV/7QShrBDxxhp4LxZ1kWjx6um6HzMSvpQi16DDzkY9bT44eXcwVDS5IxTLfXyivnRWthOO0/K+rVVTgLnsqPcPgaXCMuh8pvw+PBcurYxgHzDDrX96Afc97ezTRj7L6ywMgEFHWsRRT0CK/YQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This is a partial revert of commit 9432bbd969c667fc9c4b1c140c5a745ff2a7b540. We keep the static_call_update() type matching logic which is used elsewhere. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index abc95dfe0ab4..e0bbc2b0b11e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7027,25 +7027,25 @@ static void sched_dynamic_update(int mode) switch (mode) { case preempt_dynamic_none: static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, (void *)&__static_call_return0); - static_call_update(preempt_schedule, NULL); - static_call_update(preempt_schedule_notrace, NULL); - static_call_update(irqentry_exit_cond_resched, NULL); + static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); + static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL); + static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL); + static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL); pr_info("Dynamic Preempt: none\n"); break; case preempt_dynamic_voluntary: static_call_update(cond_resched, __cond_resched); static_call_update(might_resched, __cond_resched); - static_call_update(preempt_schedule, NULL); - static_call_update(preempt_schedule_notrace, NULL); - static_call_update(irqentry_exit_cond_resched, NULL); + static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL); + static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL); + static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL); pr_info("Dynamic Preempt: voluntary\n"); break; case preempt_dynamic_full: - static_call_update(cond_resched, (void *)&__static_call_return0); - static_call_update(might_resched, (void *)&__static_call_return0); + static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0); + static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); static_call_update(preempt_schedule, __preempt_schedule_func); static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); From patchwork Tue Nov 7 21:57:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449386 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D96C1C4167D for ; Tue, 7 Nov 2023 21:59:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 71F0E8D0070; Tue, 7 Nov 2023 16:59:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CBF58D0066; Tue, 7 Nov 2023 16:59:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 460758D0070; Tue, 7 Nov 2023 16:59:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2F3A58D0066 for ; Tue, 7 Nov 2023 16:59:18 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 09CC2120AA9 for ; Tue, 7 Nov 2023 21:59:18 +0000 (UTC) X-FDA: 81432524796.03.0EC3FA2 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf29.hostedemail.com (Postfix) with ESMTP id 9D57C120002 for ; Tue, 7 Nov 2023 21:59:14 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=hs2EHaxp; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=J6VmkWXp; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394354; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=f1g08Eb35v1Dd3lma6dN33gLk2SuN7jERIr9SeS5DdA=; b=44KO+0hdhatcnNXwDAIwJ+UTcb6lwhqiCtmJEx7bvIjyADhhakiywjI5Pw+amUi05fesHS qAFdyToIMY7XENJSdguuGvEcfiS0IbZ4e0koYTMB1hPGcLu42YXJEIy+6K+m3GC9lIrAgJ cfJZttEnEwKoP4m5FFgbcBE8Mfqj4+k= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=hs2EHaxp; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=J6VmkWXp; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394354; a=rsa-sha256; cv=pass; b=KM0xtxi5oTWQbJvwmpVTwsj7GiM1Ef7upEEWi6TXW00lq0HBvRD7NU8XnkzfZML3DdJugN wx3rw03XXiMgivKwuCq4DjmgSyrrT/uTurCQEMyGhyOqNSquryRk80+w7T4/JSDv87gMmd nTX1pzcgt/tz+eSXJHsx9N5MZ4qTmZ0= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJP6K004600; Tue, 7 Nov 2023 21:58:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=f1g08Eb35v1Dd3lma6dN33gLk2SuN7jERIr9SeS5DdA=; b=hs2EHaxp1mOkiGixnjNgVAzZiT8/ognr28Iczp+3ZAu9czv6HIkWQNyyWTW1CtfJrOvX sPZiWfWN9OP5KUjnvFs0YOnIlXwTnD14as+5AhzYVy0V95hadVHBKATy5B8ZIR5w+C5t Qb72Hj7XAeA9b3qozE8tiS7o0/Wd5YWbBNWwU9P5gPDmyX/LB0DccxphDlosJrE0YcB3 50IoUxLZOUQJho16YRZrI+omJZay8FBWcxWfMRYxTUgSn6QJJCYC2VKNf/8K5TC9lva2 XdWfFZcuGG88H6G+TaBMNlHFONcCjwR60+eoToPVsdRLWa008Nj+5VB29pOCjl8qkqJc qA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2bw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:52 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJC9t032033; Tue, 7 Nov 2023 21:58:50 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w221g15-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZKmkyYTxEOTO+XCH2oMjCCZU2lL09FTNtc9bt5EPY8PRBZQie71RtawkZcUw3kkT4zqcbOBQL6qk47g5z3Ftl6j//oQjNBy2rhzKZuDUr9pNgF/QOpMhHjBqeIOPwnz3RY9dh64hjMa3ySh9D6Oi+rh+FPjAbJ69xRYhbZCi1EQlFODRuE6z6HrMNOag17d5XbuCt8A6wlMqg4Wt0QZVt2gZBxyDCv3nbl1jMs1Uhp26enSn9BJT2o7iS3ylyIsK33FT+NSC4ZivVe6H9MwS2GcyJnzgTPknyZd7RgSpfG/EssdIpHhHKs4c4jn6SqahZLboOfgveA6zhqEDv2ZIAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=f1g08Eb35v1Dd3lma6dN33gLk2SuN7jERIr9SeS5DdA=; b=Ss/kt7QOSrQ82dze1j1iR40ut6fwmFJRzP6g+Q6+DMvbnwtVlZ/zQHow7GTIh8cDVDqkL8EnskeFOnGLQ6DCJaPHN7bozGwfqpVxvZqWgla/BIeJGSfoKeMH8b3t+4mHHwjkbjFqmlflXh+3OCSvssfespVJOoHZKsyrhGqWVyWdJnJwkJarUaRsJNZnrUjr65b8gF2SbTIUkryPZr+fD872qzBElVuLvk7U3BBdsRZ0tJNV3L0b1bwSXhSyODcq+epi2ALr3G+ftxJ8R4STjYu5r5Rj0pTCZa4TpA358nro6X/jHrT+rsjeod6rXhyNJOGGL66Z4ahLHeQrqg1dbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f1g08Eb35v1Dd3lma6dN33gLk2SuN7jERIr9SeS5DdA=; b=J6VmkWXpTTWtHnNybsHYK0RX9++2SrEYjk64sLK66lg5TFcI2tDepAx9nMtHdQOYTa4t7MmObajCn6rbE66r9fYYUpZCdlGrMeegzeBarn74e6Vulc0JzIIFOKaAu7XA91aTxxbc0Txs0gcNfErtLh63wUbVnT1LiyIdcxfOSCQ= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:48 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:48 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 21/86] Revert "sched/core: Use -EINVAL in sched_dynamic_mode()" Date: Tue, 7 Nov 2023 13:57:07 -0800 Message-Id: <20231107215742.363031-22-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0348.namprd03.prod.outlook.com (2603:10b6:303:dc::23) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: f08bfcdd-61bf-420f-9a4b-08dbdfdcb85b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: suEH1UZM50VEDNLoMxhdiyuOXhZqtZEIo4/eglHTv1DemFogSVx5Py0P1KLXintdRDE5CCYs7LrkFONdsBsMiGkiwcQ99hIc6Clo6T0KS9WgxNiP85s7niMoXsI8wUV7I+YjA6XQdurUBKnQLTIZ0wGRcd/vN/zsEcxEIgS5psGKaZB+VIt30/3BfsYl7AUeQDWVxFJaCkxaLjMv+FeW8jxWPiUoRn70RYUextex2clcQ2YyQExaU25/HtyxnGQEnoeWhPcuLDABXRnHR8xwlx0TvnmV+vEhUNh6J4LFPRRBBbF1HLE/Wqil8W49JAxdSr45Q68SJtigA2CZNNn6cAaJ9H1Ak6aKgOik8Lk9iQud4ND4QX+AiC35OCqPutEX2g229nfM1UyN7VAtLuRWc1e1bWnxe1RXtEv+6WQtXCUBw/Dk905s10FW9yfHj7TKK6RfQ5jHUwU5/J2fu5Me2RKkE7zQf8EkRO95EM+I4eh3XDrPXLQ6kNmtc+ve0CLXA7py0bDcb4Qz9OhPfXtewNNAxXeXSj17ZVfrB9FFnKgnFvPYGyfkdsP/f+laFqSW X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(4744005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FmKeHQBR2cWsAS9UJXL3+AdcgcVehkFoLtji/PI/r8nX0bLMkjszRlP42U1L/F1w86S586ypuGCqCJpzj4a2kH0kaPchiUTvjSDbfT3tDP69Ap2uDMgNgyztJwL9varW8WSuKQuNHv1OEqsIE24IYEoJ8M1zSSCJq3ql2sENl/rxMDiXaxbToub5cMu8jS2BPV4w688VZW6vmjGm7+qQrx06TxiUVgBbHKy6S8pIfKJ3KCoDT5YBiEAiGfFzIfDqO+pRQqHZh3fw20fwSujIwnYNhe+9bWhqidzHrcJREAvRtlzGV/9h6R7SjYEARZ4MJhjbG6qg74DbCs1bLwfp+l37Y0jaGj5D1cM3fXDM+V494iYzmDl0HiRnhm1TB/Crfuu1ATEBH0/lemyy5Y6e8RUVqaQPFY/Kewu56OICWWp6HG69GrmScKdioFh7DoArwU6jB82oa3QMWvSK9kjCgqQ1NnTNxT5thf5CYkrF3Z2y4FtY0WfGcEu+mD/USxNfIjLFNMjy6t1nczutZ4T6x4j3nxCCiMGqOwRPzBoOBGflluILUd/AvueFNzbkLlolwlBLw9762n2PpqkPNhZRoZ1/tZSDyWCUoWwMGLX5PvQ22REsa0WLI2tgiAcm5hGH+LieQqDF5Kl0dH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2SrKkXEsh16E/TvewSZNSDEEFJ4sfdl96bt7TS/+n2b7pMnkjjk34dAPpqRozE8Qhqjkr0Z4/ocB1PwWk5a3Hh2B/Wk7NBKY+dqP5wLBVfe4Wb9O3nk7DxoG35ZWNMv6dS+Z8Usf5DjLefQTNuGO0i5UII6oxlt3/kvA8SFO9YYgtLv9RCv1uhHaAE7ukaIZwItY6RQ8OAmzbbq1q+pHIuiyga2gQ1jXMrcsG+G021qRn0xoK+AhzxYiASJR/DXDdPoN6FgXKMmUQbPA7TZFd9a4dxxwjmwbmqEExyB7rArpN7jItXsHRIiHDsbaoLvCu6cCAS0vyGDAHTsm4s0WLbcL0ZoJ6pRLGnSPhuQ0GQ0MhM9/2O3N/5ljCYPdaSbQhsyPpGzkDvV06LUafdZSViOds06a2sKt/NV9yiwT143TfccFd71SC4YTOcFKKKuVG9A== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f08bfcdd-61bf-420f-9a4b-08dbdfdcb85b X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:48.3166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gqKTh3CYx+ZPMVFUcBH7vWZMD3f9deJZx6qGUc+79EhZSLD4AXoBggf38Uh2eLtuV4Gj8h34jsuBwakTRII6mEu3pLTRe6o+Y4LPJI0qn8w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: h1BORujpGK4_YWyT2jbTPAVf1NYompbC X-Proofpoint-ORIG-GUID: h1BORujpGK4_YWyT2jbTPAVf1NYompbC X-Rspamd-Queue-Id: 9D57C120002 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4rd1yzgig7qxapxc5tr3e1nhjudqjooo X-HE-Tag: 1699394354-124296 X-HE-Meta: U2FsdGVkX1/skaAsNc7/1y4MwR4g2/UwAXDUgAtpIflx/aKoihM1kUh/tpl7IOxjFwzVvn1S+TzA7CtZ02jp3osSnPrXixOdvSAjiNPc5z472HiT/b6It38HyBfNTfMhf17l/wwOv3f3ba5VOQtOCOt1ntKhEYP7hVzt1fvm/oNrfmhulzAeoFf65cMekvs6NMUb112bxJeGgY09Fp3S19gkxt7kNdLCLpxs5AJK73YS4NAc8dIHd7Fhf9qMv2ooe6rAXfBIMFw9qxjRDUy0W9A1pXcth5Kx9iVXm+rE33khT5ee47Bv+SqPrrIt+a9eyVLmAoeqdEQFYdHOqNbxm2Q5K70pcgdvG2q1N5FriRVlPaL6VrDsHN/8TCIT6r+skm8BXq5nQN0YfQgdXZXzS82eG/1s1pa8Hywtg7nOwSXIy7CqilME2vwZ9hCO17xV42lPvpo0rssswYZmRRCjoCm8pFfevL8ZN+rh+eJfU/et3V6N5bMKEEJ/ecMZraM2EPTCBWsO/FqmUBaP0z5ZU8IKz7lPPhvm8dcnzk5GQTYeN5OLNZDjn46IY9SSMBVSDiTt/Qkp86ZSMyW146nNXurqoaECjlApcGDvNBEWYEIV9ZtAWC8Apt08s/0RyV8RtvRHFmMoqRWLC9aHCZd1BeCnUpFFOQhlJJSMUP0/47KcqBSfg2/RgJSK7S+H8QsDcdWCoSaobEkxw7fEO4MdWqv7aZOUdjaKngcMAtRHFNZ14DENHkh0FcwvdVMvIUL9SVs8fU2sqYp70sE1A6ZIi9p6WhaGB2pttEwugNhwSJYWttVIYu5HdyDB8bPjsee+j3ips6+kzqx7cPWof4dxQhBI0Tltt4ZM1xqNVlVV9jVeeFKZngytjr3XNP5PVZcWd+7PZ8l/FcjZk3VrzGnxSBojrecje1Znt0/QuFlyIl5IuW371eI3DStizJPzjdKKMaP/Tyko+X3vtT7YDuI 2ZvnVzIP O68peSBX34I1FBc0ylzpuzDDSflp5BSVnju6GpCsT/5EE7AJOQUJuufkNSfKhUVI1kPJLllImLiYfIye9Xbyf3Qq8N1fIywbgLJYDXq2tQSTmhthsRVhhlRDdLQkHR/8uRXAz9FyvJHC3AVrevqzeWZeoTRXC1+6IlaRWuW4TrsN+dWTopnkWoLPcl1Q7hKX2I84+aKq2SQiyLYN1ylVM64uEQw7PYw3TbqgdTJyyZpcxdC6oV+jumWjJT4ZmT/Ei3B2WWCXkZH/y71Lm/vvrhV6fbTWp2KqrMH3+TMX10g4T412WoGLqWT7V/N7iKnwgpXL69w4nAtqvhkNueualue8go/ggYAe3hbxj7jPgESG6SR0ZNdkDLshwnl/kyjjXgnqOIQNqadgfXOtHzBRNd5scUx5CetIXbUWYCBSynC+tN46LPug2qFjUOHHkCIu6oP22yczsktDH3FyF2umfGxIpSg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit c4681f3f1cfcfde0c95ff72f0bdb43f9ffd7f00e. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e0bbc2b0b11e..673de11272fa 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7009,7 +7009,7 @@ static int sched_dynamic_mode(const char *str) if (!strcmp(str, "full")) return preempt_dynamic_full; - return -EINVAL; + return -1; } static void sched_dynamic_update(int mode) From patchwork Tue Nov 7 21:57:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449388 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22A8FC4167D for ; Tue, 7 Nov 2023 21:59:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3C0E78D0072; Tue, 7 Nov 2023 16:59:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 373168D0066; Tue, 7 Nov 2023 16:59:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 127938D0072; Tue, 7 Nov 2023 16:59:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id F31DD8D0066 for ; Tue, 7 Nov 2023 16:59:19 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1693380BC3 for ; Tue, 7 Nov 2023 21:59:19 +0000 (UTC) X-FDA: 81432524838.24.B7AA919 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf11.hostedemail.com (Postfix) with ESMTP id BD9F440010 for ; Tue, 7 Nov 2023 21:59:15 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=urnGM1di; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qumvcoUr; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394355; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0QNl8/K34dXXO4olXEeV1fgO+qg6/8wB4pTXb+jU1wc=; b=GBNzgFYqiozrIjDBsvGHJnApdzg4cQ3OHc2v3Tgx3Gz0GV1yz2I9ooO+zT1BPjigGXLR0o pO2VDE+oKW3HRh3SAnOyg5Att8rGnS9wHmlhI8w2Ftjvxz4pO7wS5URMsz3aXnMEkMzhV0 L2fTgQaNuPWTVQVWsDegA4lwgqSQrOk= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394355; a=rsa-sha256; cv=pass; b=CY2qTg3zypAuxBrba68lifBDK/BPumyjWum4OQPb3bbYfBiZXHaZq2jMAkvorvK3UjpzmJ eb8iw45Y8F7Aw01O3vrgu64nLU2MlYq+1HSwqfluh8d1kgXF3RsEl0zhIVeMXvHdE+JDXA fTcFT/B1BfirBcURp+DpOycORYdwJXk= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=urnGM1di; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qumvcoUr; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJP6L004600; Tue, 7 Nov 2023 21:58:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=0QNl8/K34dXXO4olXEeV1fgO+qg6/8wB4pTXb+jU1wc=; b=urnGM1dib95X4t0O3Mz5/zAcljmDQIlBFYGf795UhXdDQWqEhqPQwr6Z0YrW1G6MyfEq 8cz4raEyO2RYOUIuxU8D3djOw62jJgE+dzBb7j99JY9fsmpsxMPo8x46XQgcO2ev+PRp vESGv/qBW291crq7vQHqUbaTMIrwXtAKKO85CY989R8ptoNmTgP34C8+p2BboL8Ee1lC fv4UeNbx2CUhnFRTWX21eyk+ly2aIYTkNVOuSp/1tD+k1Bn3+cR8BZMHS7NLaMiXYiDm EcCB5mSWyivRjSuK6liDZhXxAGfXwI8Q71H/2IhIxAuIMvGbBCGgg6vsGQSBCo+c35mr MQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2c0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:53 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LItTM000430; Tue, 7 Nov 2023 21:58:53 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wskcy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I3wzFXgWyKvmeZipE6NooHTwT9JZUo/LijTyTRzT6xumoVjBxxLHFEM+iURMbu19jhO0mA0Sk2SNWh1bmd0yws4Hwm7wpYTke9I+TaBdYgwNoJ2Hg/pgFdXl3W4hFGwpi2c4dtdqpn6vIRLyei8VhemTizNcQjPQN3I4br2WT/SEmf5dyE21r1mCMoYFyHa1u8UHv943Q+jOMrad2gBLLzxZrip4hkMck7+ZEc2lo0GMAW3JgjdqN3fnXTNbg3WOoI3HogS2aiULc1nE75pkVfDPXBD2V0yvIcAtOj2xgfMepFHQyfXzZedi2Wmx9ViTXB6fAqxOe3tRyb8UKmcEmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=0QNl8/K34dXXO4olXEeV1fgO+qg6/8wB4pTXb+jU1wc=; b=AXtB6rda9rLn9bsAOcCtaDvvXZA6Ai79L8NTNw2FO2ypmS+5nQEgdoOotBrZEYw3UKMSeAU3rVaCuFo3qy/Rqs7RqU09neTthvutJieEzzsSebkcx0g6ly0peU/o5Ed9RooTnzGwaBXcWhhInscqaLETGVWUO23F/VmxlfgfnhCADACKMSZcidoHnE11VQVyVy1BS+FnSHEp5GFDy/G2brZXjwaL1l23XLf4Jd7QDbOXj7k0rF6Hdjnr9A67ayrGkp+10B8+s626Cxg813SSYj5ONADE7PP9DzyrzPJnAcIqXt2bgROfOypHdl0ifOzWtMWwwB9gdteuZRe01Tmb4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0QNl8/K34dXXO4olXEeV1fgO+qg6/8wB4pTXb+jU1wc=; b=qumvcoUrFCKj/jBzFIkGnMoUPU5uFa3W3+LaTniwD26l1QGADtjCjliOEMjuC4Wnp8BtDbvHXv+htb2LQf3Z3vL15Ld4k849BiSpYovfSvJgTd4+Zy2b4A4+k3byzPgIwL8CzRfLlS+MqWO4yXd6ns6gQ2iqLCaI56G1oliKTfs= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:50 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:50 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 22/86] Revert "sched/core: Stop using magic values in sched_dynamic_mode()" Date: Tue, 7 Nov 2023 13:57:08 -0800 Message-Id: <20231107215742.363031-23-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P223CA0013.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::18) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: bfd85dc8-e0b9-4c56-91bf-08dbdfdcb991 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sB5YaQIy9UjhCF0FIBj8pdBQbaahg8IVrtuG0WIlEITh8gUa7eSORZ8wdQcL3T+ePBQhSYTADbF6+1y3jprXLg7iUeGVSKXYNHt/khxgzzp7OF9dSNnV7+zRFzV5XG7ZIitxkvBxdAWD9VJIIQHaRitWpAATV1MNCUSG1khfSjjxmQ03jSzmisR323KBFcSNCCtlbDh4uOF/yOS9px1Kf7chGq6Bz4ZrnVkOcJJ7yRNVdx6f58wm1vx0Cfi7gNvQkXpME0g5fOQotRqC/Fzz6zGQ+ACqtmbifFaWsPCIvxx7KVkqIvSLRj9U4v26mgQqQbOm4UiGMwgA9fkGvkGKIwTNfcdodrugAFvndAoR18yn18YuhhbYQ9wdOyfizFV6SwNxxkLaBdtfMvVqXypt/78H1U1wr4vFSZANWHk9NePVT3ziFk36+Fh/+o7a/aVKQCogw0tAjB/QkvSvEynawGYMEXNRYaEJ0PyyO7Rbb0wDtbvJ1nTuY+urrVMR3ctHwhLuPsUF+/O25ZZhFu+Lx+lsZjqhPeAPotSs+55nGzbGtvDGC1V7zgNdGz0vD22y X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(4744005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +A9pe8CbYQgdIKVAkQwXSX02Yg2OjuKcW65GOuNh15dOt5lyVXtYm1wiJn+NQFAUStGclKWt6LPWgweT3khMNmDimwLmsIDxBKrnydIn/0Bvik1NdfI76a9bfiyXvpswmpoWv8fSCp05izttXqDigX14ixWZdgRQ+yEvjq/Gwi+yqVlr1BtYo3VHt1fnAgLJHSGup75gY1MP8cG7Hvo8HwCL9diNc60jeAx6srFX6NCPcJr8glZ2VjDJWuNr/LlXEuMmrkT1YZJ++6QmWfwrwxQOuKa4aaJg+NVdyrEgylyCoiPybr5c1PJiobsizOSWF+orpCSqExvwWTYtunyyssQmiMXsRBuKQ0J3IBa6IFAethgNPU+5QykB/y0IoXKVaIR8gPz9rplI785jbxW76kq3xqXvshVpRO/9s6uVs37vY36q8vz2RtCtfeMoglAkAWkH9PfwXNQfgYpdbBZVKVuuVIUYqTatEdmJpSjdpJhPwhRVFgdU3CDa+yDO40RTCGOP+2jbpvegh01XkGaOufMzOcWZxMoXq9JpX2wVuLDwRbRH4aAotz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V3lBh+suBRoDqjZ3Etu/2e7FsxFeMiGAXsvK6PkGEzxpNf8ppUn+hA3mu10Ofn2QU8nl9NJVeR98eCGuQ+r3b/WLHhEHuUTOIwRhqmIpYZY/bI9rM65WVrY+y2hnPSfYy0o20ce68GSGMIiHwCXUk8nUCwWbZFgiBIuvEvr/QD/dk8pyD+TL0bmOEUp6gun73n3w8J/7yWQ33DuppEvULboMMbjo32w9LxLsERsXYZU3t16FRUT94s99cGn1wSoFB9BbZvKCiLa7q/oYvrlBdqzpUz7luJFRRnm81pfz2JP5l0QfkUxUiJh9S7uU+dHwP0AxpY2PRm1HIkxvtIzlG5eeS9xey2nRujnw6x6YZtmE7BBei2kQS95g/Dso/oE4FbBnFOm7cDBG4Q8/kZrS9uMJIPobSA58PE57+/ClNokebfyixjh0eYIxu4UNNc1fR4war5L0aUvTsAjd8+siVDMu43D3LJM2xINhrPhVX3IxB6jULiSkidrAPLpvJm5FE+jFGq0Me3eys3oyzkLSgWDnWS/VW6A== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfd85dc8-e0b9-4c56-91bf-08dbdfdcb991 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:50.3813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eTyBNCgaeaqMtL1WSXdVlO5033PPD1ydJf91JuIkAQyPgaXSQDl9iVm0Y+wjxSsCBPqv5+31r8Nu0JEhawA4MVFzPvABKRIdsb0ZByyah2Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: mRwN_D95aA5dNA2fOc2Hg6NsnuU4We8i X-Proofpoint-ORIG-GUID: mRwN_D95aA5dNA2fOc2Hg6NsnuU4We8i X-Stat-Signature: 6kzajpzkryt88mxdzqy8sxbx97etmsiz X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: BD9F440010 X-Rspam-User: X-HE-Tag: 1699394355-501754 X-HE-Meta: U2FsdGVkX18sGIqghAoUZjeq8EE7qruxo2KwHOlyIXeYUULR1CrAfc2i3DBa+vr0CWO0OEAMGS59mkD55U2BnX0BPI9MhMb0xf41PX9i9Vc3a7Ge8aS8KKX1Yfo/rQ24kqxwdZeS3wHgD/XXbPC7RHOBdLBVurl/lIrQOE4i8SBMxOF8zyW2WRqxjpW0lzrHuIYnCVCqIfLwQKsOQgGBWvzTnbqylLxMWDi2cHpceUav+M1u+A3yQ0ohzlsoJHEHUi+zwBdU8odT9HhGA/iwTDPbYe/zs3Fi8MQbMQvt9pXDNDrnbf3aSbQTtIrHmmJL9N1kteux/fW424hNn6QClkUu7CINz7uLaDGxRw8aq1d9UnEEFbi6qcOzMDU3RG0P+6oLWKFoA7jBhlcqx00KoAISe2/CanvRwT2FPrx3urq8/xqztpW3jE+tYogAoeDD7f7hk9iQ8Efv3CQcN1O5XerdmPMHncd5vtHm42t0NK9UO30fIGRErWyi68cmT3mhaXhw1C81xxH1Ia77W9GtYlVvB4b6stQILkc1qTvVj3FHSvilrxuM0HZmDEknIEV57QSjcFUb1OvdHeTo1JlcZa7cOV5QzD8hl34sUWwpLk6ZPKEH3NYm6/WFOLJUF/lE13LmEukzROMx77z7jZy849kOL9EM5v3gHJLRcmH+uYs3Qp4Y5+AzmP2W4M1gT587McKIaTpiIR6ZAeUi+huHvw1pntSk9/IzKe4eWlsWMFGKkylf6QFkmKOwAiCi8W9EqB+N5KSOSYlN4DsInNOKX16Y3aWVfQIl0zVDO71kksG1b++tyNNkJpiCFkIjE6WF2z2mqcToK70eRzFG/tQWZhXm9dwsvvF92wvk6bD6pkPowitbndUcebsc5qDwd/E5Kpj3AJs01r5ZbaI9qhskTBdhUfO2ae5XNKotOAITQLdC/Pqr2BnlTyEmrMRt5N6xv1b88F/5J2VwN7nJhVc WoMETVaH W5C5uiNLK7hs1aFqZMA4u8OxgGh41y+npww4eDsWrkNrQoSAVossxrZtojIOHXbiyy1bzSxvKDT5m+WAH63YVzVgDGlWqQdpNmIf95n5I9gy+R0ltxPfqTiXs4c0Uk+z3xuoSu9gJksL25S6SlCBcrhhmSvHuNVN0yA2vFZzka/6Z52khL8b4jEDwl8MkB1jY2qT4vlOYdRQu6ocLj/jlEIsg1zm69ImBIeSVJXu3yf8RLZRVFp9VnTvz+oZYzUmyqDm8VIWMtsTDBo1vkACW7TJTTk7SJIogGXZpT4y4w1NdArGgbcc54Jh4eDKbdVocv9MB+ovhUeykMcxl+ZseFnciJzHbiiJiKAv9XTBt2NYYorgfgVRmcUwODWLSsaXDy6E2WWP6R7gXpVHGhmjsSmUfH7M2/4MvfPhdd53ZJ7N4pS62FvdVj8aE/yBaPrUm838oar2qqOk+RWzLn4xT8lFdOA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 7e1b2eb74928b2478fd0630ce6c664334b480d00. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 673de11272fa..bbd19b8ff3e9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7001,13 +7001,13 @@ static int preempt_dynamic_mode = preempt_dynamic_full; static int sched_dynamic_mode(const char *str) { if (!strcmp(str, "none")) - return preempt_dynamic_none; + return 0; if (!strcmp(str, "voluntary")) - return preempt_dynamic_voluntary; + return 1; if (!strcmp(str, "full")) - return preempt_dynamic_full; + return 2; return -1; } From patchwork Tue Nov 7 21:57:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1736C4332F for ; Tue, 7 Nov 2023 21:59:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 06A038D006F; Tue, 7 Nov 2023 16:59:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F33BC8D0066; Tue, 7 Nov 2023 16:59:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1A798D006F; Tue, 7 Nov 2023 16:59:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id BC4B78D0066 for ; Tue, 7 Nov 2023 16:59:17 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 927E4120AA9 for ; Tue, 7 Nov 2023 21:59:17 +0000 (UTC) X-FDA: 81432524754.05.9461FC0 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf14.hostedemail.com (Postfix) with ESMTP id 45BC0100006 for ; Tue, 7 Nov 2023 21:59:14 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Z50LL1F9; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rIfwYZIE; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf14.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394354; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aimXOP9BDsvF0+TWIwejvrXImnlnRYq+8BzSM1firg8=; b=Fu/mqJp2rr2wiC+gu32wrPI9qBHmdV6f1Eq8kJEJE//JWUAmj/QDRTyEunRozumupHTSJE iUdQQN3NEfqLjSfwPTsQDl0/EP/ZJGooDLx/S/SYcdC85N7yS7Cun7O6g/pp+rXDiA7HN0 QvLWGlztixjtutY6P6/5ups1Wmh5kc4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394354; a=rsa-sha256; cv=pass; b=VSCVYg6qp5u3JGB0OuzopLDam75c9GFbj7wu0J8aVzqLYecAvveLDPSsIaj8WsnYlx6+2U spJygziFSPpnKGQ66kXQe8gVBLgk6qVZKTo6QGlyA6xmf4f/S5JN2d3nHOalIezyYGyndv VypQBWh6JGeJmCRKq1YOpAfFsrM5FOg= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Z50LL1F9; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rIfwYZIE; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf14.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpNh004902; Tue, 7 Nov 2023 21:58:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=aimXOP9BDsvF0+TWIwejvrXImnlnRYq+8BzSM1firg8=; b=Z50LL1F9ShsDRZePiyL3wK/wOBpsJk+LqXeEpJ1teVHsI26robeakI6ZcP7tYhzfCMQH EvOzfiPnhHMV1wgucvnRWemqjkNFjBZxAVw30SRHs8GggSZYxKpD1rPXcpTcMaFxsoMY j4lsstqXm7xgBXWCamS961T6EGUo2FqO56zEb42zP+ADH2XC5hzDRolxb5IpIsUTI9pC LAVs93MIqtqx21KNHo5V8lCW3SOih1NbJZZGbueP1J9D5+LXtGgIeChRd61L7PPUL+rw Gt4878hfCs/dqPFnIcDASK2mgPMwLJnedLRdZEgjEc0RzQWO0a00ZpS+5h4i6Siaz6MT OA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g2ks-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:55 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJYpj023973; Tue, 7 Nov 2023 21:58:54 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241fpy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:58:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T46e/6KqlNzWqVwFvV0El9OUHC7F8r/SmjRiJzesLEJZ1cYvKsqcjnOsvCMSmiWbDieEaSy9+EeDPbjStrnTPjMZ0EcNWdk38Ocr1n8DWq+B14F2gZmEcer+FjbB/m44FELoZH3u+GdRPBxH628gm/sE/KNW3dmc6NK/+t5eNFjrGNaqQbsiCdGjw86t+Dj9/SSLTwfjW3AuF2AeOWV3wOs8i0QebY5Rai9WDmuZaTP+e6GpmH8SAJO9yGS9sOwE5pyjZ+RAPqZaDZh1wYC1pDZUQCgkn/njkxrwkl988VGwel/eC97rQ/uSI8a17kxlTN2fgIA0iVtBTZHoJPruvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=aimXOP9BDsvF0+TWIwejvrXImnlnRYq+8BzSM1firg8=; b=CedbGH2yRQx2PT+JEqopNrYr4XMs3CmCIRs6b/iEvPV4H/6oakIBEA+/tNGHan8qxMp7I2KiKqB++oeB47GKrjwSwdiiHCF9OeY+NgK8XiH+7beT2ZsNSffqv9p1MS9oYU3rHjF6PuONLWOWRSR2wsZW1Wqs+2sjjrFWRlTTh7yl5TKsnQ/ghx41JMNWL4HizKNWNHSs4bWE9BwztUkpTFnTvqwH+s+ycdGhVWbMSwZhQzK0k0JbHuXpZKH2wFMuEM7YNomWoYCyoX0RWfKaAZedd7FjfQ6ePZQmn29UMokGpk8Ya8FLTu/FQJIA4tPMDA17sBG5VAPyLy9xWSXN8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aimXOP9BDsvF0+TWIwejvrXImnlnRYq+8BzSM1firg8=; b=rIfwYZIEzDi+CYv9JDtfFNu2cIwZpcJhnQ6d4zzA+SVQJxqo+KtrxA8ju7z33xY9HlJLyinq8vV2ifPBzm0SgiLO6v0N1apAUsbeo12WiiMu6Okd5ezSJILRdar0mJakYqujbTV04Sjyi/1C5RPcSxtpZddQV9ShduaWiOdaKwo= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:52 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:52 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 23/86] Revert "sched,x86: Allow !PREEMPT_DYNAMIC" Date: Tue, 7 Nov 2023 13:57:09 -0800 Message-Id: <20231107215742.363031-24-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P223CA0009.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::14) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 31da503e-3f01-4761-9e15-08dbdfdcba9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bqvs+V0fH50c1poNIXaylWVIagXey6k8YfleUVlmPrHY7xbkVOOzEfS9HmwZXXdgNdAc7o2dbzfU9lGhwxukKLpSsL1imYBexnC1VWCXRWL0rTwEyEJO1howtPhXKuqUr3lryx9nnhwxAhYB+eNIF2nlSzbmF02GIaI2pzNF8Hp+ZeDFlhG+Km/jcMDqri+P3b9toD5KWoO+In2jhmfXZM0Pa1vPpU2oB2LG8FGnNRcoa5Q8kcBFJdmniybT40+7BYAkWxcKxr3GrM4WcNxQ2XOeJgWFCwgUf3cP2zuk5iZnVu4NY0iNzIOL1kzoKWIP2/4Mqp2N575DEjJ7qZAzKRJHq1+ORzgpnZkc1/0IvA24iBzCz9qIQy7c8HJPHEQNRTEmc2rW7QnhTlGsugQTeQ0iJQ9iZl7T+7qcb1nkLDP0xovRoI6uZpJzmWni8rYnKuElZ9zFidPioH6j3V4YUWsniPjfQ1vKRe1AnGd5qiAdi7BV003DQC350kYzPdNRGIU+k2A7v6jal5UufuJXOfHj9zuuBHzC0uimNIHbWxnm7VkwQelWFnz31p4RJ72n X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: veJY+PpxfUXRXg3wYQf28Iz5Gp0oq57kMgM5S9B/bKIfTo+94LxG3RV6M7hzIN5H21wYV56uxzR28fc7Lw3ulX7BXZ4iPBAyt74DhuR3TKUQtY1nlLQdNy7Dz8Gv8a5VirFgb5m/DKrbA+aK4e97toOSVETgukeRZzznYksE8SKfG2Wa+b1uPTJ4fPQb60ZSbfaFw+h9bDuA6JjKus4ObkMWX+Z+uJrm0JBFTiLMXbIVSmhy1deQlSdaUBdge1nPKq7E0CIFE1b40jBoKoWrIjbE3PI5TDJHF5VwNmMMY3Eo1dW9l4iHpYvVLteqV9MX1KfB5bU3dAXpyj6ZxShNa0TqFY5ezvkKyjti8kVhsrAfr5pFHS3jpW1Fsr/uDl+DugoHyFF7eEfrdHzOgy/rW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cJ2jeFguVK49SjK+uwH8g/3WZWHH6RyR+7At2pDoFhG+vIDRjcinhZqTpNLWCbvOstviiaX4z/0N8MuT8qNsq3PdFa4h19/68iO/BlDznZu3FR389gvtgaJ5oEPcapXTbQWWfMptDEEjkTRtShOIJRqKisQ/carmVeinEKNZ26CRQ5N52Ai5MujpoFplNwHDNd0oesUsVVwcvhNhEkFZThlVGX2feFYr4OXEtD3Hob7SA6Y+B6iaMkZQhHqKqpqeXh2S8wR43yM8tHa743cD60h8xI7AW6ukwLR0hefYbd2sLYGWG7O8YpT9e6+SelnULFzuJmtGsLzWFfDHNxArjakD1dIK+ChyOvQjHziwmbyYCIx/dJC5RHK14STSyglDMGQvQnoRAgOreXffgqlnQA+IVC18on2KFdcS/ZHfmOaL09ihnyzrzIgtmVa/KFcA1MKfUY5dGbPNrKDCaXII0iw0H6FSHCqDzQ6x0BFn95yKhhh7L1DdsSBGv4mWDJG2SYakPo2lHGqRm+pKEjJjkjottJiUatr/tvdavv77TOf+80BrWOdxjiG66l5fvgmRXvqyQj8fFId5cb4tqhUKgMG2vWYyjlo+8iTowxFAs9EMJ1RVIauNyiYFFC/faGdFgJGOG/HKsTeIASnjopluWHrObDHViEHa14x4BtYmS03Ha7mrrJW/o/lSclw5oB/9g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31da503e-3f01-4761-9e15-08dbdfdcba9c X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:52.1439 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 42KIVwHYTth/KTaHAH5EvKuflfQv26rGaUJNYykRJ0JgHQ6NaVwzoRAoS4iS4zaJFh0hyE3tD6TxqQJEEVKqqbUYiXiyawkgkS1rC3ljtM4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=939 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: VtLRUQLlSyMbGvOyRv3cshKfnvrdfdNY X-Proofpoint-GUID: VtLRUQLlSyMbGvOyRv3cshKfnvrdfdNY X-Stat-Signature: yb891rzizc6wwwpatxeyzkz3i1wa7pdx X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 45BC0100006 X-Rspam-User: X-HE-Tag: 1699394354-600456 X-HE-Meta: U2FsdGVkX19ojZSrauI+PdTU/fX5OV9rPzYC0dDVTZIQN0WNtOvL5NsTKwyoHdo7xWEs4jAasfKpRb9KeJpnqdUN6U3M79CYsyQQ4LQMbHrVZznw7Ky3FY5Szx4M+9+GTSU77U9zzltcjLSKZkGC9qJOGsdObH4RdWibWCHmpu3nUciIn5e9ap0o2s5e1TMdBs3x0bnBT8qDx5ysKGMOHo1DY1um3Or/6mBIR5Fqxrc9rVuOxyDv6cT1ht/aRhR+JcKhbU2CKwudhPKMPEDbqLNuWHNcEsbtOrLXiJiPCtASn90nI1dLscy3m0EulRLA/jabv1pMuj/y0QFmuGs0kH9pk7tSLAS4ba+X/hNUYnrwrOEfNUTfSj3EQXnH13MgJN0SdtUvS46Yk0ghGQLP5ZQ8SwlslAdVTPH8aIZamc60CsloM10ZaNN3Qew9xNyJePcWUMd96OR3WlPFh+5c2O6mzatn81zrUgG7btrZz1iIhhEpyqsU20v+sil3A1OcL4Ah+a4GKKsx8AKrS2SN964rbctfFvX92EdYr+QPcMqG76124XUrlkcibjm0A/WPKt5Yn4GX4SDRrv4zuKmAsloguufHbBGUuVGUM8gcvOcUpIejiYpWfcdlJcY9ZokRa1xmbf/eXHaBgwXvXLpK8PZUCRtkfNtNzg7s3XMEcLJrDjvGOUhy99iSVsL/vy4RD38KOPq8a8QbvBpVCIYIDY2Do1nuekqtqcE7G4Tf1beOqLgNA4Q+xyLkJnIN1uACr+ICa6sKlOxUxesVYoYEoZaFlRzPCAzhyY3wFC6q8XJvETe7Lc2oPyZ1m4x7R/g7b/6DYM/F4Hx68x97gSGM1/9Ox+CdjwlpGX39mljU61RYYvx07arFOXWTprCQHH020mz2bEbuYBgfUYJXhLMgBb0/9G/rbOnjBJnn3Px2CjzxqLPRPoVhTvjj1hjH/b1I37EvBtNE277yS3x7Qlr pgjF9VfU KQkOZscCDZi1RFw8sJPMdAekDRYjJRloUftEbxj8Rd/JPuYekkwKJibM3tnZVykL55L7473WlEdhqxlQWSBr+Rxt/2XrCqbT1H3Mlzfw0J+Bwc++eDga89kZHcIPUIaJCrInlswvfi80oU7BIKaS6OSS5jFHz62hW4zcRk9vLe3i4ylqoz68ELDGNpEXRwPPAVDQDfgltWJD426VQ6pghraDZVAyYWqr/F6y0Pn05Sc1tAvqTg6nrQM9txQy9sI08ALEroG1vsiGhJrYylGmPAy/so/Yf1A81ugDlJnFCJ4rI2REDaef22lyxM1P4MWB2QkKzcy5j2qOGNjhwBJ8BYDjdhxFI2gF+QPJfURaIY3MUcy5HcEnJaNSQe2pNHdwdbWrjTEqNsSXuz1bld41TbiwyPYmiptroS+WIfC0P+im6dpt/n4NixsLW2JFTIiri3KuTbk+EnhmaaTmPdgrXYvrKsMoLPKF4A8yaHq42OjC1D5rEpo30Oeyrf2UyGxXjCOxj X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit c5e6fc08feb2b88dc5dac2f3c817e1c2a4cafda4. Signed-off-by: Ankur Arora --- arch/x86/include/asm/preempt.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 495faed1c76c..49d2f0396be4 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -111,13 +111,6 @@ extern asmlinkage void preempt_schedule_thunk(void); #define __preempt_schedule_func preempt_schedule_thunk -extern asmlinkage void preempt_schedule_notrace(void); -extern asmlinkage void preempt_schedule_notrace_thunk(void); - -#define __preempt_schedule_notrace_func preempt_schedule_notrace_thunk - -#ifdef CONFIG_PREEMPT_DYNAMIC - DECLARE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); #define __preempt_schedule() \ @@ -126,6 +119,11 @@ do { \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule) : ASM_CALL_CONSTRAINT); \ } while (0) +extern asmlinkage void preempt_schedule_notrace(void); +extern asmlinkage void preempt_schedule_notrace_thunk(void); + +#define __preempt_schedule_notrace_func preempt_schedule_notrace_thunk + DECLARE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); #define __preempt_schedule_notrace() \ @@ -134,16 +132,6 @@ do { \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule_notrace) : ASM_CALL_CONSTRAINT); \ } while (0) -#else /* PREEMPT_DYNAMIC */ - -#define __preempt_schedule() \ - asm volatile ("call preempt_schedule_thunk" : ASM_CALL_CONSTRAINT); - -#define __preempt_schedule_notrace() \ - asm volatile ("call preempt_schedule_notrace_thunk" : ASM_CALL_CONSTRAINT); - -#endif /* PREEMPT_DYNAMIC */ - -#endif /* PREEMPTION */ +#endif #endif /* __ASM_PREEMPT_H */ From patchwork Tue Nov 7 21:57:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB2C8C4332F for ; Tue, 7 Nov 2023 21:59:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1ED5D8D0073; Tue, 7 Nov 2023 16:59:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 19C898D0066; Tue, 7 Nov 2023 16:59:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E97C28D0073; Tue, 7 Nov 2023 16:59:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D49C28D0066 for ; Tue, 7 Nov 2023 16:59:25 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 9E48B40B3F for ; Tue, 7 Nov 2023 21:59:25 +0000 (UTC) X-FDA: 81432525090.16.E6EDCCD Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf17.hostedemail.com (Postfix) with ESMTP id 4818F40005 for ; Tue, 7 Nov 2023 21:59:22 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=CAvjvU0o; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jvDxtj7f; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf17.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394362; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+U/iKR0DamvIXW1I7wH7xY9ovn4mPY9pe4p47kKGclA=; b=MjaxfpDwYk/PRkkzFRVk97oAeGsuBx/wW6Y1VM2ThFcxpcj4/MdN7eQF2+5zdk3Z0YhnWM 5Mwhto+EyXFdNXlzsEaRmXm/XqpZpxesl6iDm/UQiWCkZY+5nonuCccm6/Al1tUZSXAzu/ Q+QMdjvYpLBAQTGRPYznOhUhbMw6PPM= ARC-Authentication-Results: i=2; imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=CAvjvU0o; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=jvDxtj7f; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf17.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394362; a=rsa-sha256; cv=pass; b=Pq1xBfvdGdWKizte+INHcFi9b5tDu7t2S3+XMEiOVCNgAm9TzZierato7axqwf80eiZkHD GNmhcay032ogkAHMtU2KWpULz4oVyJaP0y3NmEyA0SBVdWlQQ8nkXCXxotUA7wXRcjkotW ECGlakSlCGFOyjZ0dhVtd+Hck5xXtRM= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJm88022703; Tue, 7 Nov 2023 21:59:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=+U/iKR0DamvIXW1I7wH7xY9ovn4mPY9pe4p47kKGclA=; b=CAvjvU0oLnZ64Ttkfx5izK5UK8U7xasIlOpl4LVbigtcXxAWW5OqN4UNnXCRrU31max9 DyqIwL4wzU32SgqPImZ+mjTTbHP58MNRtvhyED97kHHJHwhhjRoce8tEbl1qxu5fQxeZ EeMgs95Xrs/3nfTU/sFdEO+VN7hjvAIgVEC+IDomhPtrcoLnK66UjGiWjlWcwAihN1Et xg9y/LJmdNq476kPjRWptZs1gWC1rBgacjvsFCPh7t4c/e8t8F2Gd489VkEF5PAbqg05 IhuC0BqYrqGMbWE+pVKf+0NMz6preDZcMVuEf7oIP5JBsuNEZLpuPSSy0LvxmG48Hz+k EA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2002gj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:00 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPfR023842; Tue, 7 Nov 2023 21:59:00 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241ftt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JX2OKIZFgFOT5CB9D4VjOOTeFoe23y0GAKlYxmLNva/XPCxa9EFbHS/0NUdzRyYbWg6ValYcVXLH0MRple79Tiuc3UyQ0Xaja6Lt1ZxocpxO3mY2OvaLQxqVxX8kk33Ns37n5nWpH8B46pqTSwylCQj3pv59nBb6goyeTms3yXIDkjadnxiqlSi2FLXObbMbaQ7hdc/uxqOEIvb6R52cp+X0kQT1tXu2hBI16+3bGB9Vr4nn5UiAjpyPRTNCz0Rr9x2fbMrK/8jpmkfp+TdJn/m/bfzH3C+oC+acKPWN6svccLIJDQsLYkKDu3arDRnzyl/92xtXqLLuuSk/qOB2nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+U/iKR0DamvIXW1I7wH7xY9ovn4mPY9pe4p47kKGclA=; b=WSmJL26xT21PLdNxEbecgGthLSSTEujxlKs0iwKaP787H3JY4ddibe40Mv4RCYxJsNDj/n4VuEn6Ulr1tD60fOqCzkIiCMNjz/u8EBFLhzVJz3PTAigscExqQykONLclx/qiXSuVWO+RyUfTep4WgaiCq9BElvBTxg3hQxE4PbeHp05r/G7nC0/0WCgbnOO/DPGpXF7JEWMiqCYq7wNlZXhs3g5oogExUS+R5l43UbpNWmlFbBaol4cv+74VAXamyIoarKZB64NwhOG0TjnxGPRqmc1XRjkEPdDAaN/yGTniNGzF5ZhawYbqb6fggLIKiS1m5YQhYobeuqcK1fZrtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+U/iKR0DamvIXW1I7wH7xY9ovn4mPY9pe4p47kKGclA=; b=jvDxtj7fOpaBIwO/gbpKgo/06QujIbOcABCBGuf4L6HD5xKaW6Zbe0PBUcpRXPnfQlEATne6Sli1i7HoKOkxfOkE4ly6YFBi6hT15fmZpUO9ZF4zOFBxwIfswdf1rIHADdtOITDR2PplDF5UNmoqNhoANQo8wF+Xkoj18YnBugo= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:57 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:57 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 24/86] Revert "sched: Harden PREEMPT_DYNAMIC" Date: Tue, 7 Nov 2023 13:57:10 -0800 Message-Id: <20231107215742.363031-25-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0019.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::24) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: d241cc17-89dd-498e-eade-08dbdfdcbda5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hz6eb+q7nS7eye99yuYoWW02Io5u6qAxdliw9BiP4qLKLW4yKrkja5rTyFOr1CCBIOxZ+0Y/5u0Q36lqpf5WfvKTxipO4w/BQIbVbmNKlBf4uVjOVUQstV4lteIqc+wnsxVQDF1igcp+mZdVjJajBHBxO4p8MQQ6tdzHgX7S02ggRS+0JeINnULkuQGxq4SIQpU5NyRLXO2Dv3BBg1wxT+itgX37lCWV/XJ1lklIgd3uiHKkvbWSz2tBxwscakjA4bpI4XQ62xk+4/ffBPiNkgik62HlGfDhqtBckXVpsj6JW+wszvY4g+GV1BfzrU7B4886c7bEn/kQU4Teg/d7H+1WhpWZ3Us2JbmfYzLaRhDWUgeB7QBiU0sojUN9/EBVm2b0Hp9HgGyY9lqAyGqzysNFo+jd3ZjamvgnXFEvZC5SGvtmqCkq/JTXphWDaCn4G3fqsGxULALZdCPPpmnL22thAjC/9bPL9c9sSurRbsd1LEq6mJ0mio4n69S581hfHvSgFpFmyRuvXJ/0VZ5uRzetZrFA35XUP24ibhn89X7PrfCJCM8CNNaULCbS7uBu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oiSNtbZMlfDrZ6Ted29lVhyNjGFF2dEsIfgm0rCOLNbywTIYif00J6Ov87vUMd7e5EhRAwb74s8YU4Qy4y8zDNbD5jSOrTL1n4IT9HowqsUJjYD3szlgYNXH2RQ0AiRLc4HLeElbJD0o8JwzhabyxDD1JRgqagZDDfobZYO1tWq3H08gR044ebS12a78qUiKG0104YWrgcWsbOarcKqqgFKOMkBMA+RDSCZYc73FpmyluV7kXSbgzBFzi8DP4VxTDulGGxwAvdxFiIX90Wv1tPhS2rb+YB/siB3ei8oBKlLC+0Wezm3VToLYoQUiPizPNBwfXjQ5jIlFur6ZvPusB+6Z+EFSJaU9e7gLaBTwCcHsr7pPKvpsmTchn3lSKfbL2clqlvMBIdShlJkFTHlVXea6U2Rv26DBmwnoDKnpZA5aYzIY1QECMD+/9Udpo1PJm9nU0A/Yqz4wMYwdwICuSrpqrcUBmEeidVrZyg44pb1XUMtlkoB3XUs9PfcMP3RY1gD9gT7ZwT0VbD9o8wJDhBaQnXQmyEVH4NaiL1ufTqBtDNWJtqR6Ww3iisz7rmTClB9EkFnisWC2OHiI7rHD03nQQWbnYV8auhs7VC34P3de3l4Z7EsBuabyGFDvBrYkskgMuWqQVVDGF2m13P7KzkKOzC/DBfmYB8uZOc3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4UV3LpbJU2mZURQC66DhTejS8mekb96p9mYYpQAepvpkHjzC9JD6NTBXvlmjN7q7xmQS1zMf04VvUDC7M/QSppV7TIde9cXOdjeW2e28JB9T4sIuWW0Qc9DNO2xlHzzJikupYCCypjbIfA9mjNvdHKPr2ZK5SiWppSnSLCcZziN1sJPk15RBFsTdtxvGWq481/WnH9Of3P6zE4UxLKp8/tPy/iAyoD4HxgGBLXeEAbw6WUfskEVGMLreEQEKGH/KciAmyNaIvJv1J8UguFjUwXOLAHkoYmQKO6PXItLX/eITvTDMFW7ibDDqhkCoY6vGSUTSJ3nTityPs0NN8VfSq+CbHG8RUK+PuEvb+yJyTe+1ui1AX1V1hSFMsm6EGXGH+Z0sFOfKLjhL3Ol9YldfZLDx8LRY/tZhcuZQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d241cc17-89dd-498e-eade-08dbdfdcbda5 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:57.2002 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DwOyUiUX85u0/2lAJtpD36G8DoJGFX7QHieSoe3+pSb0RBbTWgZfwYXV1n8R01V4akQvVPdZO9FBibaMKSg52fXNM4XrcEL+jH9v1qg1Lms= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=950 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: spy_pRI-nsqHQNPMf4_JV0QdBmow-LeI X-Proofpoint-GUID: spy_pRI-nsqHQNPMf4_JV0QdBmow-LeI X-Rspamd-Queue-Id: 4818F40005 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: eus3jiea4dgqxcew588wwr5uhbjfib85 X-HE-Tag: 1699394362-837972 X-HE-Meta: U2FsdGVkX18wynw7jhpeMJGobx+qLWXTezqp/xyNvRgBboyR/I/f7P7+ND9bXllhl4rLJVdnYdFEI2nO36kgupRCo30/VxVzL/4063ZiOmrZX1z+ez4MZGrrsVEAITyZL8MhQeEWG0/fGhqdOdkhCiwxvgGCSaYZG1fZhcx2Oc4sKT49WeQR4cXR4DVVnqp4/vHeCDn6VNPr+hHTtY/HlK7+mxcYWFHW4DIAc0HP+5NHp3RnKxTAqArR5xoDvZ5ZE9zADuzYJQy6cJtTdtbS0df9Ey64kvOseEL9KW7I+6TUIYy7SNl8tAtJQn74YMvFsqOLR2StNobL0/ik0GB9Mv477lj6tB0H45FKeqzvyOQnFiN1aFoDO/9PUucp0To0+EWjb2iuGwlHBLqMDlOoYSeYoAplMftSrBF8l2DJIGFS3IfadASTcH5Tlct3qinoiuH/P9BCzRjisUwYlieikGMcxHViDy4/PSFa/watVbuuTpxxfKoCy4tfGAHuybagYSEapt9RQ6a3Gv16Lno5vmY+ubgA+ZEEjeJhoYnElHnd+iZWXdGa+zinrnoCzNQoWlu/IMSyR7ctzDlSQ6xsFSq6dBr45tgitUAvX0oYa+Exw7DOrEc2ZiKX3yCK/nZYQiSO8EoiTpk+0VOaeYg8gwQMAG45CrU46bMgqhgmhYUdYw1hJw1bgnEppqU37tn1XkmLgu+nKY1RspbEyGKb3u+d4OMXFKf2MMnvonH0Rn2aSitc4W4lA3R73XvcbjuZOFXythDIzIr0AVKJcSdF0urQOh+SystEGgzIfBtKlaEkk8+7W8YjfbJgCjLML9oAntihmhbUEOqXL/fUrHhg+tDflvjw2d97Vb9KKDIqZ8tiLQcLyfup81NCuXQ0bl/eL8G5/Hz/LYENK4GdFXuqLAK8QYJW3jilCK0p41JdZViJxQWwZEnHPbId6LeT58PrkYM0UH7tTW0+/1Ezh2j v/J85NOb XCF9QSlcBobVJ5ie0mRHwVCgu5fzBcXBQKDR5Qec3+/RSnG3PN2dUkn+Ue5QGj5pHaQqZP//rdf8PLEUk5bx2PZeU6nSXPUQf7rxgZm/w6VkWzpdC18ysilLgWolqb0KwUzDlVHmAZnn4ANFoiiF3ywhf0hOchFE5G0LBf3roYXU/W2IKJ4qZUlHd0rtPLwEIAVZDJK5erN6m3By0uT3M+UJgWCepxvCZ6qgLhzHVV1kpO8OXaNK5pjdjNFw/gMqyIFqTiBOlbZWhVKYOd9IN5YOhIFZBjDm155Iw0OPsQyvCeZM4WgJZJkxTtZCH90NfufL2QDMMthKu+R9eKTYXOATG1fZuRBCHIVPqmT/514YunXtCK9U9zLMIio7QbGurphJ+l/Jca3w5krh/7ZSTnhZYdm4y3nySh1ataqIQst+zmNr9TOV+4CHJxd6hOaaqNM73TBoe7oeapQo7vsDJnxiRwQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit ef72661e28c64ad610f89acc2832ec67b27ba438. Signed-off-by: Ankur Arora --- arch/x86/include/asm/preempt.h | 4 ++-- include/linux/kernel.h | 2 +- include/linux/sched.h | 2 +- kernel/sched/core.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 49d2f0396be4..967879366d27 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -115,7 +115,7 @@ DECLARE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); #define __preempt_schedule() \ do { \ - __STATIC_CALL_MOD_ADDRESSABLE(preempt_schedule); \ + __ADDRESSABLE(STATIC_CALL_KEY(preempt_schedule)); \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule) : ASM_CALL_CONSTRAINT); \ } while (0) @@ -128,7 +128,7 @@ DECLARE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); #define __preempt_schedule_notrace() \ do { \ - __STATIC_CALL_MOD_ADDRESSABLE(preempt_schedule_notrace); \ + __ADDRESSABLE(STATIC_CALL_KEY(preempt_schedule_notrace)); \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule_notrace) : ASM_CALL_CONSTRAINT); \ } while (0) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b9121007fd0b..5f99720d0cca 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -109,7 +109,7 @@ DECLARE_STATIC_CALL(might_resched, __cond_resched); static __always_inline void might_resched(void) { - static_call_mod(might_resched)(); + static_call(might_resched)(); } #else diff --git a/include/linux/sched.h b/include/linux/sched.h index 66f520954de5..2b1f3008c90e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2090,7 +2090,7 @@ DECLARE_STATIC_CALL(cond_resched, __cond_resched); static __always_inline int _cond_resched(void) { - return static_call_mod(cond_resched)(); + return static_call(cond_resched)(); } #else diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bbd19b8ff3e9..7ea22244c540 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6893,7 +6893,7 @@ EXPORT_SYMBOL(preempt_schedule); #ifdef CONFIG_PREEMPT_DYNAMIC DEFINE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); -EXPORT_STATIC_CALL_TRAMP(preempt_schedule); +EXPORT_STATIC_CALL(preempt_schedule); #endif @@ -6951,7 +6951,7 @@ EXPORT_SYMBOL_GPL(preempt_schedule_notrace); #ifdef CONFIG_PREEMPT_DYNAMIC DEFINE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); -EXPORT_STATIC_CALL_TRAMP(preempt_schedule_notrace); +EXPORT_STATIC_CALL(preempt_schedule_notrace); #endif #endif /* CONFIG_PREEMPTION */ @@ -8740,10 +8740,10 @@ EXPORT_SYMBOL(__cond_resched); #ifdef CONFIG_PREEMPT_DYNAMIC DEFINE_STATIC_CALL_RET0(cond_resched, __cond_resched); -EXPORT_STATIC_CALL_TRAMP(cond_resched); +EXPORT_STATIC_CALL(cond_resched); DEFINE_STATIC_CALL_RET0(might_resched, __cond_resched); -EXPORT_STATIC_CALL_TRAMP(might_resched); +EXPORT_STATIC_CALL(might_resched); #endif /* From patchwork Tue Nov 7 21:57:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449390 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C59C4167B for ; Tue, 7 Nov 2023 21:59:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E49208D0074; Tue, 7 Nov 2023 16:59:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF8068D0066; Tue, 7 Nov 2023 16:59:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B881E8D0074; Tue, 7 Nov 2023 16:59:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A1B998D0066 for ; Tue, 7 Nov 2023 16:59:26 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 73A681CB104 for ; Tue, 7 Nov 2023 21:59:26 +0000 (UTC) X-FDA: 81432525132.03.5AAE571 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 536401C000D for ; Tue, 7 Nov 2023 21:59:23 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=2n+1QgJ9; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RmL0qOEY; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf21.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394363; a=rsa-sha256; cv=pass; b=xGn1Bt3Q4zoBesPXaqMwOmj6ZshfbaD+Zr6cGrO4uOkTKQtzWtbZhJL/MXyGIjb5HwPCNU a2HFRdRiIILSzdwavawrFgE8khMBHz8QqFUHmMxYfi2eBMxsQGT/njwPoARA0ltxdJyGqk mRNWoZ3zTgSKvXCR9qCglnwr2JiVn7Q= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=2n+1QgJ9; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RmL0qOEY; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf21.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394363; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gIURl4zD2JDLDcBd66nrEQyeZ018E3Wv9BPvPmcIeRg=; b=fecE7J8vxQefB2jn/59bw8KFvqH/TRq0pU1CYJGRpargWaFVTQgLIsC3NvmLS4d2CSxsN/ hqc1NBNZjzvyTatt4UMxS2XOVOyzOX4y5jkc6/uIlUVoOhkhX3ZPvlaZ0Ppeo8eM5K/v/u 1EGxXMT6R1xXg7luvvAvb6cgJzV469U= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpwA026315; Tue, 7 Nov 2023 21:59:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=gIURl4zD2JDLDcBd66nrEQyeZ018E3Wv9BPvPmcIeRg=; b=2n+1QgJ9Me/2M8jpXCyLJSsPz6nu/XLFbGouS1eV3i+HgUvk09igKBLjPm0AIQ1p07AK 8HH/K9JjjYbg5KnreQv5/afJhPFkPzJJrVu8tDzFM4ZrEIRFhYdIs43FNoD9+CP1FCD7 VWvNvC6koqfOfnD7qecyBxYjsShBqVoayXGgP9cSbG4mgmbsTB5y8llLqHopjmLevTZ5 tbk+cXlJrhAme6a9bgYHvidYXwxU+sI8Of4LXA3SiRDFNEmiQT6T6aVgbkoBpBqEQwiH WocaKnY2KTMNHB/xo916fIapqdFrGeg590GSsnhz3/Dh6riEpmixLKtrQNuS69HlasX9 gw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2102ng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:01 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPfS023842; Tue, 7 Nov 2023 21:59:01 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241ftt-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YtBprEZzNwWIxbxwq4YoRLkwh+K94LM1ym0KL1CfXoahn2SN4GeLZFo5tf7YYaGWmF0kjgJbid1rmKTKpX7EQdrSsCdwr1l0XG41PYw8zqiBBh5UV1usohfOW9Q5xxQb/+ATRPKFbzI8I4VRGAIC7Sdo7cngo6cjO4Zd5b9rLo523dqRqF+hzbBKeQQqGDDLuJyPWLzdjvPAIf9uOu1klwUOiBozrPm6ZKGI/3Sw+d+wLrPDYH2ghL0GlKyBIW2zu8vgs+F10HvqgMskS9sD4U2uMg63tf+Zh6h0LeD4fwK7tjaAyDStNUYzbJKbSaOI8kj20SWiwMQ12ZvAQcteRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=gIURl4zD2JDLDcBd66nrEQyeZ018E3Wv9BPvPmcIeRg=; b=hbPpBedb4SZ8pMnsFEYUINT2IiEgTuPUlrOtIE0rMwxA8jxDO5b3SO1z3NpCXrmvQSASi6A7XVa9SDX20PJvJB/orMzyPOK0SHV+JpljvdfeJ3ei7KqANns9ycsNTMF4eGxcH+NP/D8I2zlE3Wq7XsVz2NISRLu0eE5nncMCY8MqGBbZHOlmtfbIdfriHWI9A3Za9svRLaq3mjZnIlHVyG/EMqF8IfOYGpY+mH6ZneSEqNdMt+cb2ZJxGf+1ChHbk5rQi0UIDuX76rNQk4BdEfEE9RxJUt/mMI4FwEJmsN1cfMhIXVqg/AW2yYKWr/GAoFVIcM42QHN+LXxsJu+l5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gIURl4zD2JDLDcBd66nrEQyeZ018E3Wv9BPvPmcIeRg=; b=RmL0qOEYoYayx1cVDYheoO04UJvTuPq8JfcuINfvgW5NiBllyyAZ/S1tLvz9DBA4ADB8c1KfyZTIBidkUebwyGyoPLgK08OOLqtKxmqDvvq4FunK1JBjhJRc0wXHnOTGQxBv84u/simS4ZVsl9OLrfGzWWTNVWkLBD7+6v/CfQc= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:58:59 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:58:59 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 25/86] Revert "sched: Add /debug/sched_preempt" Date: Tue, 7 Nov 2023 13:57:11 -0800 Message-Id: <20231107215742.363031-26-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0019.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::24) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 30081449-50cf-4bcf-f75c-08dbdfdcbeb0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cK9L+CHR0Aj1E7kPMJP+m+/5KhY+Ks2RqHgLboXRQywb2WuwWDbANz3H3pcopqCqjsdcC+QgH/9DuEXX5cFs4aBtw780N2P/t8elwsDVNmsbMbyz0OdNhzIY+JQyGgaTYcO8OgJF6LXHfoMoMU0JdZ8325by8qwO2UlXxto+vYedH2XXJqyTTIB4ubxLWRgJM70XHr3IECPbuMzSD1Sa+uTwKu3W+2NXU4tNM91ZGgEVRKhy7JGS0xawjtSHB2+AQuaThL9JrZWODuI+PrxyyrdrkhxZBbQ121oYitSt03umugHD+DPP3/IF0bJEaT87PrB7oLYEowy56ztUqKvIEoumBbmmN2XifCQ+EVCbz9H/klTKPQFwJa2PdB65g1WcojZ9NUNyJxFELioJUYQpLssD5XTT0KC/HkEieB/FaEfexxKDd2loWWysc1Mn2M92pZQ5PkGxzAHWL+H/6mAlUkG87v0VZvtAado9mR3SmjHONs5e5nYbZGlHME2WzZT0g8dGO8Y7BLOm1Frrp5LHJW7VF4zw/814b7z76+ct8+SaQ2koxfrmiMrRN8jYfjKF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NfTNXWYXOvOlvPmTR9mPPGEtZ7i9THzp0XxSJV9qTwWW85UpO7Nn5RSQF41Iy2E0lLNRNRNgpRVcuqgmY1Ix1mpCE/dKGNWyec80AIQsnggNfaE8JePSk8OIug4Cxdem0zO4UkxYSgzSyeqmxj+w9B7rMDt6/5YaGEgF9iUBboMevcRXM4jlJc6hjFLl56fdy4FIlrJH3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7cwpGga1Zhpgi9g3ldX489NSce/gg/7Al0ndWapVqIKk57n2GBLZDGHM3v/K3oBYYcom/N+zJbzjjJXNr4Br1BlUuEosFob+3HTktrY2P2L9fCSDnBsKKChKvSa95VTTB3I8BXExN7MagimfArRZYs2WecZC0NT9O7ltIvdwakkuvYDwNeeahqwDh35I6aJBRnGftYYtUHioJoa/6294UB8zowT6CjSzWhgORIK4ezadUSEIFKuVOxY6NQhiU9wJbkNHyt4n1MERdPlp79cd1mKTm8QZYhzzkHMN1br42zIW/a9NnJFRNSY4/aHc1DYZQD653gBtLe0qZcI5jzKiow== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 3hP2LNq9UU3lS1rOGNeaf7FQuVa7ToP+MYpHy2IdQj/dT75CC01gnbOciDCk22TYYfj8Sbl9h+J5JwTFJQmRq22iyBGqdd/pDehHQ8MijnFTgxgfgBEqzBijoXLKJYEoCfCmPQUiMIYGTJ4KVbvsiPGLGfA57lWVdSKeoEUo84Tlxh2RWWfJvPlGJD8DHhj+kHIOgYIMTdFZEYzwOQ24vwglqNenlyUC0Nvn1JBmhSjZcx8NRXfWbUdVhW/yiwgl23QBfeo931t50te5bqIvHQEXATZSfso7dIaiMafWXcfyodCIRHsFG0vnUptt7/N8QR0LLu+P6PCl6twOEaEYzHuME/F4kiD721+4HKqquSajsgm+vA5K7kA3/hDEurY5TNecoeofIIJSkR1w6JUJNsE8xUs3yKJFS+HYPKRHxf8ttSvgqQHJiiIMjmJ02ZBKkU/GkTsnX9Zc/w91EJxYNBVlJVrusTqGSc0zmvoPnqedbzz3Gpc2gl35VuURY4svnowllr6wJron2ff8rTl6hH7B4qXKTZfADP5sJgF7B6VE7aunVG2Oy5z68HQaqeXze34Qk6C9MbICHKJ1ZHy/ZH7EUD3yuBojKRzWyNaVOUzzKcVvPOf0WGzYyvgTTNEK9LLwOrzmYZbSVRNour92lCBS/9VM0ypjjxfeIfKNzGVbtZpfe3sMvDmZSCMiuKg7IxskV8SiQiE1w/tv4ANLCKEQvZBSUo6F87CuEZA3hgPMf9o4UVbvGDzx31pfml2nim3hpF53vwTTPra+/cx3vuA9MS1O0dYdgrH9qzixeyAalOubQ6+x6eSBbNDiVSXP8yMpODhG8SUx1NnHIiCqmuq3wVB9H6n7kmnjNJKiXSZsGBeiO+q3il6pcfiPMqQGeH04ZjuhGelsTa1CXs5IRZ2gH6dK64WFEzRpRAQC7pJ/DCuLtB6duTBI4L1yMMS6fHJC7fFDkxpWnk2oGaD762Kg50712XTDjPv5LHMxKz67uUWa2BMMIHkSpqLOs74Fp+6+HjiV3F6MwQ6+0cgoNlxUb1t2ZtP+i9wZg2klS/VRgRzkOBhVac+fVQKgSfDojU9qkVVJnDa7XzvTPsueQ9kHEIBUFT/RYJZO5cmoHNOw1dTGEZKuRvYvZPC2ofOfmMsHcB2kLqOY/cTlMAs5I+XkLgEDHEYHVPi2jzmuSFf6V3VxtgcomY3J93sfSpixtgZIdrmZ6L5x8F6Ld7zSM4wf6/joTv3htTU2YG9psmaZuTpKYpJ7c/TjPMT+7YgLCGf922TuoJT4V69JESEBCYwjMIP70vJqp8sNYpspoi85LKCRgZ1IrPLPUGuE7Aad2w0ymebvHESBHofhj9fEEbKgOzvdzoI0HuahZUoZuZTJTU7f0nHmnA+EybM+OrEkYtKGfbsb2GCSfZkVWwfMtHoBTQOSz9IdklvaC+28X/pTon4gLpyOq1OPO7RPwLGWT0Q8b3IrydUz3UtOET6+bkCewwMGsxEqXuzslqbGNw3urJsTzG7Atv5Vcn11lPSTeFEbE1TpEhcVpkT1ynzUEw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30081449-50cf-4bcf-f75c-08dbdfdcbeb0 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:58:58.9548 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d+47F0pp1dLp64/XsaXF+QGNx4uKXjCTyH50G+NXaFOhE6fFapP9FlgZWkbLue09tvBJ7p6rw4Oc1OgtLIbYhIGs3Q4Nnbi3pzbeDrnVJxc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=996 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: W4-cLXilnsUSlAHwU9B3VFu0RqQKJUkU X-Proofpoint-ORIG-GUID: W4-cLXilnsUSlAHwU9B3VFu0RqQKJUkU X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 536401C000D X-Stat-Signature: 9ow6jsnuyzmqxgbbqg7k1r5ubniohq1n X-HE-Tag: 1699394363-895509 X-HE-Meta: U2FsdGVkX19q3O9WcrpZPBVDwW2dz64YcdvrAw1hTg9Qe9t4bx3jaucHcNfS0tdq+5R3oMeIsUanCXNByV6YCuT/pu5Ad/P8TCM5lUOvigp5N7k5ezvjA0oXapHqhUyJLcLf8LOkh/BhG+Ten0oc5OHjdxvtlVO5DF2eUqDezZ6kJCsZhhG42FI07hfaR5O0mdUfz5Sm01Wi68Fdd6jKLAAI1BLKfy9Ypc7ifeEaU/5sA2CgUKrkC5d9i1Gp9awvU+uUvCngnjCcN9IwgK+vGa58b4qrX1B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LVrOszrr2UdpL8vnxoIXx/miw8jbyv/4VrdoQNTYbp4aHGvl1dZj28XZzeXMSoKfAoEFfyPQekU9FipKooEQjwYTfWmS7kgJa5L+ryDqkDKtYKoWTcAA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit e59e10f8ef63d42fbb99776a5a112841e798b3b5. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 137 +++----------------------------------------- 1 file changed, 9 insertions(+), 128 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 7ea22244c540..b8dacc7feb47 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6989,156 +6989,37 @@ EXPORT_STATIC_CALL(preempt_schedule_notrace); * preempt_schedule_notrace <- preempt_schedule_notrace * irqentry_exit_cond_resched <- irqentry_exit_cond_resched */ - -enum { - preempt_dynamic_none = 0, - preempt_dynamic_voluntary, - preempt_dynamic_full, -}; - -static int preempt_dynamic_mode = preempt_dynamic_full; - -static int sched_dynamic_mode(const char *str) +static int __init setup_preempt_mode(char *str) { - if (!strcmp(str, "none")) - return 0; - - if (!strcmp(str, "voluntary")) - return 1; - - if (!strcmp(str, "full")) - return 2; - - return -1; -} - -static void sched_dynamic_update(int mode) -{ - /* - * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in - * the ZERO state, which is invalid. - */ - static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, __cond_resched); - static_call_update(preempt_schedule, __preempt_schedule_func); - static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); - static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); - - switch (mode) { - case preempt_dynamic_none: + if (!strcmp(str, "none")) { static_call_update(cond_resched, __cond_resched); static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL); static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL); static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL); - pr_info("Dynamic Preempt: none\n"); - break; - - case preempt_dynamic_voluntary: + pr_info("Dynamic Preempt: %s\n", str); + } else if (!strcmp(str, "voluntary")) { static_call_update(cond_resched, __cond_resched); static_call_update(might_resched, __cond_resched); static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL); static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL); static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL); - pr_info("Dynamic Preempt: voluntary\n"); - break; - - case preempt_dynamic_full: + pr_info("Dynamic Preempt: %s\n", str); + } else if (!strcmp(str, "full")) { static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0); static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); static_call_update(preempt_schedule, __preempt_schedule_func); static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); - pr_info("Dynamic Preempt: full\n"); - break; - } - - preempt_dynamic_mode = mode; -} - -static int __init setup_preempt_mode(char *str) -{ - int mode = sched_dynamic_mode(str); - if (mode < 0) { - pr_warn("Dynamic Preempt: unsupported mode: %s\n", str); + pr_info("Dynamic Preempt: %s\n", str); + } else { + pr_warn("Dynamic Preempt: Unsupported preempt mode %s, default to full\n", str); return 1; } - - sched_dynamic_update(mode); return 0; } __setup("preempt=", setup_preempt_mode); -#ifdef CONFIG_SCHED_DEBUG - -static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, - size_t cnt, loff_t *ppos) -{ - char buf[16]; - int mode; - - if (cnt > 15) - cnt = 15; - - if (copy_from_user(&buf, ubuf, cnt)) - return -EFAULT; - - buf[cnt] = 0; - mode = sched_dynamic_mode(strstrip(buf)); - if (mode < 0) - return mode; - - sched_dynamic_update(mode); - - *ppos += cnt; - - return cnt; -} - -static int sched_dynamic_show(struct seq_file *m, void *v) -{ - static const char * preempt_modes[] = { - "none", "voluntary", "full" - }; - int i; - - for (i = 0; i < ARRAY_SIZE(preempt_modes); i++) { - if (preempt_dynamic_mode == i) - seq_puts(m, "("); - seq_puts(m, preempt_modes[i]); - if (preempt_dynamic_mode == i) - seq_puts(m, ")"); - - seq_puts(m, " "); - } - - seq_puts(m, "\n"); - return 0; -} - -static int sched_dynamic_open(struct inode *inode, struct file *filp) -{ - return single_open(filp, sched_dynamic_show, NULL); -} - -static const struct file_operations sched_dynamic_fops = { - .open = sched_dynamic_open, - .write = sched_dynamic_write, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -extern struct dentry *debugfs_sched; - -static __init int sched_init_debug_dynamic(void) -{ - debugfs_create_file("sched_preempt", 0644, debugfs_sched, NULL, &sched_dynamic_fops); - return 0; -} -late_initcall(sched_init_debug_dynamic); - -#endif /* CONFIG_SCHED_DEBUG */ #endif /* CONFIG_PREEMPT_DYNAMIC */ From patchwork Tue Nov 7 21:57:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87D00C04A92 for ; Tue, 7 Nov 2023 21:59:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D62398D0075; Tue, 7 Nov 2023 16:59:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D0E958D0066; Tue, 7 Nov 2023 16:59:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B16828D0075; Tue, 7 Nov 2023 16:59:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9C3738D0066 for ; Tue, 7 Nov 2023 16:59:28 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7422CC0AA0 for ; Tue, 7 Nov 2023 21:59:28 +0000 (UTC) X-FDA: 81432525216.19.8DB451E Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf28.hostedemail.com (Postfix) with ESMTP id 1376BC0023 for ; Tue, 7 Nov 2023 21:59:24 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=g7ZDoTfF; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JY7UFxdU; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394365; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mDFI4sydB9kqHwvHTqRVvUvHxDNxIMSqpSdqtgAYJHo=; b=LTULySJ7lCsXRLqj0ZuOlb5f6REoMVrEszGO3KBKjRDErdlMGq9mIGTsuVDSu7ayld9FEL WAOln6rQR/60UfqMGHHhcG+IUeYAKWhB6TSRlDyYQfNhEtp56XIhrIwZ3xw5DdiAuL2Kl4 82y7odY4nzWnXw9MsRMzjxio8knkgzE= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=g7ZDoTfF; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JY7UFxdU; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394365; a=rsa-sha256; cv=pass; b=YDo8hgCXmH8Y6IM4SMNnRunpPBjYflqMfWWRG4Dgq2oplefQamXE4wRD1h2QthQHqteON0 34NIOaXaoUB8C70dsVcqwKHrCabG0BVYDxcI0LTUOinBuhK+RZHuVhArFvzz2s2httopDf Ld57aZBoSW1D81YDRwHzNa8pAT6x5/A= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJXQi014855; Tue, 7 Nov 2023 21:59:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=mDFI4sydB9kqHwvHTqRVvUvHxDNxIMSqpSdqtgAYJHo=; b=g7ZDoTfF621NW4V+Kc0eQ552achLZLjHrdd99Q3WypcvSqm6uhFXcD4TYQI5/HLT04+S vZac8tHKmdi7DEJoZtWFyAHFN8cJqhGVKUMruT6XMMwraxiNjNqZN2Vof+/CRfMFG6J5 M8trAQ/x8h5P7+F+OEUBEYeWwgdf4r9vlv1Kr68nolE8c22jPDL0vjK14aNb7MWFTok2 ViVwQnEhlmI0UOMc90FdLwmBJV0k/Eb1BVOLuy6N30N7e9wyuuAErKusW8IUVMgJuVTw cEkD/yIsElGwK9yNHix6dr7DgtmM6ZoCtZ66pXiyg0I8H5NIJeHPo0F14hUlGIywUCc2 AQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:04 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LItwP003953; Tue, 7 Nov 2023 21:59:03 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsj9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XpW+ypHMkuYr5f78Est0tHhqCSAF3UzkaDhqORXreFxp0M2QAVhWpV6q5qN36hETRLXRso/Vi2NPrLqUSKThwnYtKTQrEUTqYW8kMt9bPClshAIMwh/nbWM7Za00M4ch8SiV8yzd9O7/IJX4UpB0r9peVsYQdkC0J0WdxxcNAxgij1IL512MxNpWveICHfylkMgjef6/4Kfe44ynjohIUKI/qN7kFrSqQLr2lqGOTDIvx+1qVe0PZYnP93FANPBwHUVDOlWlJK4bOD3gZ37BcCLTeD4gvqeBcoQBpXAp7GAWCaULbqnaqOJ+A43JSJnGThJrXKaXqraCxnSvqGC4xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=mDFI4sydB9kqHwvHTqRVvUvHxDNxIMSqpSdqtgAYJHo=; b=P/cOv9UiFahoubRZPaGhgiZm7MoA5A4Hfo/y1TC0SyKxaDkhtfBFz9e8d9xvA2e6wGlRKKwKkihHm7wftgD/PI8Yuu26RaKZzXkPPRb9b8fqbBuBd1GQvFToa4XNQEga5EoXkK6N8mCVct5frMNZVthakc20Tkn64ZqXlT1lO/tnDq1MVEAWH/2NGGVxnBVeXfYN7X88QvyIreVFQ859lDvhrCrM3hICMk++7EgU0eWvmL/rAWFBFQVoRjyPC2c26jQ5H+/1wcDcwwv1xhW0VjcrTRgRsjYPgbXddGnq5esVgDwv/hCw9BYM/leNZPd7+eCADKhjXTJbJpGlQvI7mg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mDFI4sydB9kqHwvHTqRVvUvHxDNxIMSqpSdqtgAYJHo=; b=JY7UFxdUzgzhq//kpK4mrqtAcmOHC+TrjufuHH3YyfjmPVRIVEpB1LlnPnneMAk3hsC8Tj8DI7SuFCvk4t3OLkSGEE8Rxxc4catyUCA7h6vSwWBLuxe6+geE0Y0CINZRA4hwCy8fx48iYI96ir68qwip1wBK18Xu9FdwCpDJ0iA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5048.namprd10.prod.outlook.com (2603:10b6:408:117::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 21:59:01 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:01 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 26/86] Revert "preempt/dynamic: Support dynamic preempt with preempt= boot option" Date: Tue, 7 Nov 2023 13:57:12 -0800 Message-Id: <20231107215742.363031-27-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0003.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::8) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5048:EE_ X-MS-Office365-Filtering-Correlation-Id: 7832c970-7854-4c91-c763-08dbdfdcbfdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oUz9OrqudECre6ia5v0iFNVnIa09KgoQy9iP95OTQjeLp9iUNf02v6SVdnRAVnQrnmH7Tp2uwXYqyRa+dQci3ku6lRizhHP6SCgEge/DJvFHrateajcoapw37puPn+PpzDlDtcVzJ+yh68eTsKsWz/LV0DHqWirxmWDhvvzkzyGhZvyjBEqOf2/Bhje4nDmTlodM5IBWId30lJE3qt/hpwlJYowFeonBzQBwMp8hY29AB5QMxKgjSw5be/P2n3EJwD6rDyezh6sGnhav0qXuXU6BWi8XjPe6x2izD7AVT5Rd690wB3CaHGZ8sN2FGDmzelwh0GA49aLYza9pmTtosjIw8z4DOLMysrP06QoohqErS2OmltlSLS4eTFUs/GmGHoPS52UOT1HPT3Tmd5ZbI4MdCp59vY8tctm6d6sPe5kbz4kmXIG5g1OGZUFl9pCypCYhZZ39+hqZYW6iyju9AlZJH8xD4DX2NhD80WKPeRPB+lEO/XWmfPoqQDmHysBCH/TtXvOjDTbLbmBweH9PpZFN89wFzo3cJeoEjerc+D2C5R1CGcPvEhNxIR8Q4H35 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(8936002)(4326008)(8676002)(66476007)(66556008)(316002)(6916009)(66946007)(41300700001)(103116003)(2906002)(86362001)(7406005)(7416002)(5660300002)(83380400001)(107886003)(2616005)(26005)(1076003)(38100700002)(36756003)(478600001)(6512007)(6486002)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: u3vOWF5D6UizTOJASn9kbFkjYIkBu86aBVvIdJaA3Ti2Kg8RHFIgxXRYkWw3L1MvrvnHu1w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Message-Id: 7832c970-7854-4c91-c763-08dbdfdcbfdf X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:00.9437 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fY9VKCZQN1LFF3m7eQXlDQpHrB13aFQZKXa/5w2f6CWUW21JL4lvgvuWmlCw7TNGu9x1JNR6fHnGDMNDnQS5wArkszzTHiw7ispTtkO2nBI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5048 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: 3ExKpHnPgf2O8lEVz1Y4o_ZkjpOTxYww X-Proofpoint-ORIG-GUID: 3ExKpHnPgf2O8lEVz1Y4o_ZkjpOTxYww X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 1376BC0023 X-Stat-Signature: 4dmiyzi9gs1mrgc78q4hghy53tc4ozrf X-HE-Tag: 1699394364-501816 X-HE-Meta: U2FsdGVkX1/OBGKNX+IXV6hGpc24g5tr2ZVwWGKC5w3oYpAYqOEYFkiW/pA3bHF+MVy8wKmGOq9O93QqPqIvd6YRtsDkynMd8SiD9wwXCv+N+nEcOxZlRPzsSTaYA9ng0raC46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4/YSKNM6594LVwN+/gkjyYZhtP6GQ7WVorY7LGWiRfygptRWr2iymHN8vxlysHS43vuFv6NXbumSEdYceURgyXV6iVF1Nu5RLaud8QXYMotmm6KHFNlpFl7wpNOkRc01G7wY7ZQD3yRk/zZtVXBW5ytGkRTOZtY9gxHwWOnzLwrMo94rXRofnx+aziVf/UP396 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 826bfeb37bb4302ee6042f330c4c0c757152bdb8. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 68 +-------------------------------------------- 1 file changed, 1 insertion(+), 67 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b8dacc7feb47..51df0b62f519 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6954,75 +6954,9 @@ DEFINE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); EXPORT_STATIC_CALL(preempt_schedule_notrace); #endif + #endif /* CONFIG_PREEMPTION */ -#ifdef CONFIG_PREEMPT_DYNAMIC - -#include - -/* - * SC:cond_resched - * SC:might_resched - * SC:preempt_schedule - * SC:preempt_schedule_notrace - * SC:irqentry_exit_cond_resched - * - * - * NONE: - * cond_resched <- __cond_resched - * might_resched <- RET0 - * preempt_schedule <- NOP - * preempt_schedule_notrace <- NOP - * irqentry_exit_cond_resched <- NOP - * - * VOLUNTARY: - * cond_resched <- __cond_resched - * might_resched <- __cond_resched - * preempt_schedule <- NOP - * preempt_schedule_notrace <- NOP - * irqentry_exit_cond_resched <- NOP - * - * FULL: - * cond_resched <- RET0 - * might_resched <- RET0 - * preempt_schedule <- preempt_schedule - * preempt_schedule_notrace <- preempt_schedule_notrace - * irqentry_exit_cond_resched <- irqentry_exit_cond_resched - */ -static int __init setup_preempt_mode(char *str) -{ - if (!strcmp(str, "none")) { - static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); - static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL); - static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL); - static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL); - pr_info("Dynamic Preempt: %s\n", str); - } else if (!strcmp(str, "voluntary")) { - static_call_update(cond_resched, __cond_resched); - static_call_update(might_resched, __cond_resched); - static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL); - static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL); - static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL); - pr_info("Dynamic Preempt: %s\n", str); - } else if (!strcmp(str, "full")) { - static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0); - static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); - static_call_update(preempt_schedule, __preempt_schedule_func); - static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func); - static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched); - pr_info("Dynamic Preempt: %s\n", str); - } else { - pr_warn("Dynamic Preempt: Unsupported preempt mode %s, default to full\n", str); - return 1; - } - return 0; -} -__setup("preempt=", setup_preempt_mode); - -#endif /* CONFIG_PREEMPT_DYNAMIC */ - - /* * This is the entry point to schedule() from kernel preemption * off of irq context. From patchwork Tue Nov 7 21:57:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449392 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CAA1C4167D for ; Tue, 7 Nov 2023 21:59:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F0E7D8D0076; Tue, 7 Nov 2023 16:59:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E94698D0066; Tue, 7 Nov 2023 16:59:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C74AB8D0076; Tue, 7 Nov 2023 16:59:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B36198D0066 for ; Tue, 7 Nov 2023 16:59:34 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 672B8C0B88 for ; Tue, 7 Nov 2023 21:59:34 +0000 (UTC) X-FDA: 81432525468.03.B78C4FB Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf05.hostedemail.com (Postfix) with ESMTP id 0EADC10000C for ; Tue, 7 Nov 2023 21:59:30 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=31So5Q92; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nAmSiZrZ; spf=pass (imf05.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394371; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ySNbSBBvAofKup/xKBYGGERhbB0ByCKuL3ZbZm62VAQ=; b=5dYcAbvpT3SNTiJTYv4X6fD2xrwqMcPFi2UCuek9bL2iZvb8LLhV65I9aIOJ41B7gumkIm dY1hh3gAcLAEbZ+yvd77FpQYDb/valyIshJvn1dtpv92oj9hI0ojMAztdD2kHVggkGk9ap 7+nxM7O7gAvtYJvxOr/VOHtyK20+D0c= ARC-Authentication-Results: i=2; imf05.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=31So5Q92; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nAmSiZrZ; spf=pass (imf05.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394371; a=rsa-sha256; cv=pass; b=us3zV9AkzOyoaD9WmKScE5Z8hbLlRuuBLguONiy8KJfiy3JqO/Cj5/eRK8gyXepeX851Eu +YhsfeYcQQjjNxi5A2cZhba984mpPhouCTr8IxsckmuhKPXouGGvUBp9mM93+0pZ0onLGv BiZ2jpbcOQVJyYNwiLjW81mE4kmQpuc= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJcBF005442; Tue, 7 Nov 2023 21:59:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=ySNbSBBvAofKup/xKBYGGERhbB0ByCKuL3ZbZm62VAQ=; b=31So5Q92n9gRzdomvYIdViYdinz+j+kh45cpa2V0NH0cszc1IMM1vs4DY4663J4/AZpW bmZmh1DU/HtB82DRkxbKgJ7+X6frCoM5r1YVhfGJjHL97kRe1R67T6X9J73S/C0hWbjt NSPlS/qWRhNgSKp6e6WKJQ3nnu+Jr9zC0gEmIsKjdHwiOcRsuHnLYM7rDCXC2KU6ur01 OB2NRK1xke0OpodpM74ddVRc1kOLkTzZ8s980pbOdDHPQ7tFY3DilOKxi33wXEXJsSUA VSgtjKHAKky/Z8Htsy/RfE35O5Qc+C+m6J20jVRwnI2RpAPRZtuiXbIM93RHmKhpW6gV nA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2cd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:10 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIbqW010946; Tue, 7 Nov 2023 21:59:09 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsj2j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ECmdtWgsHsYnzHbitMBgqy32vGWAeePT4/MCxB1Dhd6jF3xOX9fSRpZj9DwNCymKma+voVs50A0JDTSq15a4uHYf+WXDfIFwOF6J2bYfbbM+KhwXw2P8XbhttTjgkrnbs7RIQEe8QCpa0zvDg+Lb1pFr/1Dt7An5Y4x1/RLMBIRr6vFhchhB/XSTubTdicFrzhptx8rcj0rgfmcwlBXWjypfXTgBPYW1mOQSwnnTXnc8JM2aU5RTe0Ym2XcXDRKHhK4SzVWycx8kVJRWEMvHP2I03WukGOC2hP8whWTtSNbPzrAOHhF3l2JG22mPU5pTvPZd3OTfozMzuGDD5hXuCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ySNbSBBvAofKup/xKBYGGERhbB0ByCKuL3ZbZm62VAQ=; b=Ru2XnAwbyrBMRz2wFAySXlgFqniMtct9+ewU1xmFoWQdtwq3iSptAJr7hyfgM6ZJZX398XRg25bnM/w/+LcjYuYR7quv9O1zHPknjvY7ExG4fG/njwFs0xeggACh6oKKwFcj3/L1jaIbB+omvkCb7fbMmz1unbLNV6PncfF+IzIwx3IztLapChNPZWZPhDZR9v4/K5Shw1CAjGphi6k7AojmIMoh4tYjRmqR2hjli5Ed54bXF/zjdVCSRUioYsrgasue3qaw3uO2lr/BW2tk4sXVoxrB/JcapCWtGQK+aPN+emlbIpMHw3ExDlWDCJYmydO304F+mfFXfXTJHYR1MA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ySNbSBBvAofKup/xKBYGGERhbB0ByCKuL3ZbZm62VAQ=; b=nAmSiZrZS8ZDXAyAPR78t7qx27tkK+jbKocSaEsjksJi07P55UCgRwe03bX+NR+bYLBZ4QoyygJlF74IfBP9TZpiqxshOMk0/vG5iOjE9jYy/D+52H3HWzKlN4dcrzcHBIFDIkEFKQT24z/dk6N7hIy+Wye3FtR6Ul9pHEZFxbM= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 21:59:06 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:06 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 27/86] Revert "preempt/dynamic: Provide irqentry_exit_cond_resched() static call" Date: Tue, 7 Nov 2023 13:57:13 -0800 Message-Id: <20231107215742.363031-28-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0217.namprd03.prod.outlook.com (2603:10b6:303:b9::12) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: 68f21137-b106-4433-8aac-08dbdfdcc2df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UsL8an5f/ZFmWfaMfAClggOHrryMi8xy7YKetYKcKVpyYCvqy7sUMzrowbL07WOmStLenX1TZhtgPexoo/pIaO/2zyra6p4Adrsum9SEU3zk1piPiImTvvH/Q1j8aNgpQx71LClT05L6z4xlh9s2EGkP8IOJpsDIOtoTEFXrSfjxpGathRRNPPbRex5WkGmhC8wounkfKyOiWb/zB3LHFdfbhVzbPn2xkTcQAR4WYFaO5ElYYMsoC4xFxS6btMMQd6CRc/UpjhL3+TpjFejaIljfzmP6GGWnu6Yo7Q+o4zywPY4cwYu78ooLNKN5QKVRniI+h35m5seR2m3i8VIOJYoJqoI9lbYNPifdbl0QY7RTw4yizAs+VErhcbavEmkZyktn2DBDvfuMU1hwPdWuZipp+KVhGVDyN87p995RoSuN9Lil/QvakjP0KaqwoBiKUyALsDmJYPhCOalJiQ/sHEzSaZ2xwH/U3yCBVJPS7fxbC2D4xYfRkMkwUicvGyZek5QXGAAEaBc+bmcmoBLAlvJsnQU5EWuslfH/pCOzoe6ySczd0QPfx46fQibXfNtJ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PeyfzO+eL+oCGH5gGH1s6LxS9uvMz/QjAOz7OxpnZnWiySPcanK8wx/goyaybKQoF7QNLVZAGBNWdO/Cszw71u+TameLuB4OlxqCnWdBcHFPFtRhvQ5US+jEKhbvv0h3xdl1RAQMlQc1P0N6jkdXP171AXZa6Bs36OK0c1v+wnLJOH0b8xtQbTs/4FhydFoPRN9f2xBks/glI6IkXzIPFQN2p0YdZ3YgR5Lqk1o/mQdxDFjBF5O3PWacQqu5maVRPW7tmPRBjIljc7HC1ML7DycftEYdgfjvVlcHw9PaULnBoh726bBePDoTL9VYgJvK9IbuQzLvfQQ9h2Yl8kcwoXpZi/g5W473mnrtIEccAlDF9q4LDxlrHNAmEWxkd3J7Cp8BzjoGn4dN1cZeH34U7CGkDYf4ScZP4DvnBNCbY0xdwUKoQucDwPh1SoiGXAtnk1F8c2xY+BNIWOrMrpbXBITZ1kx+O2Hp32CGLrW6uaQ/O7UmRS3CkEvbrzq4L4AJQP7+vCyrNmdkKfeauZMPCLrl+E6kIlP4VwdAbkaKyyIERbDSiWqVDvpGTAc6Pai3gddBe/l+IGHo2mVi91ma2gCQ3mIdFHFSkUyt5oP7+XHCemb+zV04ek1mOR4Gq6d46suRAM0F6eMZgQuu/titY18yrcthyILFkhhW1PesNvcTaRBCwJO/qDhjW4F64l2rMefP856mD1U3bdQ5lyG76ovtPLonNpc/sT+K11ZToUgtp3OFQafrib3lQ3oFAIQXmcScEHukHZBsFcH2KUaExgIhgUSpg6vCuKmpWOmnd07sq2F4MwsD7DmYuKFdUUHlEMGerovRAZbNLtrpl9T5StTP6vOURYhx6/TMJsK87cP2QC6qrnCDJgBQMBXxkT4SEcuFtIxUz59MtnPzvZQsHrd6GJmcNr2OWBDaKJbPeRpgHmL/w2naDLpyFLNsS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E2OhVXZBXDZiIks6n95rIKrEMfuVpb1BO41gZEYJTMuL30o1gi9WaJbSD2K/F7J9CYlAGGEnfuHiwfSGqyCxf1modrTJjJ5F49Y09eEcAOU6+7Jm7mBckfAjaYibIuyrOU1Irz/PqSQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68f21137-b106-4433-8aac-08dbdfdcc2df X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:05.9922 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tdkGNHTwMOaY8O2VMiUdhi/UIyGhMz50dLkh9X4gaTG6Nf2uwqLktE5sIXRhPeZiVgJYN5OgNS3uOBQNgSKyZaRgMKhkArstJa0JPIai+8Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=754 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: TUW555Zy_SLIROHlA4PdPTstBnSoKQAr X-Proofpoint-ORIG-GUID: TUW555Zy_SLIROHlA4PdPTstBnSoKQAr X-Rspamd-Queue-Id: 0EADC10000C X-Rspam-User: X-Stat-Signature: tm69zy4hqpif8axe4dbmiu3ie1y37aa7 X-Rspamd-Server: rsp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l/s+9SAL6saUFgN2uwDf6Kxa9pxYLpiXRJNG5beOjEMo9tz0ZRarBB+xgVxHrqlXlt8LIqnXYl6y/mNvV30zqnewoJo33QLJjXBqKMPECepgw/UGiSGYsL138pQEkm/LjqTYFkPgt8c4OR5N/QT1/EK3YYJuuF/a9ROOSEKOBQe3Yo8lliVU5Z61YJ5pq6KDFNg1rOaNpVsfSDYBggJa8Suso/Kk2BdKzkyPf0NCEGI9JKnvfObJtTkGM7TYbDLPJQuVcC11SgDlg/XthiJ4gEJlv3qenxHeeICzk2x936kFKdWkYg9YjRMwld7HBcZDrk6TZqRfSKOZdpbCGgKZE4C54FxOtiQ17cNQYuR010W/YRPpCs1sbzTNzEKIuTlTCBY3J7WU1B+xcESOxMPBtkb/cbNIaPDu6TVZr2w2CmA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 40607ee97e4eec5655cc0f76a720bdc4c63a6434. Signed-off-by: Ankur Arora --- include/linux/entry-common.h | 4 ---- kernel/entry/common.c | 10 +--------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 49e9fe9489b6..fb2e349a17d2 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -2,7 +2,6 @@ #ifndef __LINUX_ENTRYCOMMON_H #define __LINUX_ENTRYCOMMON_H -#include #include #include #include @@ -415,9 +414,6 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); * Conditional reschedule with additional sanity checks. */ void irqentry_exit_cond_resched(void); -#ifdef CONFIG_PREEMPT_DYNAMIC -DECLARE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched); -#endif /** * irqentry_exit - Handle return from exception that used irqentry_enter() diff --git a/kernel/entry/common.c b/kernel/entry/common.c index d866c49dc015..194c349b8be7 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -388,9 +388,6 @@ void irqentry_exit_cond_resched(void) preempt_schedule_irq(); } } -#ifdef CONFIG_PREEMPT_DYNAMIC -DEFINE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched); -#endif noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) { @@ -417,13 +414,8 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) } instrumentation_begin(); - if (IS_ENABLED(CONFIG_PREEMPTION)) { -#ifdef CONFIG_PREEMT_DYNAMIC - static_call(irqentry_exit_cond_resched)(); -#else + if (IS_ENABLED(CONFIG_PREEMPTION)) irqentry_exit_cond_resched(); -#endif - } /* Covers both tracing and lockdep */ trace_hardirqs_on(); instrumentation_end(); From patchwork Tue Nov 7 21:57:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449431 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA4C9C4167D for ; Tue, 7 Nov 2023 23:09:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 70445440184; Tue, 7 Nov 2023 18:09:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 68A40440182; Tue, 7 Nov 2023 18:09:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 441D0440184; Tue, 7 Nov 2023 18:09:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2CAF0440182 for ; Tue, 7 Nov 2023 18:09:27 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id EF68BB4B69 for ; Tue, 7 Nov 2023 23:09:26 +0000 (UTC) X-FDA: 81432701532.29.DA8CED2 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf19.hostedemail.com (Postfix) with ESMTP id 78FDC1A0009 for ; Tue, 7 Nov 2023 23:09:23 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Z9k+9GKz; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=N6AE6kKb; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398563; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Bp892IXAzjBLR0DQyAUn8HlW3wzNjHwX15Uo1+fXI/I=; b=1HozddIyRLu8Cas8FFZ9Yfc6WmJ5EcYCK6cjrojAeVpFm8kcFnr+4a8OrmJmy7YCGsU9Nx +EBcYH9yBCWykMdnlzgIVZV6f3Wrwj3e7YGw2oFu7hiXU/rqg1xIPXtivT4cZ2Ax29hC6C fGO9qEZVeQuBbGLSZ0AII/tb1yVVa78= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Z9k+9GKz; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=N6AE6kKb; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398563; a=rsa-sha256; cv=pass; b=xKbIQ724sXmUBekE/Dv5S3jrZsNG6xX1NOsDR2BJwBoD2YOqxewxmCHqQUJQvd3LVQn35l jbc1P7hpK//klAfHsD7Zr+nEyGp3V4izI+4+cYYz2zlziytJMoG2GCNwBycj5elW8dKQOL jHoxVA5e5edXD6PkIWe+Da0AhFKZyAk= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJLxi004012; Tue, 7 Nov 2023 21:59:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Bp892IXAzjBLR0DQyAUn8HlW3wzNjHwX15Uo1+fXI/I=; b=Z9k+9GKztTxdms7lILm0Xab+vSoo0ZT0XxQX4lUFbyNj49Eu+9tfvXqG503MjvRLitfn btESfsxF4ox2f3L7Hf596k0ix89tp1zr9GnMjgptXo41FwBLHBDSQTyZYqeFjAEyV+jt cE+P1RUKtZcq5gLynarzQZFoxNNwn8QWy2BdBfYkjzA/nRSjcq/NbPnbhURsGu6A5YTl Ru7T3GjyYmmR+Cg6aFRQpNzFvJKhcUlYRlIqzUjUYDatyJLlDZNFXOtv4okwsYPpqOsQ LPrmoE0HjY7ckpzpHdDRU7tMg6XvjaGL0XJhkl9VoFvQbd8UZoPYENtR+1Y4IGpmJkIq bQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2ce-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:11 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIigG011238; Tue, 7 Nov 2023 21:59:10 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsj3u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pd7tE8WqtNsFKY4zYiIQg2sH2GTc4L5S4aFTfjT+T36RM1Z2F6MhxYFnJ16WOTOW7BOTOHgudD8OBADty722b/MyfrGka/folfgbTzuMk+4DtJg9wb6odojwXGeHZRl5bz6eBh+2KDM3Rw6y1b/ltm9fSkDYG4uZh0S5F6s/zHN6pTc48yoI6TVrX3ryn06PXlX6mQPoRduQfPPSJYLyrLapIoKHx565DHfNlytxHFPBMk3covnnq6yMo24WaGIAh3J2PKumkyvl4J4xNSw9veGvd9hdOwigmT1gcUOnWiiqj9XvKxzMIKYyMxXHGJsKih1s+4qm1ydKQhDtTIg3vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Bp892IXAzjBLR0DQyAUn8HlW3wzNjHwX15Uo1+fXI/I=; b=mdp+0V1Elr1h2xzKaq4T3McgRjCrCE4NC0tzdV21Oc21jMXXWwuyScUlm5TGY7fQh/ck18I4c6Oihk4PB1hQJGQrtokMOj7SvgLLF3J22L1W5yGMMJvBf0VmrDqS+ztd/uI9V9OkYUVz3iQnfwEiOH1IYj2TU8z8Xq1UD7RVa5i/auxfs8GezwaeqYRdr10tG+JXeyi2vpnafj4GQHduLGMGAijN4DRqZGnuZ34p941TnWCaaR+rvJiyRyUBc34L9iqxLsZO/62//MGjviz6GwFzFpnFvn2eo771QOeVJReLSgSyTJpfCyrdsOWJaKeYnSqUAfq82OAOMskWNxJh9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bp892IXAzjBLR0DQyAUn8HlW3wzNjHwX15Uo1+fXI/I=; b=N6AE6kKbk1j1XbsnxGy0TqSh23/Hy917dT/JeMOqxCRHkIMih14Ar26xs8Vz4La5K//2pT/mb9cgH8oopADHxMk8f0Ewwovb8QwyOgT711HbwVbZkHkn94XpY1Xo7x1Reuf8a6AcdAYI//2fu4FQAG7SXXZD/Co1TCEePgaXW2w= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:08 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:07 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 28/86] Revert "preempt/dynamic: Provide preempt_schedule[_notrace]() static calls" Date: Tue, 7 Nov 2023 13:57:14 -0800 Message-Id: <20231107215742.363031-29-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0036.namprd03.prod.outlook.com (2603:10b6:303:8e::11) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 1490ac5a-95b9-40e9-962f-08dbdfdcc409 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hxn2yiOmt/hPu6r3P/um9j8+GVr+qin6/dOCs8uYxiMcPul4ig6i9Gk9Y76is2z1bDfXgU6aVqWuLDCdSXM8CeDA7luFd5fTnV5RW/XZ5e62m5fivTR6u8WfxDQhLB0ZLUa4Qb4749JNoSWKyjramCARBS58gUsSpSUVPA8v1cZu95i59lrCCZqjVLDb3itY72/3Ck5yWsztGICP3Ofgozyju/LwxH59rV689JvdG0/gdRUKQ7IVK8yzmJZ1J3jBu60MElnr5B3JP0Th+rNKaETc3EU0+FOrh8MZJYeinm1mOOvxM48lx6dNyzkwOfE5IXDItEoTr+y2sLlOBR4eZKFwTizNhOIuiipJvyQx5OjSS6HTivjc5fwzANDr/BSJxe2iGvckhwf9pLIGXoY+rhNjv1AczmLvewdaXATu64JuWSb2NCh2MWXgUGw9eOute7nMLz9YErf3zwYDLtCvPfG7YLZ8hbZp5Xp2CJbndqKNtjKguMnzDHDGdqEWBNDCCJcQ+kuetdWCVi78abrt0l8F1+AzYs4poZgA6DQzyJvdfJBFTgYLMjNM6i41MkVZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HFCXfyORtFA7XB1Za8lqLdKHZSoa3IKgQoYWwn095hVgDAm4DdGM5aPTWbrxxgOz0WqPkWOBPjMspz31MZFD65tEdg0khPIpV8ei62jLPyzBJK+Df2IKcdWdWJ+Wym3H+/ewfiJYjjahTf+EU147UKMmI/Vi40pvsrXNlJRafsiJajUBZjHkS63ejRlNypd2ch2b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Wm2YwXNH1F+jfoyiq69KhKszIrnhu4Q/NTxbQJPLAnKI6xZyy07Xeq0lVPVOkCKk4rHIXknqiBx0OH6cqXM4bdRWovUSfO217LOmVqiAo3MvJcU2tkHqW3oEP+NjynAaBOPbMFzQBhvAmwAALvftnWOKD9j6GTlaLGF/+oqEaqCMlG6EcAF3nMBH55etnDz0SLteN/Y7FX3HXCYIp/SAZFBwhfAT5VYAINcJqm2SbffUTMf/nzI1QBJbUSNewg+Ff26K2qn6nEoxhfmYFKSuIFbVavDA5H70T6gPFyU2QXWpCLYE7cIyh/mawQv0o4XTVBehtiZxUm96hwfzWkZx54qvnYYY9XtFMQQ7zbgSu1kGtGFO309YN8kTTDzkovQK46Zby+SjhV7mHfuRLNkTAeaVf5AapSVjCzJQYk+Bp+H3bwUQTvyrEn3phDx4o0nU9BztT1ouFTrf8qpIx4Cg2Um4ApCNlC1yI+7sTlSj//4MhJcN3SRoa52ikFbqhd2oyEgE4/4vOwEFEc4LdBYUVI3ypsunlco18Lp2h15mLrACE8gELJFwIFrFp9Zph5fzSxz79Mj39479/1NQ7JDL6s+PhmY46U4R7Nfc3nn7NDS5yO2Ocxeok+2ZK6fPzKSgq0wIrLiUr/OrlBnvFA0ARXEXN9FmJCRJNDTdMfbR7CvmsPpJotfVf6Ek4F7XLnZz1tLfUljEkdK/Nn3KHShyuSFppOVnJfUgEV9bjxHMB8zWYl3Yv9aUqRFXIqhT7b+zp5BpFvv1CsK9cABwqpUuB5KZn8SHZ6ecpB77Y3hfkFxNJJcBxaT0JFZli9QrTKeyD6X63B9nWNNeFE0x4mNNc4jet8VW1MuNAgcBsjwjqbP7YIAvhe5YAA6qciDhxRw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1490ac5a-95b9-40e9-962f-08dbdfdcc409 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:07.9306 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fqlSgZUmtdtwxWaNIbSQB8Y3VJgxQbryh6tYiU3VtCDL7xIvHBEWqSLI//8CiAru+IyKhZDfsxjcyTOO3Eo9/j58W7oAAPzch8Jmq/cO4cM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: WjmE0m0sxKLONv5w4u4IRmAWICWqNPf7 X-Proofpoint-ORIG-GUID: WjmE0m0sxKLONv5w4u4IRmAWICWqNPf7 X-Rspam-User: X-Stat-Signature: 8jzeajwuigs74d94rxs5jwk84bhoztx9 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 78FDC1A0009 X-HE-Tag: 1699398563-186172 X-HE-Meta: U2FsdGVkX19LFh/yRdxoUqVpwAF5M/fIYv6qBEamuVssaQ2GthibhU8IVPLSrFiltk5g4YUcOO6WqrhgryRPOlhoKh9vdp6UG8TYHTlrdf1/X120r6Mf0xMp1m3t1DQ8dAGpybOfaCxSHGRI/YuEQ6f3u8H6rstboF6cf/X3ZFakS80BCc37ima0W3pp46ZMzLz6VOoWJ8TCBooxMZ3guNg6d1alzeM9psi8kUj2ZYSRMVjKJ6XydKYyF/c3SuI+4j60lr71BUgMxxKR+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2LE2l0SQh1bZA5BbJF+3N4QswMEXjiSPCtKSOlpzNlGCwctDJi/LP4XwnVmDa3CktSMDzsnSPj3zFYoSheDe7BpEbrRbwjBSbIOJm1oVZc24dpp/xMe0k+jItPlvxeOAFTjEd7g0xVV8c0CEhg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 2c9a98d3bc808717ab63ad928a2b568967775388. Signed-off-by: Ankur Arora --- arch/x86/include/asm/preempt.h | 34 ++++++++-------------------------- kernel/sched/core.c | 12 ------------ 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 967879366d27..a7bbe15145a5 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -7,7 +7,6 @@ #include #include -#include /* We use the MSB mostly because its available */ #define PREEMPT_NEED_RESCHED 0x80000000 @@ -105,33 +104,16 @@ static __always_inline bool should_resched(int preempt_offset) } #ifdef CONFIG_PREEMPTION + extern asmlinkage void preempt_schedule_thunk(void); +# define __preempt_schedule() \ + asm volatile ("call preempt_schedule_thunk" : ASM_CALL_CONSTRAINT) -extern asmlinkage void preempt_schedule(void); -extern asmlinkage void preempt_schedule_thunk(void); - -#define __preempt_schedule_func preempt_schedule_thunk - -DECLARE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); - -#define __preempt_schedule() \ -do { \ - __ADDRESSABLE(STATIC_CALL_KEY(preempt_schedule)); \ - asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule) : ASM_CALL_CONSTRAINT); \ -} while (0) - -extern asmlinkage void preempt_schedule_notrace(void); -extern asmlinkage void preempt_schedule_notrace_thunk(void); - -#define __preempt_schedule_notrace_func preempt_schedule_notrace_thunk - -DECLARE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); - -#define __preempt_schedule_notrace() \ -do { \ - __ADDRESSABLE(STATIC_CALL_KEY(preempt_schedule_notrace)); \ - asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule_notrace) : ASM_CALL_CONSTRAINT); \ -} while (0) + extern asmlinkage void preempt_schedule(void); + extern asmlinkage void preempt_schedule_notrace_thunk(void); +# define __preempt_schedule_notrace() \ + asm volatile ("call preempt_schedule_notrace_thunk" : ASM_CALL_CONSTRAINT) + extern asmlinkage void preempt_schedule_notrace(void); #endif #endif /* __ASM_PREEMPT_H */ diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 51df0b62f519..2e191992109b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6891,12 +6891,6 @@ asmlinkage __visible void __sched notrace preempt_schedule(void) NOKPROBE_SYMBOL(preempt_schedule); EXPORT_SYMBOL(preempt_schedule); -#ifdef CONFIG_PREEMPT_DYNAMIC -DEFINE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); -EXPORT_STATIC_CALL(preempt_schedule); -#endif - - /** * preempt_schedule_notrace - preempt_schedule called by tracing * @@ -6949,12 +6943,6 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) } EXPORT_SYMBOL_GPL(preempt_schedule_notrace); -#ifdef CONFIG_PREEMPT_DYNAMIC -DEFINE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); -EXPORT_STATIC_CALL(preempt_schedule_notrace); -#endif - - #endif /* CONFIG_PREEMPTION */ /* From patchwork Tue Nov 7 21:57:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449456 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A45CFC4332F for ; Tue, 7 Nov 2023 23:33:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F94B440182; Tue, 7 Nov 2023 18:33:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D10644017B; Tue, 7 Nov 2023 18:33:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2247B440182; Tue, 7 Nov 2023 18:33:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1219044017B for ; Tue, 7 Nov 2023 18:33:03 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E751C1A0B6E for ; Tue, 7 Nov 2023 23:33:02 +0000 (UTC) X-FDA: 81432761004.17.6890529 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 873EB180003 for ; Tue, 7 Nov 2023 23:32:59 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=wT9Iga96; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=e95fSTru; spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699399979; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=abad33qGN+uklk+IGGebiQpetbLRlFgeX9ut1oMLtiw=; b=DoAKBN3hdYMUIaGad5UhoHGSRMtO2yaC2bFavM0gykuEh8ib2sV+Pmvg9q8qpctqE6941D 8Sq5DPIzs7Hpa9wtmFKOb53yUt3dNM7CmV4SrQfy/J/506TghxSyjm2db6bVbK3NHXmHaK YTdXbbu9Ew6UvbyL5BKMZJXrNqtewxs= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699399979; a=rsa-sha256; cv=pass; b=n1APeblic9E7aOdq+xse+MxnMXVvIYD0OfKVGi1apVaagOczrD3dhp77bz6wZqi3vKxg+g H9cof0xaRPWmIcJjWG7SdBEXmsQFw4PwNjh9UtFjIdF08jj3PHb4mNwtBsI6v87VWZtfSj zS16hLArvxAdaRabijpZyh1+T+ERDEo= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=wT9Iga96; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=e95fSTru; spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJjiM005490; Tue, 7 Nov 2023 21:59:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=abad33qGN+uklk+IGGebiQpetbLRlFgeX9ut1oMLtiw=; b=wT9Iga964K+b3GdLrV7suhQ7EiLsrO2kzCSQOLlqHeH4UBGOmGIwo2EPs3eISN9We+yu 4y3bEi+nnHwJXfITjV2UPPQ9dbH4sONjM88osUWrcqlUnTaWMl01qQrRYjBdGU45k0+l 0DWIrZl2pZMSSuH0FZhK6Rsr5cWLn80iHhsnPTn+awAYGmOOqRwfZF+ddKs8+PtxNvPI I3EZn22pUrl/2LC70OZeqvw0SRtNp5KI4srIzZnVgu/CylZFGsWA2+cMPPlKyQP/zQzW 8+6wcWJOqsl6HjmS2e944hWtL3OyrM1/koemPuuF0FuXSJljNllw9sIeG7WuFNFlYykd Gw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2cm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:18 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIoFo000377; Tue, 7 Nov 2023 21:59:17 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsksb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RT3P6mT0ncRX1slcUtorTexisdq9agbSU74y8R19YJCgupfz6XvYYNFlCpT+m7B+Uj7Myp4vYapV18H3PxMAyKVwMzF3+T+H9r8Bv2f8TqqUUeWZrvXcDAI5WCCEorjws33s9qXZV108rPp/grJyjM3eB9lCEht48N6fyd2guP2sQLkJgNvQByo+cv/w3GfsodtVYydFHjzq/kdD7S+p26UcBOk22cwZTJB+Obst7e4eSupKZIkgCdc+CnUZ9os+2mGjDDl7aiSA8MyLWDmIlRMPG53WWuUf0JyXNvlpnWRo+sEmaXNdJlV0zjED85JoHYqg9yNEsbnVMIwlR/FZNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=abad33qGN+uklk+IGGebiQpetbLRlFgeX9ut1oMLtiw=; b=bPhVOs5WBekagtWPuQIlr1z5tWDUBazETWR8E0hrGiMt5njBLMaMeY15f4PPUdY7TMKZxRjuPqT7lN17Ywrr/EN3X05BLopMVjT5085JVbzffAikBTCn/AaEa+jDraCN7xi9EsmBs5e+3N/CD/+sNvpIbaj+48yB7r441yKBXQgBYqBmlQgnFwWbJvTgc7MwexbuU/VcQ8GXGxvE8OdxYvdYfcSwFFp6qgNbaaN3jKBlsM9IuXiNPaCCJLRTHIlJ7oNa6IYM6Wjd4STod9MfyNWipB2e6m6dz2S6vqVJzQAxuF057qiO574hL5TTW2lgTT62W1XrKy/brC0cI0mt/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=abad33qGN+uklk+IGGebiQpetbLRlFgeX9ut1oMLtiw=; b=e95fSTruHtL/5uZixN8p9k/IpUJBkzD19fWgkJj9sqKIda+kdBgwo9QwqOwsCe1tQWo5I4RUvm9BGn7CF6nPiO2Y910exBfe6nHAQ9gpAE+tZQdulx+5A827IUQk8P0n7k+Ku6EcuCsuC4TAApA4ZbbxvJ6Md3psfVzyYqHtEn4= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:10 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:09 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 29/86] Revert "preempt/dynamic: Provide cond_resched() and might_resched() static calls" Date: Tue, 7 Nov 2023 13:57:15 -0800 Message-Id: <20231107215742.363031-30-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0056.namprd03.prod.outlook.com (2603:10b6:303:8e::31) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 70876bdf-73a5-4e0a-0425-08dbdfdcc536 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /ran8/8mUBUuRMHICaN/U1DqYdb0ruGUg+LJ2l1tGRD6KnYkAYjz2IMZGv/tFwBJ8q2xFwoUJCkjG9aOSRypzjUiFAFxvyNq62mQY9wD7XploGPsMntw1Ghn4ASQYWRqxts3WMS82NBNhZIgKfITT9YXc5nfTObEkey1fGN9fUvbqifYhnFkFYrmwEMncPbMDGc030/1pMGxZSLCljxqkm/kOsK9TZM0aPGClgB+ptJpYNotWN1Erta76TwCMrldbKTBEEUrO6MaKjZmRGBYQAX6Yh4r/vfuyl8HPuEmIOsc99nBg/sqVSEa0P4opw9IALFVOcLzkGoX5slyUABWcGwOmlHJj06Ueym6b+1Skmi6NTCNFVAU3yyezllGcsjCfJBZyvZ7krnB+uHgiGkc0Xil0heHv7r2s/YavrssZvmhElxkDfNB+KEHNLplAemIwjjH3P+K1RbexVS1DsPnzxymI8+PSCA6eL2BjQCHsWHR3l6SGKSzqte7VEnEtMKfQ5RQTGUMRK8fbqvxHtWhdVwMdiunkZi0AFxrqEdTzklviTBZQjWdPryQmXVX1O3V X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: b/myVqYh3rUrZ5mQLkTCHc8jsfhE5kHzrEMpmT5cjM45msEk/fE0PPl5+br7+Qxt3XEzWEQspCMfO9sVwKVpTyMJqLRz7llugIbQzCYa2P5wR6ZzulCss/xqEPRjVsuod7kgGCxvf4HXtJikRMh8zG3ARAp+N9Of5/2z0YDDIS8vXk6OLYhrUku/Z0T6RPYmU9PNv4j5JCkXKjWsteOz5XSESR2TefSh/BMY1qy9kV8T3UNb0H03lxxROPvsTBlmYzPGiktYzWztkX5SPm7RO9nDgkgABwpHnoHzGN3Vc9emjiOdj8cWy72nkUk2B864S7k4kjoSIISWrYHSdTBO0JkP07Y7MGyboZbUtUXh+Nv8TLrQzkgewLkKqDV6OOM3tlfqbFA/AO2pYUeD8+EczvAhi0O2wTNV23JH2k6VNqiyz5yVlE+XuabaYrgYPslxx3Ta/9DpjE9v5uadLRgO8yJwh607ILNOK3qb8XFzcUm8mecljjUN9aapzTvhf0mn9RELybDIkwXh0ySHBtqCnLvYDx5stMi5KZvW/Vj98gsHUCtJc3gyWrJxo3tFP5arMgjgwW5o3LuZei8fKRDKx/RUnPq7kx0cFQHGHhqXVsu5e1SBssg9eia0s4kr1ru9hrooWTZvmHbxW+O2muB2Z0PLxYUSEFPfXOEq2+2BugqtpLIGeJ9VpwSncQnNdwhdFV+KaDYrpsI1tlHVQHEy2QD3Nl9ITN6PoufZqdgIVS9z7+6SHdxa5nUo0Y3mGikX/2EnENFLFgA4MiOkyHnBLPRRcEwMghivKyGU0LUXUppKmYDGQXKPGtADqyi01YaOdSJLXh7LUIGqK0JE5K/7RKZ4D6hLr5SYfsJXHVuVxiwTBBWzGr5jKfUj1UbTJ/gy4Ap6/7zBmhl90jDUOTpEk1zsdmxtZbd8aqZZQFasi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Hj+anxvyXEuCGuOiPXFXhT+wbZCEze8FcSol2acEDyqan2GcYXAlyoSgUFAjgDA77y0OpGNSpNPHKWjmYPYU9eSI4gqSNkV8OwSHH2MQvRAAdlK2ofWt+zuCMOck2HmdP3FRAgZd2Ye3gsE+5iYd2DX1GEag== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70876bdf-73a5-4e0a-0425-08dbdfdcc536 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:09.9102 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2ja57lp4PQXBN/w8yidKjvavsD2HDtXBLZszDkgjMSNytBIHbi6MMZd/MNT0qgcTo6UJ8JwavQk1PLH9olLqkL5OY33oC7ByTuRMkYSj/hw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: IJXO7Fd25FaxiNLHM3P5iaGMtBRPlFCT X-Proofpoint-ORIG-GUID: IJXO7Fd25FaxiNLHM3P5iaGMtBRPlFCT X-Rspamd-Queue-Id: 873EB180003 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: rdbgq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dvdz4WJVnyF2Q3shJRZd9mMCwnVoYRYWez0hnYKjc+OwX5fGO6+975g2FgABIHpX4jekdTOKHuahJtceM9I+6tSYT2ZQIHk2D05BE02HVp/VZn9Q/AmFVVaMqzZ3USI83Igxu7g+4VHenJfVkSRcFJuEKpn6mFoWcNiEmTss0sOuww/fo+/gi5RtPtSo824tDiO0tuo87MgiXb6izecn7zpqHHx807bnTt8vKY6EIw6HQDBOadz7RuQVc6/WewoCg+CGn/P1F8nId8NS43bddxy0Bk/K5tEsenY6+56ra0kRF5I6eP/XjpUr41ou+F6zHQx0+opOI0DPr1xwUSGSgm6caxO5DwksF+rd+A2V0ggwKvTtZJaJF3/S2OQk+DKHlAWQwf4/qRdpubySU1BxJB+DWlfcoqBmyq9+Ja7iBJAM/HYS9KedJoHhE25oLvokrFF1vcchng+dwwLhtSWg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit b965f1ddb47daa5b8b2e2bc9c921431236830367. Signed-off-by: Ankur Arora --- include/linux/kernel.h | 22 +++------------------- include/linux/sched.h | 27 +++------------------------ kernel/sched/core.c | 14 +++----------- 3 files changed, 9 insertions(+), 54 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5f99720d0cca..cf077cd69643 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -97,26 +96,11 @@ struct completion; struct user; #ifdef CONFIG_PREEMPT_VOLUNTARY - -extern int __cond_resched(void); -# define might_resched() __cond_resched() - -#elif defined(CONFIG_PREEMPT_DYNAMIC) - -extern int __cond_resched(void); - -DECLARE_STATIC_CALL(might_resched, __cond_resched); - -static __always_inline void might_resched(void) -{ - static_call(might_resched)(); -} - +extern int _cond_resched(void); +# define might_resched() _cond_resched() #else - # define might_resched() do { } while (0) - -#endif /* CONFIG_PREEMPT_* */ +#endif #ifdef CONFIG_DEBUG_ATOMIC_SLEEP extern void __might_resched(const char *file, int line, unsigned int offsets); diff --git a/include/linux/sched.h b/include/linux/sched.h index 2b1f3008c90e..95d47783ff6e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2081,32 +2081,11 @@ static inline int test_tsk_need_resched(struct task_struct *tsk) * value indicates whether a reschedule was done in fact. * cond_resched_lock() will drop the spinlock before scheduling, */ -#if !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) -extern int __cond_resched(void); - -#ifdef CONFIG_PREEMPT_DYNAMIC - -DECLARE_STATIC_CALL(cond_resched, __cond_resched); - -static __always_inline int _cond_resched(void) -{ - return static_call(cond_resched)(); -} - +#ifndef CONFIG_PREEMPTION +extern int _cond_resched(void); #else - -static inline int _cond_resched(void) -{ - return __cond_resched(); -} - -#endif /* CONFIG_PREEMPT_DYNAMIC */ - -#else - static inline int _cond_resched(void) { return 0; } - -#endif /* !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) */ +#endif #define cond_resched() ({ \ __might_resched(__FILE__, __LINE__, 0); \ diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2e191992109b..5a0bf43975d4 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8515,8 +8515,8 @@ SYSCALL_DEFINE0(sched_yield) return 0; } -#if !defined(CONFIG_PREEMPTION) || defined(CONFIG_PREEMPT_DYNAMIC) -int __sched __cond_resched(void) +#ifndef CONFIG_PREEMPTION +int __sched _cond_resched(void) { if (should_resched(0)) { preempt_schedule_common(); @@ -8538,15 +8538,7 @@ int __sched __cond_resched(void) #endif return 0; } -EXPORT_SYMBOL(__cond_resched); -#endif - -#ifdef CONFIG_PREEMPT_DYNAMIC -DEFINE_STATIC_CALL_RET0(cond_resched, __cond_resched); -EXPORT_STATIC_CALL(cond_resched); - -DEFINE_STATIC_CALL_RET0(might_resched, __cond_resched); -EXPORT_STATIC_CALL(might_resched); +EXPORT_SYMBOL(_cond_resched); #endif /* From patchwork Tue Nov 7 21:57:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28A5BC4167B for ; Tue, 7 Nov 2023 22:00:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 300888D0079; Tue, 7 Nov 2023 16:59:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 28A628D0066; Tue, 7 Nov 2023 16:59:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE3318D007A; Tue, 7 Nov 2023 16:59:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CF0BB8D0066 for ; Tue, 7 Nov 2023 16:59:48 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A59C61402AE for ; Tue, 7 Nov 2023 21:59:48 +0000 (UTC) X-FDA: 81432526056.07.EB7F579 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf25.hostedemail.com (Postfix) with ESMTP id 4A0ECA0009 for ; Tue, 7 Nov 2023 21:59:45 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=lLX+hFAe; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Scz+60d8; spf=pass (imf25.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394385; a=rsa-sha256; cv=pass; b=k0n5+mgNIai0ZrHQ0N6KrsVFIAElRn8Rrvtm1wtPv1OcMMfQSI+sV9xV8ynUKXh2XAbGJ/ oSV43u4wsAJpaQxg7vZrv+HupqiHs7Y6Gj04K5rLnCZ4jot/Z8CyMlSQvbLMf2nOlDhT+S NKXAhRg4xi2BQ0wQ2JJTnzHw9XODv+0= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=lLX+hFAe; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Scz+60d8; spf=pass (imf25.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394385; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LcTgexJPyuQPcOmH0Fd+Kj3ZYGZ75rmxs9CVuGAoeCI=; b=GOAOg8bTyDq+kAqUgFmG6hV9+VK96XdvWKfI2RWyQ9469WcxNF2KANkap+cxjbkyAQoaRv 9FUBVJivq5Ac6YzfCoc7VXSXW7yWdB/JF8A6zWIOE5dPmltXwFP98QMlseABA3ybSH7XCQ 5YoPkbwguunNWH806Ys9RUBilCvHllw= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJqic015022; Tue, 7 Nov 2023 21:59:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=LcTgexJPyuQPcOmH0Fd+Kj3ZYGZ75rmxs9CVuGAoeCI=; b=lLX+hFAeJhz35CtEoFcb/aMQQYHaHDSUzfF0RuNBdaXOvrdaWw8odKtDWpdFNTVgJU3x EKENUdDlp5DYqjNGNgxH70KUAzRq2BPsHW6D7bR9ysED/Kv1Fqb8oj9vMPuKFHOk8Obz CRPVOhLyFqR7I07dQ8z9hCZn6nGkbdtd2Y0AXk2h8xJ9XhrrESGhhKTiGtpqUzHSsbQq fATf1SPyhcPAld2zouQf1AGiIcDyHyYsNdf81EsLSLpqnOGvOJuqTRyI+fBCXrjCZbWR rOIZ3hpdre0GnCeba+4Q7YCosIbSXBsmjBmvFqrhINprJZD2S+TCU7oIsgtGO3f8MoEx nQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2ds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:19 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIoFp000377; Tue, 7 Nov 2023 21:59:18 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsksb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jKwbnC15dgiDyd03FgZI0Qjj69U7FppFT/oWjjkxKDFOZUga7cO7rJm50fSj6U/6UHO/RMvy/eNgl1JxQpaiRb/Jh6S4y/Tyteqs9fju3PKRkrroeBDGrfgu7apWktOHhmPiINpoOyd/SwLcdVHyono6EXZua2+SsSUVBGePSfD3BiZKYKGNIdL86USgY9NgjRcoC0UEQfGUSFyq+h8drOHOQl8puL5y/06vR7OQu8NdSMRBDkwgx/nTY7hqQrZwehLs2plx5e8eSb7uh74YKUo8JhaGLEiu0VCNwOmxv8m+KWwNOM/f4c0o31DO7jQAX7TI3hax/5kL1m6ANrhG8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=LcTgexJPyuQPcOmH0Fd+Kj3ZYGZ75rmxs9CVuGAoeCI=; b=GBkTPLJOcKGsUhucH4sOg1/79UjmVD5Pi3n8H6GCHJKM4cCzuViVYi0HAjtVV/YO0zkohiVmW499C1fG23tMr94JwfqKtiAoeMOFf1SeXnjSftkXwL9N0PZ2Pmgr7F2U5cOr3Wpmd02uuRWoBNlju6McsejlhejAHgEhVTCeJdoWPjv9LgJvJkeOtc0vqAf5/Kww+LwEd5SAjYIMMVVng0agInw8fQ8BDxZae88DflFq4iDZDgfpM+z/kM/fDjp6wBr885lcJCvAAhH+RKzmb6trChEK9ck3Rhu0N6YjC3T1ztlJL4dg+2dUf8Z94AARgAtVpEUqnJdH4HQpBaf1sw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LcTgexJPyuQPcOmH0Fd+Kj3ZYGZ75rmxs9CVuGAoeCI=; b=Scz+60d84k46+QtmwXWxmiYHvTsgcUHxoGjNW8/L0Ti6Yub/ki/PhmkmhOYNaVnyqNW8A23a7FgLMD0X45fRSzRGrYtxoGxU1llxE2cqV1h+4INW7y0/TtwIZQrYbuLZ9Wsvs6OAcSp3vO5haqe/GA06XcCS/s8oACXbnIRlch0= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:15 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:15 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 30/86] Revert "preempt: Introduce CONFIG_PREEMPT_DYNAMIC" Date: Tue, 7 Nov 2023 13:57:16 -0800 Message-Id: <20231107215742.363031-31-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR06CA0017.namprd06.prod.outlook.com (2603:10b6:303:2a::22) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 768ec85e-8e7b-486e-9e52-08dbdfdcc86c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uMGXLepc3HQOfbv1ykBcBGEO2se/ojm8vHqgq1SqxKCS1hd0XbgYswIEAFkGqrSBIFmWpWJUZQ0ZCixzPJn39Gvnj2cBpkb3zb5dM8V3eCJfLAWy+Yc+TPSM4f3Mwb/3bczha5QDWpxJ9lqImyGh+p+IFjfAgvhNELaEl/5biDGa6wQfJBLRx7nnuh8Yji6cl5P+SDwaoFS8By3oIo67UQca+m9TjCsBD8rEKK46MjFalPv7QIqm/9VTvsw0T831vCt4MvHJFvKTWgAPExWlTR1Q6MNFivcm0X5YsCw2WNMDWPK7m5J8TbDxHzehjwRRhudQNE9w6IuEJvtlNrS8bsBdA6NOM9h/Wtky0hN/Mo2PNfzFosGDPPk9uhuuIlW/WV+6ercH8f7N5xV/+A6bYnwFkP+TDfAGOkIBjSn/QSZUe74KKAMppaFTItq64Ka4+g1dYJP8sI3f2pe/Qt8J42atWW+B6qgal7pMqJNnmSw9NAX/jKmoHSRf4dhe+q5bsUuUSytVnx0yvM3Tym1Cz3Tiuy7bJPXxC5ln0DxPhBvd+VtK5pW0yWVa9suonK/P X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(66899024)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vkZjPl6EjXh0yHXq57VgbyXufjA+NPByf2MRSf1cG/mJg/3EqIBkQGrVpUzMnuqaSuA3wwi2He168kylo7Z2eEeKbMHuB5NlDmEK7GSSEwuKBWP6ee9oMYnNwUAn08oukJ9HGXguABYvxdv38HIisJk2pn3P/s4lPMVROmQcNR0qIIjkEVPMPtl8RJXAiFYeAKHkp7phj1uv83ffjqGatQPaDZN5HuHz4zg0DJ4PPVjanKX7za+YTKN+kezYFpWg0CJxji1oBQ2gtoJqENH5Xf277IKwksb8HGKuBViE3fbKr0as6SkoBo2UfC8TgrNPT1xOo6wiAu5UY0w6maD/SIYwoze5NbFlABx7e/A+Z77BgO7kKS4mY96TmkRrIYPHyAPMlneHAcDxKvmlGE8+ZR63vre/hCWtR48Y7C5ewCa/r7MF5L7jgxdzozy+UjzpIn2tKTpnbXsyPPho9PCKnAIAhVIBtm7Nd7p3Xl91rT8LcwdM400pu3ZY5xa5/7iI8B/nn6bqTTkU+A0Pn6Xn9Duw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d0bkKQav4YG93JgroTAG6Km0Q+MEKQbLw39cyK2rwLAwGX6J1gaeuOnvS6QmsAB6VlQ0wkNm4bUQqnflbywLm3SZmxUDfjWYK4gZCEN19bLwZ/FxN+9YUNYscjC+eRFQ4vVjPTvwbErGN/OIH4/G6YwsKDOuOaB8lATdIw3yq3fHCNSr4S7Ih8kEBvQmw4X5Dsf/74PN2bm6GbMnUoE22jU0qC9jyDDi+lI92ZH36R9bSYzrRg1nQ8JBbPfnouHKmBmB5eeL+0tFWgi/0UtKcgiBQRbAkOXkfGE8Ub2UbbIcODHckUpVc1ct3zfJcrX3yIMoeM+1m7irXLyArMaOA4MNmTNF2FR5AArWHRYM+rMjp6OOJKiuLhkgz67Hmf0zYbpkMyFEtyiizNXcH20FY8SnNK8poF79qHWOeO/w4nqHFuwO1u0NvBvFoteth93WOi7W78FFeu9QtquLXQS0ZpsdWSxsRXLjjHTS7QWacn1hrSBp0YKpw/FyJevG9SF3HB+NqC4AvG8c0KYVptQKGEcrcCvuWP3wYkjA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 768ec85e-8e7b-486e-9e52-08dbdfdcc86c X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:15.3430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rMH/Xcuvqw4kwJSlyFG9csJOThlP86yzUr/ROLRvFVu91xQCfvthCgYTXAq2MvYtx+XM27jnBoQQSYlEwDxILbHL9CpuescWGq8vH7djXSU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=453 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: H18O-wWt9i3kyHKp7hdql27CqSflnLOl X-Proofpoint-ORIG-GUID: H18O-wWt9i3kyHKp7hdql27CqSflnLOl X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 4A0ECA0009 X-Stat-Signature: qqeez8btmfgmn3graioc7xo8pt14phf8 X-Rspam-User: X-HE-Tag: 1699394385-538776 X-HE-Meta: U2FsdGVkX18ITO6xyEmnSlgwOFyGQW43iv6bPZKTQGitlYHExjLxVs0FTWrRlDZOGXqovacjYh6eDpTMmr7IZ4ZfF6vMk6UFABbbGfSM44KxhawGzhirDWahBeAugGJY3JlNsn+fbTIL0BNkR6J0vuZuOuiw7yEAMOLtelRJXSYlX7N0YuOuWe4TS/J0XNtJzFVQPvP0VPumlIwHKvysdfzfktDG1ZmZxiq2O3tvHykavobmrQI6/lG4TZ2/LFZ+c1N3zszFzEgQrN4qSUhOwkWnkWTmzMT98gbM47ob9Htsw8PtR05ivuhqbSXGhUl3a/Xcp1gcwki/NfAjHVrUf+VZN08FwIS98bte/jze3L7NT1/qNb4Tqma5a3zBdmD8DDomCkOnzg6DFxDoFB4JSKWpxii3XtsysJQhmR88H/FQRXMLBslR8LG7KO/9HVqEQinxuc+GDLpf2fOeHpaudu1Wk0KVTbgIHjUTn12JtQuAExiiNssZxMLxPGIvoZrlXrqTNAXVgU1t7C11w1XJ7tZo80Ul3XjnPUGkQClCpjysMvvPxKj5eXizu4ujHbn+v+W2Rc2Oo7SKtQWWKb1O5rxgbbUKpL5q5NKPZYKKVjxqiZkMzP/xuqCDdXFfWpsrIMI5cKtSAO+khGJVNpgBE7sT5pPOJyBwt/evpcmGisf8dRIhBPBOYMBBE5AeEjIVAtphJS9KrZ8F5SEAOufDRjTOTQrJuY6h+gz6ouRsH4sDFLAyFIzo5rXBH6dlquk3Ajd2ITizYCVMSgvyKd4syowywaDTaHbtercQnPQlLGq8Dc1qdjuSLS1nkgNScjYV9vxZVCyJxvQ17FIdJmisIzWsHZs/hdhlVUN6xgw9rmM385oNquy007EWvy87BayU3Lg7Dft00+1LxhPhd7+koQAMBt8I9Nwf5Ef2cJzKvGNVgIEAkZoPhESCziwalbmkpXNbRapoJVvjZzqhs+z kh4h97i1 jRlDva030VBexAEuaWt4MPoWyjbgAfAkl15mQObzFEyW0e/MMKaQ4BYSkPc1t8gDmKcmS/qlETnln5J5WYHJwNMIfzuT865ecyih4fBzDgUpS4ZidM21qD2oX95ZyfMgxuZ89tAsEY3xjz9m/AYzYQpO6eOorLTu/EBtkBSQkF/hP/z8ggTcXpD9q/HCkPZ87mvzcCPHrpMSXyHhE/Ab2dhQQ9TBndfn92u0C47EOX5LMdIAg5X0yxSC9XSaBuVEKpj/fxlcuKf0qNjT1xFgyQsnSf1jrcgYYwMOHaVg/2/fAtR+nIybAYVl5Y8ZfsAHdviJYDAyt+e5fYoM1HnXZKfusNteTaLNb/7jqihw6cjXPD4XDO9RSkcEQPyErNrDNdCozq+7O/QIPOc9DbRzSGKkSUku72L+oqSpZLDNX9dsqw1Ez5SSDgukjlaTsRQ3+txOh322alASab1DQzso8WD5P6Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This reverts commit 6ef869e0647439af0fc28dde162d33320d4e1dd7. Also remove the CONFIG_PREEMPT_DYNAMIC guarded inclusion of linux/entry-common.h which seems to have been missed somewhere. Signed-off-by: Ankur Arora --- .../admin-guide/kernel-parameters.txt | 7 ------- arch/Kconfig | 9 --------- arch/x86/Kconfig | 1 - kernel/Kconfig.preempt | 19 ------------------- kernel/sched/core.c | 6 ------ 5 files changed, 42 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 0a1731a0f0ef..93b60558a78f 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4577,13 +4577,6 @@ Format: {"off"} Disable Hardware Transactional Memory - preempt= [KNL] - Select preemption mode if you have CONFIG_PREEMPT_DYNAMIC - none - Limited to cond_resched() calls - voluntary - Limited to cond_resched() and might_sleep() calls - full - Any section that isn't explicitly preempt disabled - can be preempted anytime. - print-fatal-signals= [KNL] debug: print fatal signals diff --git a/arch/Kconfig b/arch/Kconfig index afe6785fd3e2..05ce60036ecc 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1393,15 +1393,6 @@ config HAVE_STATIC_CALL_INLINE depends on HAVE_STATIC_CALL select OBJTOOL -config HAVE_PREEMPT_DYNAMIC - bool - depends on HAVE_STATIC_CALL - depends on GENERIC_ENTRY - help - Select this if the architecture support boot time preempt setting - on top of static calls. It is strongly advised to support inline - static call to avoid any overhead. - config ARCH_WANT_LD_ORPHAN_WARN bool help diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ec71c232af32..76e418bf469d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -270,7 +270,6 @@ config X86 select HAVE_STACK_VALIDATION if HAVE_OBJTOOL select HAVE_STATIC_CALL select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL - select HAVE_PREEMPT_DYNAMIC select HAVE_RSEQ select HAVE_RUST if X86_64 select HAVE_SYSCALL_TRACEPOINTS diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index 5876e30c5740..715e7aebb9d8 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -40,7 +40,6 @@ config PREEMPT depends on !ARCH_NO_PREEMPT select PREEMPTION select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK - select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC help This option reduces the latency of the kernel by making all kernel code (that is not executing in a critical section) @@ -82,24 +81,6 @@ config PREEMPTION bool select PREEMPT_COUNT -config PREEMPT_DYNAMIC - bool - help - This option allows to define the preemption model on the kernel - command line parameter and thus override the default preemption - model defined during compile time. - - The feature is primarily interesting for Linux distributions which - provide a pre-built kernel binary to reduce the number of kernel - flavors they offer while still offering different usecases. - - The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled - but if runtime patching is not available for the specific architecture - then the potential overhead should be considered. - - Interesting if you want the same pre-built kernel should be used for - both Server and Desktop workloads. - config SCHED_CORE bool "Core Scheduling for SMT" depends on SCHED_SMT diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5a0bf43975d4..e30007c11722 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -65,12 +65,6 @@ #include #include -#ifdef CONFIG_PREEMPT_DYNAMIC -# ifdef CONFIG_GENERIC_ENTRY -# include -# endif -#endif - #include #include From patchwork Tue Nov 7 21:57:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88D9AC4332F for ; Tue, 7 Nov 2023 22:00:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1022A8D0077; Tue, 7 Nov 2023 16:59:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 065558D0066; Tue, 7 Nov 2023 16:59:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5F968D0077; Tue, 7 Nov 2023 16:59:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id BCD968D0066 for ; Tue, 7 Nov 2023 16:59:44 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A1E3E1CB5D8 for ; Tue, 7 Nov 2023 21:59:44 +0000 (UTC) X-FDA: 81432525888.10.0C30C39 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 45157C0005 for ; Tue, 7 Nov 2023 21:59:41 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=FFdpB0S6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RVXNSbW3; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf22.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394381; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=z22EkTdon0g5V3YJu1mEM8J/zKtqGRodk90GYRkYj74=; b=ctA4pt9vYf05hyb5pd7vHPoZSvn3GMxSj7D+ca3cFSQsg+YclkvTPxAnOQvhdFcn7fD56B rqoP/8HGv5XnTFYT/2vzjgot5DrnNQQgwBuOOVFnhjUvyjUhkwI+Rkqkvzo6ZRC/63ca+t 74JWEKoDPo5ZbxSH0WCifz+QbKWbtDA= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=FFdpB0S6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RVXNSbW3; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf22.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394381; a=rsa-sha256; cv=pass; b=BA0eVQHiuixPo5C1Nl6mI6fpETfEykzZczpYPnJq7KJhgmcBmqiqgiXUGlFvE6euag46OQ 90hmIUkcfTL0OsGnD0tfZ7kGH4tV+JQxCNaM4lLG3HgGOmLGUn5IX5G2BpL7vh1WhdEC4c BxBn98K1HyJ2SBO2fpbhRB089FcB2AM= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJwFt020749; Tue, 7 Nov 2023 21:59:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=z22EkTdon0g5V3YJu1mEM8J/zKtqGRodk90GYRkYj74=; b=FFdpB0S6nziF8tQe76iwBOZK4El65rDLvoxjoi1SXSrVhG9FGVR28bTCIRQHlYrwmmld M9cj3TVVtyqmDI0ARowRxeIZDBMF4Vd/+1Z4mVsM9fLx/YmZUmNzql5LokAhT6sm1dMh jco00G0nuIwFR99VUW15YTrgy2ngjzgTgCNVQ4TL0s9bkdRyW6Z83txg6Tnlpo6/oWdG a7jnVgIAVR5+m4jOECNx0iGiBD4N+O2WRWoRyHPCBCP0GNeF639UsQOBdnOaazFstTnK /oi/4MAHwx5YTDLyhi50kifTtluoi+FfW46sNk2gZQsJfcNFkXH7Kzvc64B2ZSS6JjPJ jQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202re-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:21 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJBP4031966; Tue, 7 Nov 2023 21:59:20 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w221gj3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CNLoeAVD2DRi8zixoPMAspdcYkZbB1ZTfcahWbvA2HI8AdVD7pXr+jRzrDPq756N6UCdYZMGA+BvGNPvHmza0eqGS4IPFrZsKEfancsgV9zyx7/0Dx64ynYpZG/KITxKdBdFjHL20Obp3BZZX1tpm0MkXLT4sv5ZC4ayH1xbl7VksG2sS1nHSQD49an5NU/ZyIspsWrs2FagtvKiFejxwaSyjF+brGlAs+JsHdISlFW0yPxNyiaZT3VdobuYPj4fQMBIIsuVeISLOiuYo+OkfvG3pDhcxBfDprtTs5ZtBb5E68dj7l7GLalPUxpd2zkUT+UvKcefz9uxCbFOgwRTHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=z22EkTdon0g5V3YJu1mEM8J/zKtqGRodk90GYRkYj74=; b=PWCHsjs9IV//z9R1TCYNO9LKx+AiL4gD3dSJGbmk8F+xmyVamQI6ITkxTckGrKUhjX2AqheeiyEG3857arq12Nx8LE5zhsngb63OsdKR36h6T+29/VFRfhEdBbXRBG8fUq/9GqyyOVO97/mSFpvDIpBnru2OOIo5oMo4/v7WdRCAbEdLExObGRT5mT0qcbWJFVEjfKYxg3Hh/YZFY6D2/8q854fLuFqFntdHp5eTnR+zh2QAlRNEVm/twRtIc2lcwu+cLAZn3e+nJ/iEWVWDTBWKzJyD9u/lwxQuCcCVegzvmJps3ICua3fyurl8h+b9ciyKWp7dTEVHvX3/ntXWpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z22EkTdon0g5V3YJu1mEM8J/zKtqGRodk90GYRkYj74=; b=RVXNSbW3oIB+lf1IakqO8y6twnZYRo0WnbcRmZa395DF+E4A7mP1Ek0xnnti/LFX8JV3pcqqXpks6uQVuaOFyxs9p6EvmAuKTA593wgp6tUkLeg316jiITT21aIoO4MwmU4VjhEWCefYpU1kWls15LFv5b4nsyd3fSmAR8AYgGk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:18 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:18 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 31/86] x86/thread_info: add TIF_NEED_RESCHED_LAZY Date: Tue, 7 Nov 2023 13:57:17 -0800 Message-Id: <20231107215742.363031-32-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0141.namprd04.prod.outlook.com (2603:10b6:303:84::26) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 9172bb3b-b07d-4c9b-2fee-08dbdfdcca1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZT4IyBBIRtlcFMjE1DQC7VjQ8JISx6OcW35KM5S7HNeXRPzZHDxd2yZWPsEj7CqmdquxlplCVezFprhfKFClm0T3PUu56CJp1WO1UQAqLlaiyfyAgdG5b4HbgGIvo02lUNCIzHR12REDimKgTuBnHOqmqf3mgZOm7fIUJJqIyoA6A85+dDpw+ukUgCdj82fUnsQmxT4ZpZOIRi+O0gWuorCsrkw/HTuj73+AN1Rod80RQbFmfwvTw3+QkSZt69hUo1T8djZIq01pRL9u/H3OEZM7dGR6UAwYNJ7a2Vn7186pB6edxiIQcQyFBTrxQc8ic2uSWl6dz1txE93wgis2/wVXuK4Z+eO4Prd10x7fJ1/5828+YGVqODxwdFkRGgwiuixtjpW3FqW38gs32jkzq/4AWtnd9dSMIyEI336menHV6EzPxlP5zBiTK8Cg0BSq0TL23KcbciHqN5RhOPdv3xI8p2c09G2qu4HjIwLpk4fokTbvA6bx1OZOHYNvPaeI3DTYAP0/32dxjal3dL2mQNrna6E80JzQFj2BHeIVa6/NOKygcVs/MIkIlej7k2FQ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rorD45yJTGB2LgLsaIkU0wzocT5YjWLScW2k1IA+GfvQ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id: 9172bb3b-b07d-4c9b-2fee-08dbdfdcca1c X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:18.1078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l3EirQ0RilBqA3JT42anADPP34gCqYyCJrlp9iBcpzag3bliSpduFzqc5MR1LU45C5cvQuU8iBW1fw917X7EDGUuu8enAs5XEukK9LMmoL8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=831 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: fyAO-9DTqy6A0oC-6bMXHmkUqVJJ89UK X-Proofpoint-ORIG-GUID: fyAO-9DTqy6A0oC-6bMXHmkUqVJJ89UK X-Rspamd-Queue-Id: 45157C0005 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: s3mfgwe1nf56nmrbcnga774qjzmx9j8p X-HE-Tag: 1699394381-847183 X-HE-Meta: U2FsdGVkX1/IDKI4MpINvSqxLAh69I6LB83umWVJO+y1SWp1uPIi7cRRMp/8qQZBGCIAbIbjD59tJmrXj27byl4BZxsssF85Fl5NBD+4ve1T0cv4N1sMDHJlebPwPjBInmPnnSjD1lYJxYNm4KzEVK3bEYc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QKsHxEAPpm4vu7RabJ/JspJP9kwbrRYBCsl66n/Y2qpIO5AnkO8OjHge8ME7p3TgLBTeLSkm7g6Zvy8MthXPq2TH/awCOypmpXyzrCAIIC7fhL9p0IQQvNEP1LH7kSoaOaaEQav6Qqa/Eob436J0Vw2kY1wZKQ/+ZQcsxNkHDQVtA3fiSrXUyD484ua2HnFimuSpx66jJMaYpsA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Add a new flag, TIF_NEED_RESCHED_LAZY which with TIF_NEED_RESCHED gives the scheduler two levels of rescheduling priority: TIF_NEED_RESCHED means that rescheduling happens at the next opportunity; TIF_NEED_RESCHED_LAZY is used to note that a reschedule is needed but does not impose any other constraints on the scheduler. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- arch/x86/include/asm/thread_info.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index d63b02940747..114d12120051 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -81,8 +81,9 @@ struct thread_info { #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ -#define TIF_SSBD 5 /* Speculative store bypass disable */ +#define TIF_NEED_RESCHED_LAZY 4 /* Lazy rescheduling */ +#define TIF_SINGLESTEP 5 /* reenable singlestep on user return*/ +#define TIF_SSBD 6 /* Speculative store bypass disable */ #define TIF_SPEC_IB 9 /* Indirect branch speculation mitigation */ #define TIF_SPEC_L1D_FLUSH 10 /* Flush L1D on mm switches (processes) */ #define TIF_USER_RETURN_NOTIFY 11 /* notify kernel of userspace return */ @@ -104,6 +105,7 @@ struct thread_info { #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) +#define _TIF_NEED_RESCHED_LAZY (1 << TIF_NEED_RESCHED_LAZY) #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) #define _TIF_SSBD (1 << TIF_SSBD) #define _TIF_SPEC_IB (1 << TIF_SPEC_IB) From patchwork Tue Nov 7 21:57:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D696EC4332F for ; Tue, 7 Nov 2023 22:00:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB21A8D0078; Tue, 7 Nov 2023 16:59:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D35638D0079; Tue, 7 Nov 2023 16:59:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC5428D0078; Tue, 7 Nov 2023 16:59:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9760A8D0066 for ; Tue, 7 Nov 2023 16:59:48 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 64F81A08FF for ; Tue, 7 Nov 2023 21:59:48 +0000 (UTC) X-FDA: 81432526056.04.1F45806 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf10.hostedemail.com (Postfix) with ESMTP id 10540C0006 for ; Tue, 7 Nov 2023 21:59:44 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=xPNEBlic; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=PRam3Ly+; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf10.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394385; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=o9ko8McAd/mJQAjaK4ZmL5KYvONYTc7gV8rSA15DJYo=; b=W5jsUaM/r9JGKkMrZJ7KUYM8SKFXEdaAAOeTpPVuxWPQz6WuxpWQcKgv+fEcZMkfxx5Yzq OG8tYWNQmpqnYVMYDJt+NYAMilfGgc4+ZRPaaf1YEepqRP6sTtcEmCUWbtD/Yri1DoiPU4 GAaS9zt4xC2OYN7OVJ2DbqRM8U3Jh04= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394385; a=rsa-sha256; cv=pass; b=jd/P40865zbOWbSXHrceAe2qCbuKh5oI/Y2IPm89YuhTGvMpyhYetC80cXhf2tJjsmwgof V3XlHmxh0yM5rNegxR+XHhewZIiwpk7Bk/b1TmBgltn3w5wpx7+D6c2aoBcK9aacW/xZjl QoZi9gON8T/n5W2coQJMfGpeXsmXSCQ= ARC-Authentication-Results: i=2; imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=xPNEBlic; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=PRam3Ly+; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf10.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJlEW022696; Tue, 7 Nov 2023 21:59:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=o9ko8McAd/mJQAjaK4ZmL5KYvONYTc7gV8rSA15DJYo=; b=xPNEBlicu9Ca+oemtyFgXqysHdGKoEgMWOdXVxc8v/cMWCRWWn77s3Kld82fK4vrdVuz zkRA1qqwrouwNam3Y4PrJhqJ5Rd5XoJImr3+YVIHCRSnSYXXKIWF4X4YMznfTmssYRlN TAD7GE1r57ZjNg/9Uc9ZKd1f4RfRtaEcchxIy39lpEXDAglDE6X+o+8xf5ToWxmdDIdL SefAokRZ9Nx3wNbY9i788fe8U4H1ilGBKRntCTC/WQxFgM02CEEZb9tHwAx0fWNnc5Ga cBTDAfyAIlo5I3riWNJ4gFyp8tY9XjMd4YThTP20xNVdZSvZqRAP9JNsBnopeL69CeLP Pg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2002hb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:23 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJLO2023785; Tue, 7 Nov 2023 21:59:23 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241g91-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=as5ZudjeQacMbQa/xBZEMl3nkh+Khztfw1mKPVe/FHi66kGq5Re/EL9J9jCIt56p8fWwxZZF9KGMVh7R8EYf2axmH9dwBkcob7VTlISnavG0veV5yP6RirqOsX/gk2duJBxukrJQmRzVOAjmFM0K6WHEiKz2M8TNJzRL7Dk2HBtJc3ymfjIA3KCZ7nBV3RBCKUOk1n+zk/WUD7CmhPbLHipd0CEMNF9JgsM6XnZK7LKnGwD8V10s/N5PjcmCiviYm7V06F5W3dmeBZEy0FfNsk2HH6TcOPGRunueVW3kB74A21n+gsbjos+8AOIfu+1mFFBXjOpDTT+x7GmQ29WOVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=o9ko8McAd/mJQAjaK4ZmL5KYvONYTc7gV8rSA15DJYo=; b=YGqEt0tN6Mm9m4WqnMVYy68xgW8Ey7Adm+6HqP8b+TF0weXsdfmh9NofwCPWnrdPo/B0aJFrnNS1P3nx84FczKCiYqEXOLKsqGCFKaKUSGcRE5Ua9RP6x0vK+57KbiFFLxXSoUAkWZtFjGpZjHa1zA3QnWwE1zrQE3gf5JS2C8QoIqV3cjIG6JwrCmPJjp8AWFWcvZupTWYSPEIGbX0DWRSpIhE379SYCvRFG6qbl9XYINZiHdPJELnst64Ka3OrJlV+lwPu3lUu0gz4rpeGEqS1gXPQVFWlWic7s0thjzDNuLife0389deQ98HwtCdeJdxKGQyNmodRlikNjwjURw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o9ko8McAd/mJQAjaK4ZmL5KYvONYTc7gV8rSA15DJYo=; b=PRam3Ly+CBoJminZNTCRF8yBIrATfenGz/uGCH1cwHZbBr3IPV9BWkmhWOFo+20DQBgK8inAPOpttXMrhd9WI05M0E2p0P8ZUHP5suWFNtkhiyb+EZRpzQ8lPMviqCmNGAMBD3f+tuc1F6vv/9cXzl9xkDGAY83Rm0fcl7KilMQ= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:20 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:20 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 32/86] entry: handle TIF_NEED_RESCHED_LAZY Date: Tue, 7 Nov 2023 13:57:18 -0800 Message-Id: <20231107215742.363031-33-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0121.namprd04.prod.outlook.com (2603:10b6:303:84::6) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 662ce798-d107-48c6-24bd-08dbdfdccbaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MZFb/SDqUzcrEIGaPkRQCoiPI4o+fV2yd3wvjfknHnT0JaVHiFzqX8jGeEB0OPCbRXwN7MIgvhMI08WnuJoPLAA4aOFXuP8z3ojgjIyHt2WP/28KCv0qid/0WaUjBjoJPu+wSqA8hBkvuoC2WaC2zifjhBA4wIIcLnaD7K6GrU4q8W3nQvE41u0R3mYX+/3bRsR6z6DMPj+y3dTxyfPgA2c5t8yj5VRIRngzJDQgNRgo0GaJgyWFJmLsBkQu+cWGOCCbCCcZNCP42EnNwAj3Xsn4luzuO2uci6V2nmBooB+BKrHzcEpWl9lRWxwWH7pRK0mCAydYDTb3LuvXNGMqSaLr4XcOg/wlcMr00XI/SsfvBFPJcTCDUP1W4/IW5k2yQDxgmjJBm7iMRs+A9SJ7igJDPUGGEZBnzg8X4iux/yYlro0FPvk1z5QdTOA5kVaubzA7VTqYpIqpFbQtJpd0gt6YEJsBqZPCUueFoYBd03INYIWfbuZP6aHrvN4juSBVRRjrsEK9c2lu7KLLX++raCq9i8JS0EQ+/prukIkkZg122G1OqixGe8c7uFDY/9nB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ByaQc6xNdDxTpr4aErCVTJvCUbkoEv0WT0kgrv3URJWq0ZGQC6odLnrp3lslt/vi6sIw28B2kjl30SmET/bQYjwhDhXhlxHs3G/5G7s42KmS7GgtwzpO2r+sM730UD2xyYSe1B0ZTLvv8Mw9uN98+Tt8N4D4zsACTKdj/zvUvXakymY8ohDk4yC8o3afrhrbMdG2uH7YsN6lNlU0n7hsDqDn5y2qddAt79gXHXRg+Esb9p3lluqUHjMJrJFZqhh7f9QHph0OYw8jUr29focsNOstZZDWxlRZEo0J2Km1fjebn9jJRcu5R3ghoAP+hvTF2OTRtWnSqQBNRmqMcLn8zqE+RhI+Fs5D6glpNCmFXMoW3CvWd/kkmlsTW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5w7AEDxt3Dp4AtTom9kD/W8Ap7l2gQfNV02BPC42tB7fS+BgcmAxehWhyvtC7Y7BhiMmVoO+mqtxevSjoDouvhP2gTgSmTkPP2vm2FaJ4GhYhoGig2pTC74UfXhVfLiTs7aLIu24wVYjf0qfY73xxHnzTueOXpvKcmnlpGgWjfPZWl1MupXW+GWuh//D2pniFO/MBoW4zhNQbrecSTNdk9fbC03RiXRPMEONMaa+HAYOMImMl5ExA4d/EqHASoSoXw1wKFHlzzi4sRSEfxnF1PRgOrXIDlo0UNYdcIX4cduXtSx3cYhBZKo72uaj15ayGbnvz3kAMApbNay4eINEoM3zn55D/Sy78XmfXRAep6x/zfdKIS4zq7yFtLVpTrKLFkq52WCAPGTizwViIu2ytEl6zJ/05kwc/U7876Wtu5l7EP7rRMSTAKMY1uC1mKBjVO7/dloYQ11b6p/KMuUVa6kgK/RFfMWEK23MCqGidZdFeKThFGcdo/wivktdp1t3tAjAXTYL6dR7B1J12fb9gbfSED8acaqEPKOnIwRnIJMn47deXB1zMDbqW0lgb+e5TIulQvFUbHHdQts3Uaq4bO81S+xKzB8akGfTYB+bhILggIJHwygiylPoVRlse8YyuqSLLeUOz/5FXrXbqzEpaJ4YQOWIgKyP489W0T/OvreZdauRo4UCUUyuQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 662ce798-d107-48c6-24bd-08dbdfdccbaf X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:20.7478 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YEKOhTSRqutNkdP0j4qraNKtsM73Cq1Yg1pJDXDBCVR9B2WmzqcMgWa48fLJrZ/eqEZdPxfaOITyZwsn/ogafVfWc0WusRd4plSPOgXwdGg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=1 mlxlogscore=203 phishscore=0 spamscore=1 mlxscore=1 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: oI0E8Z-_B84-tQXuNskUxG6aIibQfA_J X-Proofpoint-GUID: oI0E8Z-_B84-tQXuNskUxG6aIibQfA_J X-Stat-Signature: 6z8qs8rcrdz3jp6ab653kxr5fwyts6wb X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 10540C0006 X-Rspam-User: X-HE-Tag: 1699394384-858448 X-HE-Meta: U2FsdGVkX19NRGGPkgiI/7EV2QszpPVE1hdDpdBRYtB73bJCeiQko0MHt/pkXfmFMDnGWZObPxXEeMFgmUwLq1ZdkQYQVW1NnQcrQogDKhjaV1am5GXEYJKgnfWzpHuhXGL0AdnU+PfYtiSXB4PF1b2ijE6dXfYQ6fJ+N8k00Sm7XNycnPX2QX3GfMfiyeJwWKKCstHrJB/fybn6yWQTzVKqjc0Z8kcaCyc54P4Y+IVp2+o4uJ5GYG98KrMPxjF3Ctwj7lQEj10u89H5l+ooM2vUtj1c4lTySnt8dcEmeAl59WQDhHdoiTsFGrfZXRMT+lT8BNI1+kshdsPny8HIjUjvN25VpQoly5bEgy/llNMpBXY3WvpEIVQmqILOvvR6ubwoH50Q/pborINLmfZEa4sSxsZKLejjZGkM4zFwBrGkMlioIX665YVrzCwW2qeL2WAh+ntrbcop7Gn2n5rZmxc/rrTphHTkj/iR8z2k+HMofdLNHLqkmf5CFIAt/L8/SaHIGE/atW04/7Don+VPTTg83gBN6PVFVmg87vVx7zfdcu5VhWngd4OmhBiDoITzhtJxnVgBflBIjDsJA3W0mcFWE5kr/294qhyqri8fxHW0xMAXLMI6Cq2TdQktcCWRUsCzGmMA4qIuqss6MiXjvYlPAaDCRTWsRPwZfCNviA2AqOJ4If0Cu8a7HlgyY5w+Wj7LkjVEH8m3lbwH4sAnIvV73ntGyHSjPTzfmoPIJajI2s+m5xuegMmCSKQ02H5D0xNFvdUYKz9Gr44qndNawwjDw/yEbjAF5No6O7mzXJft/tci4EXYolOSH/KRZEr1a/kD8owt+JhaymQilRWRwutAJVDeMTypwqbt5/67FJ3j3R52lg2JBIUlKUm7+4oAsLvYIc6nP8HHwNAtyt2PSOTUpFXSld9djQLobalg62xpaCAt7Up8A+6gn1hRydOzFKK2qrHEdmn63dNmksf TIqrxEXz XIvSUo7EsTPkuyf3rHOZKcUjh8NY9BUqbFfTQ7Q1ufpeNjoTqbT5OqK/XR0E8AUxMFqxB0A9S2RJ1Pr2V/+359dUmiqkseKmqG/hZCekoo6XV5hy0bb0UeDD20oEiKgU9+qZFkrpohkhagcLzm3bW8ozpPjzrbYvZoS7XjxHVEUyuAGZiw4b3OkaJ8wyjVFds0+HQlD6F4QdMLf5hl6GYYCWmq2dLM3KONaQSc0+i435C1T8g/8/thoaO5TlER6diUqJ4vyjNOPxUVHAjJ6uukTy/9mYnuPJNcHLNLSZO+peF+hELkTExlyz85SDej/RBM8mt1/Ab/lOCH6YcnWZnCBt+FuLHlBUuPKUMJX0qBgwZr1JJKGHld1A8hWZtXwy9C+8fbRQGGqtbQrebUxsx8kv0YsHWrBtKGJlMHJRKd/KBaCpRxSeHGAJGcdNpwD4WoPBYQ2JYnBfyBvX4I3kSH/izrw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The scheduling policy for TIF_NEED_RESCHED_LAZY is to run to completion. Scheduling in exit_to_user_mode_loop() satisfies that. Scheduling while exiting to userspace, also guarantees that the task being scheduled away is entirely clear of any kernel encumbrances that cannot span across preemption. Ordinarily we don't need this extra protection: the preempt_count check is always available. However, cases where preempt_count might not be wholly dependable (ARCH_NO_PREEMPT configurations) will make use of this. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- include/linux/entry-common.h | 2 +- kernel/entry/common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index fb2e349a17d2..7a56440442df 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -59,7 +59,7 @@ #define EXIT_TO_USER_MODE_WORK \ (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ _TIF_NEED_RESCHED | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \ - ARCH_EXIT_TO_USER_MODE_WORK) + _TIF_NEED_RESCHED_LAZY | ARCH_EXIT_TO_USER_MODE_WORK) /** * arch_enter_from_user_mode - Architecture specific sanity check for user mode regs diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 194c349b8be7..0d055c39690b 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -154,7 +154,7 @@ static unsigned long exit_to_user_mode_loop(struct pt_regs *regs, local_irq_enable_exit_to_user(ti_work); - if (ti_work & _TIF_NEED_RESCHED) + if (ti_work & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) schedule(); if (ti_work & _TIF_UPROBE) From patchwork Tue Nov 7 21:57:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98B6CC4332F for ; Tue, 7 Nov 2023 22:00:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E990D8D007B; Tue, 7 Nov 2023 16:59:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DACD88D007A; Tue, 7 Nov 2023 16:59:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B62FD8D007B; Tue, 7 Nov 2023 16:59:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A1DF38D0066 for ; Tue, 7 Nov 2023 16:59:55 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 82760C0B88 for ; Tue, 7 Nov 2023 21:59:55 +0000 (UTC) X-FDA: 81432526350.01.952C2B1 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf27.hostedemail.com (Postfix) with ESMTP id E2DCA40014 for ; Tue, 7 Nov 2023 21:59:51 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Nm3CUDkq; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pUoY77pM; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394392; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BRrX2dYuc/prXhp7fcx3fQvnR9baltRD3epzo2LIORw=; b=vb/xeMZyUZKo5Jxy8swsXozNaIy4MhGHaxEoIBQPEP2nO1lnzHa5O75Y+H3L4cnLO1UO25 R7QpGTzZzi4GJ7CHCrdJ8IStgGVFPKVHNgcwWZdyTxHAnZmZKJ7aHkL4syGcpTVIu7FTn3 512OE5591BOGRs3nCeZe1mZ3xUhMXrI= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394392; a=rsa-sha256; cv=pass; b=UgjKliNhIYkJulGxKJsRaC0mCxSv7V1NuZbzuZzBQOWBA7GkyOO/729DVyorsJGFnr0x81 Qsa6SlnO1AjMP/xXqfsC6nm/WksPt/f7gQfxt8678DDhYOtDRYjnvUilBYxAksqH45QTkD JaK/QZYaEGUzV/76dHqm66ZY/lC2u+A= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Nm3CUDkq; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pUoY77pM; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJjiN005490; Tue, 7 Nov 2023 21:59:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=BRrX2dYuc/prXhp7fcx3fQvnR9baltRD3epzo2LIORw=; b=Nm3CUDkqwTu+EpA1oPmfc5WXJvzwS/suCLC+Uj1op8U+vhdLQCqg3wLLwCbOaFG5dda7 E5HH0+FqFVp1dgzbx/gT8tpGHSdRbt5fl/ZbAu0nTOt9HFUYWfNf3jEBT4uht1cE1uVe LoWKVV2T4NFZtjbP/vyiIT85k4nBNnUUiFxiKNSyajQRL5f5MU2wLFAdcH7Xzg1OvagL +TQ6h8BvBLpXawQ11ucMhZvStT/HTJKNgHXFfHPHrNk+ehd/d2dQrFZlPB7WIP0PZQOC RzmFYKd6GTVedodLNwsu/4eTGONd6CzDyWQ7gD5K55Rozu1EmglFORH1CFjHfjhGblB6 kg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2cw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:29 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIt9Q003973; Tue, 7 Nov 2023 21:59:28 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsjqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JgySwZRCOjqZMlQN3bWspUSRwWFzIZLAJWirq3LVJj2U/fw3OjqY+OO5y0D+lJz7zgeeKdgeKADRBhmp7m68S4NE3TOEAG83CGYCbcAYOvLChGnPCi76MXOOJekqvT/DedF4h+lUeSH0Zmm/ydm6j6nQ8IrdIwsjq7/XCsE5qN5GC3ytZEnp9VUWMdRkP9MnUGHcmdYGCJOHGRwQMPOmRKs+qX8s8qrliPHkudyP5gphA4Eh/BIdFnCugFgz+haz/IIum29BY/lO8fCCc6iBSQLD5aErINiflKjnsfT2pd1Uaa+RlzZ9XkuUQA6iF5srTfyCYIGbBqiPqmGxu/1lnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BRrX2dYuc/prXhp7fcx3fQvnR9baltRD3epzo2LIORw=; b=Ep3X0SmXT39huIWz5vvog9aW1rpaxxy6OmGTeMS4uA+kL39tfDINt1/9fQCS3ZQo690V0V7tjuORz2vZZjCv1aI/8MrEU9Fbi74KXmB1JG7xQ1QDZY5GChAxt8uDvtjiiSmPoZFSkDhRaOJwK8SvgXUW7uJylnEPjgR/VdZF5Y3PrBgMpXecmxm9E1kL4r5Xie+7NMgUid6202rDwP36HCSC9nfN01YQIOt8vlHwz8/Lk7aV+5M+jGe5WgU2YFSad63ll0IqvSyYZl/AL1gjpDjvNqj/RMgLgXxVP7ieUqpC78Zaq9OYPkuqsrfI7QJ+dFvVql9SgtqMentOJsU86w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BRrX2dYuc/prXhp7fcx3fQvnR9baltRD3epzo2LIORw=; b=pUoY77pMZdLLLOnoYitJ3kkpqpl2J4bX51HiGpp/aUidH3viTn1lGezmnXVAeLiLe3z/vY3c1QIgoBKIyGTPEzvIu6O42VFKWHnTuO1pgcb9Tn9o8t/kaMCRpIVK6WYPtepiZ6BzK6RLF/uFzB11MXRGn1FEDzm2rb0K9prkzPw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:25 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:25 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 33/86] entry/kvm: handle TIF_NEED_RESCHED_LAZY Date: Tue, 7 Nov 2023 13:57:19 -0800 Message-Id: <20231107215742.363031-34-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0358.namprd04.prod.outlook.com (2603:10b6:303:8a::33) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: cc5e03d1-507c-4ff4-4b3a-08dbdfdcce92 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SbOaHlW3bXazlqZO5KgRFT26tVQyLgX4/uLPOWxL5zNMjE23eVLa3CGKs2V0TKYbjFVAOyXBZUi3liRWH98OnljZytVTTQ8DWStxGrn0KNRszSeoKxPU9x1efiLEeokhO2H4qZjJVLMLONKCn0/v0WPdeQux5XhaJMnX/3FAhAsab62ZxBT5jGR/KbsvrkXvCcjks5batbzMMfU4Vn+0b30cfNUdaztWZ6bQgmzmY9FMbDAw1d9BdG5uIchkW0EoSdt8j4H2t4BUn4FZeBdL1d25PV786TA43glVNBgpTK3/KNQiP6KEa6wmhQg+tq+EGJ3ghwvr78bAL08L7hYjIbf/bQsu2sYkh099okicZWOTilcInI+FA97gfcGI6nlMPJiq538be5tZHFehFGyEEFJLwLr1bx7xSlA4MYAkoh+2lhQ2xptoWRmkVBlwWA7kniwVQsT/nnEyAfYWyp0Qlu7fn//MKEDQL+O73Q5mNnyD649FGkPcsH9iAIJABkTCm+ZLam6/lCGK+0AW0CPTIhVopZeRcf+Fhyn4XYVZCUrAnMQyigP3+eTWgvAGtKsk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: udbg9GDDPx14YM1VKbCYCfPj5nyscNc+sks3ITVvdWzwHYkCC47ZMB2TWWylSyjmY8h05K89IzRkWfo1EyW7CFiSHlPLauGahkaeq+9rPEFhy3mKd8+xbTrllj1rc2verMlCQsxEKkafZPO0u5U6ZoZtFeZ5wnflGz83KkNV/xeet8+8U3c15huY5I69zk6qX8z0geKB6wlpGg5cFQyIzMY14UB5KkOk2238/yCcpoKuoA3Bo9NLOmyWQZGZlGLyHSkpZ4+SMAsgFaw7uCCXjUOmlahu8ActvYDPwa74s8VXHcHnw2LbooSCKss3MHgZe1eKx2Ezdwi8tkED0NuJu7U8owwZEaMANOJqLbVsGyGeY60dLTwAR/Vjj/8RI82RLV1T3wbYSW+oRsgj1sUtiglGwY0VE+ciZVC8lgM/lCSbJQshoLIm3QipDoISll43gyMd9rys5hVk9n0MneNgT/hnPEgOwTbzRHLnZ2Xz96VD2EGqrgh/stEhWhBxeLOjL5YcktyosOPOB9JAkUor/KwbHiHXjkF/tIzQ0/W/7+moUhtyxtoHqAXySGugjgXQwP6U3d3zwY3jbzDpZq30AiD0opbgt/VVs2VOYFG/TqI/KnbIALX2noK9IrNFtoLhoAHk64g3LiAkDP7Wml9uQjOCEcYWGVcTOVd/X6fvH2HJ8ovnSV1QMLy2kzAmAvbnN4EkPpqDWkbH+bHPiq2FRMNRJEt03Lw2T3TI806QP2lW4uiVFLBrw6QpFROtpMfwumx8r2ucOHSUPJ8xN7uGiAGmgj9hNaSP4rbBO7gdB5+QPjqsSR1nxFjj+IfIKmoV7hahjOG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Cs+WgZI2540aw1d/A9XEV5n9RrSoiWOKN3qMvXdfpQre6iBKW4LtwKugTt51LquIziLirBRA3egloXLdykOiIAX4AFehMRR8t0CR6kw9iL59ZIPsr5Z3NuFYmnYbAiqVmIvs7UCDvfFuAG7ldnjsaEIoV3Q/JwlQPoDJC8owyRp1EpN5uhSOoKXfts6snWHaEjSpDHUmNaNqqJVdr4ss8OwMHI+ThGap8g1PbObczyQLGTNlqeQvihHgQMJtFgkOkQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc5e03d1-507c-4ff4-4b3a-08dbdfdcce92 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:25.6053 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GU/w1Byy4BTjU99GQQoJx2r8jfAVHXpKo0DI16pfh1GOgvEPN2AlpVxfp5DHbgAYwdFLhR5Ocl6JaAdnzrlDRFzh+8bavRErvoQi2/3mENs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=685 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: 8LIYsEx4CFEbCZXTJGr-E7wjx8Sw9P-L X-Proofpoint-ORIG-GUID: 8LIYsEx4CFEbCZXTJGr-E7wjx8Sw9P-L X-Stat-Signature: tpei15zia9hibeauqr3t59j98jtrq8nt X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E2DCA40014 X-Rspam-User: X-HE-Tag: 1699394391-877797 X-HE-Meta: U2FsdGVkX1/PnjkDqkthWwVtzK6LectMmcM9GKptSbckC/HKtmjdmDNMYSsPO6rzHJMcxh19TikZR3CdS2K63LO119nHPWXdo1PnuKhPZgadRvcsrcmKb/J5Ow8U07GgeBLXD0buJQPLQU/IXsDz412pPs3OPnGq5KSZy9UoFFUFvShYrhh5E5CwfB/NHvNWmvA+i936xiMaMPN8o9x6KVNOCJZYY/seuMP+eGW+jyctdSRbnfJIQUqIKu7Wa02IjflvxHKbKu1l/+hgB/oUu0r/7oANOO8zeKHVw0CzHBPTGu8aAoSXvYk4/52mNaF/8DjCcNK0reBkc54weUcD6yWslMAQt/2nVPAWWGJ7BLtnSkH2zteAVoxQ1d2o9f6/fbSKEThMuzVSNtH42lUwrPHi24WtEI1iVPR69TvP2D3qOlMaIADH52fFf16E3lF0tdNXAAeT3q8P+PpdwwYZcVLBfq7E1TqyyRXVOqsRiMwiPYuvXk/2iCcYUKCXfZ290eW4bK14MKKpcX6yBwtZONXrLdmbcAYZO6lzB1Ocmng5b9r0FgWdJ85QH9tHwaSof6TcwBxWtLlj/p9CAeRhatHDTcNyIJHTSD9rDIgfPCJIvuw+YWw7mhFfj5rSpirYsfWq+SMsaA4EXpz+FqGgfNkKb35VLTfghD6lcV2Gb+lPkEbvGpYHtptRk+QKuKn/4SOGBjC3r1SaN0p6R0pU5r2oZczbAtbacagwOlCiXnhE/cNHSwWgmPxTD4Eg6x6sbWqqpzJN09lV6CI+KzXAJ/2MzaNvt+xYwB37MaSbl8D/9MsQ3xs/jv8/Y2C0O31x21gJdhFMu5qqxVMtM1YO7xak0Sw3cfngDxDaca/daRhY6257m/aln8FC15M9naduq/yRKR8iPGxIlUNJw7qKv4366sqErAgntxJgfum4333Nzj7WM1INbebsRMt1/ILg2xdKbaueOUDFxx2dnHK Ah1UQpl0 jGRKd1Q928cU0jVEuEBzl4lZQjo2lJFcPkw4thqeqbjQjd01DhspZsniml/nZ+lKBriyZj4KwnnYq79PnisEa+NW4MjZh1XNLHAaPGPMyzwGZyV0PUPRFkCwno4AmMJFact3NiEt5bCKcSdlvcqafaIcJsvaLPKFN/tP2t5shqTrYadptxY4hiK3zEW0+imvSEIbgdoYMBTUl7dQBaJlUKnXsEnwrjs9wbcYXYSiCrCrHHQRplxUcAGPekEvlpbB7KEEbgcA5AhZSYzZ9LEBLu69as0Zc0o+fcmfsT54x83t6XY7RLhP5bhnP5y05RwAaGtGJZM7sVzxUaiO0RchxZUh/Nd4KWy5yeQW1a//AUAq6ImiKNsQCPRBsrkvtDQr08I36G5FZuowFu05BBenCUIqbNASh6JMP83Da31T69qb4NUker1Y7d+tZb9yyW8YVPxhrPlyFsNyUylg4KtYtHEtV5g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Executing in xfer_to_guest_mode_work() we are free of kernel entanglements that cannot span preemption. So, handle TIF_NEED_RESCHED_LAZY alongside TIF_NEED_RESCHED. Also, while we at it, remove the explicit check for need_resched() in the exit condition as that is already covered in the loop condition. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- include/linux/entry-kvm.h | 2 +- kernel/entry/kvm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/entry-kvm.h b/include/linux/entry-kvm.h index 6813171afccb..674a622c91be 100644 --- a/include/linux/entry-kvm.h +++ b/include/linux/entry-kvm.h @@ -18,7 +18,7 @@ #define XFER_TO_GUEST_MODE_WORK \ (_TIF_NEED_RESCHED | _TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL | \ - _TIF_NOTIFY_RESUME | ARCH_XFER_TO_GUEST_MODE_WORK) + _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED_LAZY | ARCH_XFER_TO_GUEST_MODE_WORK) struct kvm_vcpu; diff --git a/kernel/entry/kvm.c b/kernel/entry/kvm.c index 2e0f75bcb7fd..8485f63863af 100644 --- a/kernel/entry/kvm.c +++ b/kernel/entry/kvm.c @@ -13,7 +13,7 @@ static int xfer_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long ti_work) return -EINTR; } - if (ti_work & _TIF_NEED_RESCHED) + if (ti_work & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) schedule(); if (ti_work & _TIF_NOTIFY_RESUME) @@ -24,7 +24,7 @@ static int xfer_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long ti_work) return ret; ti_work = read_thread_flags(); - } while (ti_work & XFER_TO_GUEST_MODE_WORK || need_resched()); + } while (ti_work & XFER_TO_GUEST_MODE_WORK); return 0; } From patchwork Tue Nov 7 21:57:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449398 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F01BC4332F for ; Tue, 7 Nov 2023 22:00:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B8DF88D007D; Tue, 7 Nov 2023 17:00:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B177A8D007C; Tue, 7 Nov 2023 17:00:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A2628D007D; Tue, 7 Nov 2023 17:00:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 71C788D007A for ; Tue, 7 Nov 2023 17:00:01 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 517301CB80C for ; Tue, 7 Nov 2023 22:00:01 +0000 (UTC) X-FDA: 81432526602.26.9B7C4A1 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf19.hostedemail.com (Postfix) with ESMTP id DCE091A0017 for ; Tue, 7 Nov 2023 21:59:57 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MtbVLRud; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YFb73KrD; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf19.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394398; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8Zn30y72lLc/EfFZQRlza458xX3iWLHFkzwKXZIi/gI=; b=rv1hk1k9GUr2Zy2ro0cAx5tZR8+zcm71MPpXEZWbYIT9dt8rRwQBrTqulW380B4VZfXFsn lJ16DUMQ2oXk0LBLJH+qj4kWNCi7yFaP4CIyV0BVTWNr1C+jFy+VsmUEgjzydwn1GLanAl zUQIq4oTkvots/r2JJSnDb4kHjG6hwY= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MtbVLRud; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=YFb73KrD; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf19.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394398; a=rsa-sha256; cv=pass; b=WzAR+HrvvUvBnhYgOFbE7h6kvIAu2Yj+yEmHl6uFg5Ipdp3J8KmyZI9fNxxPKhyL4kMvDB ntO+zUEntlQEYZcNDJ0UEOClQcOcbU81Llb8lEG4maKtqL/4Tmaaqr2X7YCbWJ1LXjdmYK nZlTkXf+ksZ+cHzHTl/nVVlTuBRk+kQ= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJVW3014845; Tue, 7 Nov 2023 21:59:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=8Zn30y72lLc/EfFZQRlza458xX3iWLHFkzwKXZIi/gI=; b=MtbVLRudKHuWr35XfgCc6qTHSetu9NqDyZBWsrJvSRIbR77wCk6iWS3Ab2UrhTS4V+lr wc+3zNEPasGhXARaZgNXuV2uf4L0ZQOVhVxEnJnO4TvZvYcoD80B9WOWSJHJQFnhKkP3 W/B+XHq+bk5OjqiSyJKeRWt/NVuoOocxOgXK3lJeNYBgvFJT+DuYhSFm6yUUSKulEN6l geBej/Xx77LPTgxbnA+WKi1FRQL4LWMfgUO5syJFZX0QMIZoqqLT+1GRQ4vkmNXDaeZx +OAe2sEEkOjFueim4lFjxQfYg+4rbrzBz7kU0hGH00MUb8ytauUdXrvcKrososhhsxbP 1A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2e1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:30 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIt9S003973; Tue, 7 Nov 2023 21:59:29 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsjqx-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oi5CAHOJBMM5Q1Tlesie3zvIjLtXge0WXNttlJIDgiw2SMiVF7bpWOVUdBVm6d2xIWvFXs4smg4pRqLYJrukQ66gCMqLGvMZpeJmLLuyQ3Lq1Fimeg/YWTYGkChaTzutOx8ED+0T6WMujzEbsqPU8XPdJM7YmGJr34OA20mBbdfgYPoSueIqHB59XVIhcFVN5DOfRPJHPO6GIg9q2eba18wGJcBHupP3FlqXPh589uFGi5BKcfqeL6T0RkuNJ0I0JiXiRzwPbKjKcoEaChA1FrF70Q6DhnmWQsECdb/LTNYjwAejI7vulttWjWq1+G7ZohP9sXyAM3snO2blw6eNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=8Zn30y72lLc/EfFZQRlza458xX3iWLHFkzwKXZIi/gI=; b=HqZUXEdAeQWWJckTHOuSzclRYTwH/esIYnSBpnqh0QPoUZXQM1vdnTyZ7Btsl9bqGDjYg+UzaqYav3ncmmncMApB1/wSz/wErMZHdEuqXsX2mEh17oey10aWjsjVQqFbG6GkjT2WX3bxEuCoX8rxJP7QjSJMGxBnroMGqeNenGNBOxvd27cltjsHxcJ4h9mcfa0K2tZUfFvjRAFUqva0pPyt/ExUWYDF96JfCLg5T4cE82SNUgWhKJWxNbCiXMGo7m6FE+obPXlkn12qr5SNeKwSMR6TIpKx6A0DPwUIKC2YpmNll9b8ehV3v5adtLWFviuzrXy41GG0xU5sBEvn1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Zn30y72lLc/EfFZQRlza458xX3iWLHFkzwKXZIi/gI=; b=YFb73KrDXFjLEINqfFTNenQW2ifu2BMfno8pfi0pTvbtdH81G5TKrekxVVr3mb1Sv11FbEajZDektqNQloX5vmQHoEPGstFTl61hT9E7W9Igc+5z7UfBRpuUTeAVubdeBRocnmqRc/e3ArcexGZPMEFGsUoms/+Dq2WDk4KLhjA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:27 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:27 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 34/86] thread_info: accessors for TIF_NEED_RESCHED* Date: Tue, 7 Nov 2023 13:57:20 -0800 Message-Id: <20231107215742.363031-35-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR2101CA0008.namprd21.prod.outlook.com (2603:10b6:302:1::21) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ab5b2dc-a7ff-48fe-6a55-08dbdfdccfcf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0jVa7YKklfqdp3OyyUPhQCflpZQMBL2PihSeKOMHn8l5BwKtjhmbcyiKRaZz05cBpGhRFCIEAM3kPS910VgV2Q/93ItwIExhq/sEXEeLImVLxts3DrlQ0nudk75WrNASextXNIcZ0PkteNUHRKXcNMTdtDDxgSz/64mFg2hICm1QFu/ZPdRLroabbhCiKNZ4HLVefzum/0rt20MYHsPUDHZgLt/SiIV979Ps4KlxE1qFSAkmkQehadaOzSrzlFqzTZ2XfBH5M7KVq9XCEFTX+yWQWBacrAUtQVdHGDxvDoBWuGcdv/NhTQLJskIA32OYmtLmW+Y3B+bAeQL+kNkWAwK76dBhllLFMBfNPkecQVBBDmMvtgLz4aD/zzovpI20+HHPSBiGe+wg7SkfkEL+LNQbeD+s1dzCk2IHlIcQP6DSTN5nvB66wAjGhwNRa8rFjvEq0BY8FhSNVW+8uqksi9Iy89uJcTycfTA5hTlquYns8HvgvIZo/ZOYBWv7QMI26UMgH8qumGlAaJYNFLrOWsfdHWuDwJ/TEh7lx+pyhCc2/yh6vy6ZsgCQ6Ih62MTK X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 02re2A9YazPiYO4EKrfFTLDRL9hYozbzfMhVNT2dAyjliHmgDvZSiNWOj/8B7TEE9L7zytlV0aaZmwpTrmCXbu0C3Zdl63SKA17ST9Rjt4yd1gbgzgqADR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CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:27.6962 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: suxE9FBtFaOYvoAxUhkDI2rE/0G3PYLFSIvt4u2kXfx8qgiaZQhjp3vyKyIPHiYbNbsWL9aXAMtDDyi5VDAtEldOKEfppDxGYgpC/a4Evtk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=776 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: sUL1PvCwwW5IRd2Oi-CFXP19dC_Q8FHs X-Proofpoint-ORIG-GUID: sUL1PvCwwW5IRd2Oi-CFXP19dC_Q8FHs X-Rspamd-Queue-Id: DCE091A0017 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: mgbhyef9bjro5zqe8egbj3gef6yu9uws X-HE-Tag: 1699394397-60015 X-HE-Meta: U2FsdGVkX18ZOxuJrrC2cq17Z8hiwmcfWAOUkzq8XoQnxkUcZNfvHLNLiesPDJHCXh885AfWHfdK2ZnAGr/bTebsVrvJ51gDRixaTD+f601nJnqRckq9gCAPbq1yDb++gK0UHp8J4KHpLiuELoNvYY+CVvm1FHu568buCVsp0YoQYgbFvUaxmqDe4WHS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7RjAOyAtAiTpxITvh+4kxe2FPgbvEp4ja5E6q+HMSF79wwy35+A/iIOxnJClMi7SttoRIvw+T5LXjursTHOc8R6wtonBzwnHPZIvwsMHAEUCeYoFky9Vmmr46+7RYINCzqxN4u3NCmf03xcCiZU7pe6eFag8Akb4sC+nXFYL5MSSwYvyXawd87Gt8u0n3VaJCw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Add tif_resched() which will be used as an accessor for TIF_NEED_RESCHED and TIF_NEED_RESCHED_LAZY. The intent is to force the caller to make an explicit choice of how eagerly they want a reschedule. This interface will be used almost entirely from core kernel code, so forcing a choice shouldn't be too onerous. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- 1) Adding an enum for an interface that doesn't do all that much, seems to be overkill. This could have been an int/bool etc, but that seemed much less clear and thus more error prone. 2) Also there's no fallback path for architectures that don't define define TIF_NEED_RESCHD_LAZY. That's because arch support is easy to add (modulo ARCH_NO_PREEMPT, discussed in a different patch) so it will be simple to do that instead of thinking through what seemed like a slightly convoluted alternative model. --- include/linux/thread_info.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 9ea0b28068f4..4eb22b13bf64 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -59,6 +59,27 @@ enum syscall_work_bit { #include +#ifndef TIF_NEED_RESCHED_LAZY +#error "Arch needs to define TIF_NEED_RESCHED_LAZY" +#endif + +#define TIF_NEED_RESCHED_LAZY_OFFSET (TIF_NEED_RESCHED_LAZY - TIF_NEED_RESCHED) + +typedef enum { + RESCHED_eager = 0, + RESCHED_lazy = TIF_NEED_RESCHED_LAZY_OFFSET, +} resched_t; + +static inline int tif_resched(resched_t r) +{ + return TIF_NEED_RESCHED + r; +} + +static inline int _tif_resched(resched_t r) +{ + return 1 << tif_resched(r); +} + #ifdef __KERNEL__ #ifndef arch_set_restart_data From patchwork Tue Nov 7 21:57:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52634C4167D for ; Tue, 7 Nov 2023 23:32:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D21344401B2; Tue, 7 Nov 2023 18:32:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD0D344017B; Tue, 7 Nov 2023 18:32:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B23A84401B2; Tue, 7 Nov 2023 18:32:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A2CBE44017B for ; Tue, 7 Nov 2023 18:32:09 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7D698A0B87 for ; Tue, 7 Nov 2023 23:32:09 +0000 (UTC) X-FDA: 81432758778.08.138BCAD Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf29.hostedemail.com (Postfix) with ESMTP id 2E51612000F for ; Tue, 7 Nov 2023 23:32:05 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=RSF4q7dL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Bjr70j2H; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699399926; a=rsa-sha256; cv=pass; b=aVNGRQsyhgeoeZ36Lbmyw9/cFIz15D00PseOO1h2Ih3+MDLD1ztLpMcJy9ADqTxGzwhGRn kBgukCcIyI1wUztGpuxucHS3ahy+yK2Pf5ISxT2JvTIW5Y56Ob+L91e9rca1kUvgiGegfY i8iIVyzED5YBdNFy0qiSEZPqJY5BxFc= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=RSF4q7dL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Bjr70j2H; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699399926; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7gwOtmpFNcOX3GHmuR+gkwTDS4oyS5CLF3RfFTaRkeA=; b=hoa3YRRexiORm1XtWliKVjQ4Y/xG2ddFHIJBLfYe1b1BUQqJtkSb2Fj8QFIIwnuOPBdGaA QhGeOV9HWEnn3mCpFmmwTivAuWHyaeu6Yd6VCrHJtuFplnHTObHxVkogqcWjJyCnhC2pb8 +46H7Tu3TLPZxElKTKyaeK7MRvYIXZ8= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpqh020714; Tue, 7 Nov 2023 21:59:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=7gwOtmpFNcOX3GHmuR+gkwTDS4oyS5CLF3RfFTaRkeA=; b=RSF4q7dL+sSiBGp8RCV4HseQ1NAaAaisPU4uzW9DgbcrnwclLfxDtSxnKrWEmVSsNYSY JXxJcVDuFqGZfyNYMOIkzXbdzL6Gm50FXvE934n3TM2XAb4IBawQfMZ1kB+8aOlun9mI Y//BAg+6KjwbKSmSYNd+cT3MYezavJkDkPvsY3y2vZCxrxpZWXcX1gpPJ0X+MFuHQUA6 Ix7kA4pOUNZUDVzbeCv3PxOBC3mgYF6qfU3MtdhyyHtTRn7WxYj+oFmuuoqv11wl8d7E sPi31iLpjuJDn1JznRGqtiUhcFPetWucO1XdEtYt/L60OITKVc1uYZ1Bz92mKUz0jM71 /w== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202rx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:33 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJ6dH031876; Tue, 7 Nov 2023 21:59:32 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w221gs5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=juPLl9JebQFwr63TdhgZC/oZN4D9KVDbOTgZ0lr7HX2qzxVbfKrXtpewblwfVKayAuE68Xx1uv8SUUZe3kHXAZLy/STF3y4M+xVXuGTmUQ3PQqlzL+jFcgZmmYBRo7jtBowmliSAURGrEoxFotcNdR5GeaCm89XGySz573x8p8wB/iauVf5k0uvC8mH16vSCEjvaSXanEFSH0LVViExtCNnBszy+BTJt1eWzfhdqVgZqX8wP+jwOtzNrpkPte/FlyibKbGC1EPsbwDvvF7BWVPtnQnDLVU/q+Y32H7VqDkJzVkiEF9kwSdwlysmIrkXm9w7uXE2r1ZuJt7CtRLb/Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=7gwOtmpFNcOX3GHmuR+gkwTDS4oyS5CLF3RfFTaRkeA=; b=CVfL2APtGEiyXYxefjrwDQEEa2LsiLWoWXqz+iHmqAsJPOFMr5oZMgk9pn+EqZ+qUn57yHacGoKDcNY13iO7CknQZWuk1efukEIa9nSlm1HVtIOJ3wnkaFOBVDVngn8ZnVCwwhUp//CUqNRA8cJjs3V+FqRBRFZeslRjchH90bUFkkHNtIxKbJzoVSpiXHIxfLm+OS15/Ep1314fPMxwPPHOiuAufz4fxor2UaNyq6Ny2/If03liXQxpnPSiTKSRuVm5T+SXN0ooWJ0HpLeSv5dMlJ0+l1/qMeitsUnruuwnEMEVhz3VqocmxbOd4pj7VLL/40BGRliYxkp6c+NQ/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7gwOtmpFNcOX3GHmuR+gkwTDS4oyS5CLF3RfFTaRkeA=; b=Bjr70j2H7S6b0tulyA+R4CrKqn+OomFQGtOHXw/W5DjXAvzjrwxtUUDQI1Zir51A/5eZMUIHgr5N/JWXHeazN/b0hvcEGd17gFCSGJyuRa5iNqyV5SnSfH8tjX4vXADVTSkd5Ae38XmInz6n8kwiJGeQrMktNpa4RQAkrpbti+A= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:29 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:29 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 35/86] thread_info: change to tif_need_resched(resched_t) Date: Tue, 7 Nov 2023 13:57:21 -0800 Message-Id: <20231107215742.363031-36-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR2101CA0010.namprd21.prod.outlook.com (2603:10b6:302:1::23) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: aaa26d15-263c-44ee-ffb6-08dbdfdcd0e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CpR5+w4tAIaxbJzZP2f3z9YDc6zHEh/QBh1RIbJ55kD4SpIIoxYsl6mylXQw72mQEdcm/uN6mkF357MBk8IxWhWfBZGzBg29GmYkSrEHeHhZc1O/wMOLB6LzF+uKtM5iDRoB49zonc/dTGoFjO40dBXJmCcKgPh97mhzGeZTPAia4B2P+YWwjRNSv8Fj21ozhN1iVRMzibblGRATleWn24FsKWfkjSieJmBLSoU/FPrquuH0mQj0FIUZDjthG8XghBQmo0dGbzCHXPMYsM9ndg778HJZBznBcub2NRXWGFETeVoeBf7kcNuWfQ9uR9Crj9nSq7eMoYhK8owmLzsCe792ZOXBaTK7NPZA+f4hGNChm6LUcaPLtnsCTaMJxXsoog7yq5jqWmmGFf+tY+9W5w2E12IezFS06IzCb2ll1XN2qY8Eq7/Kjjxyq30qICkcWXm1KvGgnsyBgpGh5xeLRgnkog34uwQ7fhjYiD49RY7eGlMmjfoB9nq9Y/W/+k5+xSFRzUIcfQG6nqu/ZDXbeZnrVgB87cPvPB2vbFgXWQSG3XfLv0UdkSJL28Z1Y0f8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bbuCzGxq1q7LjT14re3x1l9lPtuPx1IBOSm9q+1E66HKzGyEzFYmL4XccSVri79eZcFkJTt1tx02WF2Ffw15/oNttp8NFbdM2EcOgNHIPv5eiF+tJ61enhPkkQ0pVxQK6JUxachYkcOOmA4Yzn9SvPWCdxmd+4JEVHBR0KjN1lU8JEuE90IvhP9KzYIrXYj8CmlonlDpXCnez12jibqx+bQNhinewb9WRdgOa1lTJ+2P+K+MtNCjD1CtRDqZ7grVRe0zrgR5PyDrw0hPNGXrSUNiHkDMO5Oq/3KbIfQGSDZXtFHZ7p3tk62Rm7zFReUkCLjOH/edfUD3rzZ0wfx2Nk/xyhWFL8E8knIHKTRtp5H4UhFgmU+/uZI5yAQONIz03J20z6ad2hmA8Qz/O5p9IgNSiwotsGtOeKEZbbUrGvAuDrDarFpbCEr1dEPyiBeUNcIYPCml/xc95UEsF6o4T1TrKbd0CGQ0Rf8r/Qx1Eh/I0g/EMYC0UWfqcDQcbFZt+yF6OYW5GB3TIbpt7fOzpPjovEOjbJhn9YeS+CPgs1woIiDK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ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: iS76vISTixVSPwUEU/zXqFpaaCG0N7SQFuW8fflI55XJY6FXNTWfayOZHodEKT8mxGapyRmm9CiU6cAP+4qm5nQDa8m8t92vva0rVnlVh7fkth6PfLBDnoJFviPRuit76cgnwqDqSZFFyOrpEQXQCdJGuoQjr+L7pkwgbCEvTt6eDlsXfr7eIRVKKQZCb463u6Nu6sU69FHWmBOH6hqFnoR3UXyKQaRNN+XOHCAAR45hHGnmETskctydtQD405hPrNjzVDVEBivzmMz7Unr40K5lFlO27J77CKjGw9s2q9clC0uwjce50/M8LGqkgdeTS7+eiCmZzDwtxaLKQFetx0zQygWhpAs03AMv2ZOXSIKZFOEa06xirYGGwmuTBlmt2o3GckDbECHTDUvdBXiE8UXI58MHXnniKzu/sOrXjdUIC754MwewTCj2wz1/15GG0a/L7/wB/KiBhd/kmnOftbsI44N3X4wO549WNKRDBXjHpUrG+lrCiKkhiYSooj9YDMKJeviH+9ZDTaTVP8yokLMU8XLUpq05yYJ642ug2zOM+wJM1FzdINwtflrzbG5j+bKGbRBokdmd6Zi5cqEueIiXSVdz1ymiw2+CSKYRLVi7PEcL/uWnQcq+DHA6p5BNliUBZWFLL9aBmzG8MKrcoBDkrEMiwmSJwD8Ja7JWLWXXJzat0pvgEydk8x6sTadSikQy3TMuBdADbxi6ZUkIV6AvemZER9iTG8Mi2MqGGre2XKeiCB24u1olI8j5UUhI4dJIky6FlKW6vhX6Fq4MEmALoF+oWOkVAfrlrj7R5b5HHEYRkCN/2egf4GeMxdGxBVmYtWw7GXvrcmyIUrT6TkDUfoA+IbaRJOFcuWZkh+g5w9ylKEfGu87gDhl7k2/n3qVK3PoHOSN5GP6OuWr5i3xGR8AvvvNDlMsY2PGagKa9ppYZxTeCAqGIM9+iiBKtJ3d88qynSHoyzEr54bXVHlOjr9CxR50wChGv/7Aq46QGss7Hi3IbUoC+JhK6YrJrarnLt0PiVhZeaKe42LqwoWZWKQ7kpzCEOfu6SMj7k8O2NLgZezI9DMxZoDKuB2TGcTJk60m0PpWxsiozFissEQJqq+2l+u+IpUpQPmr8jBo67Hic4+6oCBhW2E5PkbiURllN7rVujgpsGkqhRXQ5nWSqnDCPTe7MBdRAKMXhMDdj136soGhW47Jx2vIXiiQWzFMFlFRZ/3ZTb4hGE1utV4IAny0LFzPLodJqSc/b6Xe0LecIs0Wr/gKg1hW7MlzYM9qoKQPD1LV3pK2CdoAX7bfWzpFBuprOBcALp+JzKW8lCZ0ZQBt0d2mpehpJi8ngD1ikPhqlOysmrRqP6edswoo13lMl+u7cIYJFw6V91ksrnM99nKNkhvJMs0GXIiiHi0GBIT11pJllpnyDmcacGYcn3Ss9N6o+QUS57w3bByPUxw0x4ddjh7AFCuMYxEAH2gDvsgfsXbcqISgmrLf0nClqKAT1r+qRX0zYExD1PQ1Us6WawlVeOADolKHE+QP/j6LIr3S3tGv65M08D+sSEw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: aaa26d15-263c-44ee-ffb6-08dbdfdcd0e3 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:29.5043 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PcNgRK19veW389LePbnKODT/nLtKsYMAuAaRxlRKMGaZZJ8EXLM0Svg1nKDa0WmJUfeFvtFedtVp/F2i0Q/qlYxMWuHnjLTXSoF3DtFnJfE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: J0HiGEFMSfRss9c2W97Xe5NHKryfqegn X-Proofpoint-ORIG-GUID: J0HiGEFMSfRss9c2W97Xe5NHKryfqegn X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2E51612000F X-Stat-Signature: og3y7f61in83pw6meew4wo1tirup4aaw X-HE-Tag: 1699399925-618954 X-HE-Meta: U2FsdGVkX1+nzuEMo9McpUkUuULd43Ls3RTYrO+GMZr7+P+JbvKT023pG8DdFZDRYL449fK4DEprwDEFjcvh0q46EAfo6Y2bZMwY4yqgz5C4YfE0CJu/8VgsWR96+rqwDZjSz0Sgw6XkbgbSKW4mHJA/hmJr1oVkvwSVjD6h6tWmqQLyUPG9yPVW1Hf35rrIoiDbmHirX5xarKgx5ns2ZuCIL/PEQ0ke4s1ozxAukLb+7ff0+sRMnV0++RTgSOHPDJd3lOeQNg/OT1ibHeUbRRBOZkrN3/RjYUqDoiFc+rK4W5+ewmavesaKpQqEy+GmZ9xTuQ0Ps0cobPi6YmXCpF+npi4ZsV+ikC61RrzHswnGys/PKmsmpC+ResEniU5UTteV9PFql0+fhQC6QRb97VLwYBoieUuh3tXz5yH4qPveualaJm7bs4B8llt7mLCOHXt1OhEQfJ80qHRPgge1JX/5D7Blk3pm0Z6yDEAX3DawN18CGFd0iTDfgbh9ZviUIW95JW54YjgGl8wBS9orMvyLGIHKe6qIRDkueDkx9MkW8wb3YsR6fMYuMTbRp/t/ss8zdFhV6SPnwJJP8XcBEnnFnskEO6gjTkDHZWLxXpiRgM0YFPmmIfc7AH4ScmWbbNz8f1xy+9v8pSajkPFsayxdcvSZWSWGMaozsRkEKPnSIkNZ6twQhslWbNFPoaLk/U+45gPUquiVxZRvYn2Ejr29mg6CJKkmGnirFxeVVFeHUjhGdpy4s7oDsyD6A4kTlqM0hjLfsp9WbT51HyYwOVYEMoacT78YITinIObO84S69v/VgUVWbF9VtqbrgRwcsdPIwxLzXALNaROzI6H/wuQn3inaNXX1aUgoqA3T1iL3D/Lppq4Hr/LNIpaunBbRZk6ygUbR/tDV5/ZUMovJays8wNQCTn+YyRujEjIe7Z49eSiFqUahB7WEebS8pl0P3mtwIWtGj0/55kTxCC6 MujW7X6Q KIbPA30fQJDirdhAjwc7YYD6txay3FDs0DuFEitxnbtl7mRQXkGgKKNKQewpI88i1Hy7teyJW23hhemPF4qb0yjxugc+cHwIKv/eNlppjUFh5hpXIKVK6w/ATCF1R/rSzIbn06PLMyoCxBR2I2WZHqoKNeUGuBqVGj3Yr0HLaM1VxPm64v81fPJWWERYyYF8+XKz29ElIZAunBt+N+6Shp4Lmq7p4/+upvczkiLWkEC+zhma5HigMjA2hiknbJrOokBy12by4qBThEE/yvd68xPcO1FUH/+SicJbDgFffatZOJvn9p8J8abXtFdMmlDCDWPC+a9q37Wo4y4hzqbj/iO/G9udme/iUMgKABXw3iG3I1mL/aa3t+Hna31peVJ2opBrM9jfUMlwznWzxuR4qNFxVRqP/aNuqzPPO5KWZ/wffHLF1pO+RRVKV7VLxqx4PFOhX40WLUPoSftg8YGtTiJ0oKA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tif_need_resched() now takes a parameter specifying the resched type: RESCHED_lazy for when we allow the running task to run to completion before eventually scheduling at a userspace boundary and, RESCHED_eager for the next safe preemption point. need_resched(), which is used by non-core code now checks for presence of either of the need-resched bits. Also given that need_resched() (and tif_need_resched() to a lesser extent), is used extensively in the kernel so it is worth noting the common uses and how they will change: - idle: we always want to schedule out of idle whenever there is any work. So the appropriate check is for both the conditions. (Currently we use need_resched() most places and the interfaces defined in sched/idle.h use tif_need_resched().) However, as discussed in later commits it is critical that when scheduling out of idle, we always reschedule with RESCHED_eager (which maps to TIF_NEED_RESCHED.) This suggests that idle code everywhere should instead just do: while (!tif_need_resched(RESCHED_eager) { ... } or similar. That is true, but we have a lot of idle code and it does not seem to make sense to expose scheduler implementation details all over. - uses in conjunction with preempt_count(): we only ever want to fold or make preemption decisions based on TIF_NEED_RESCHED, not TIF_NEED_RESCHED_LAZY. So, related logic needs to use tif_need_resched(RESCHED_eager). - code that relinquishes resources temporarily (locks, irq, etc) checks for should_resched() and would preempt if TIF_NEED_RESCHED were set due to the (preempt_count() == offset) check. The hand-rolled versions, typically check for need_resched() which is a wider check. In either case the final arbiter is preempt_schedule() which checks via preemptible() does the more narrow check. Would it make sense to schedule out for both the need-resched flags? Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- arch/s390/include/asm/preempt.h | 4 ++-- drivers/acpi/processor_idle.c | 2 +- include/asm-generic/preempt.h | 4 ++-- include/linux/preempt.h | 2 +- include/linux/sched.h | 4 +++- include/linux/sched/idle.h | 8 ++++---- include/linux/thread_info.h | 8 ++++---- kernel/sched/idle.c | 2 +- kernel/trace/trace.c | 2 +- 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/arch/s390/include/asm/preempt.h b/arch/s390/include/asm/preempt.h index bf15da0fedbc..4dddefae1387 100644 --- a/arch/s390/include/asm/preempt.h +++ b/arch/s390/include/asm/preempt.h @@ -114,13 +114,13 @@ static inline void __preempt_count_sub(int val) static inline bool __preempt_count_dec_and_test(void) { - return !--S390_lowcore.preempt_count && tif_need_resched(); + return !--S390_lowcore.preempt_count && tif_need_resched(RESCHED_eager); } static inline bool should_resched(int preempt_offset) { return unlikely(preempt_count() == preempt_offset && - tif_need_resched()); + tif_need_resched(RESCHED_eager)); } #endif /* CONFIG_HAVE_MARCH_Z196_FEATURES */ diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 3a34a8c425fe..1a69f082833e 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -108,7 +108,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { */ static void __cpuidle acpi_safe_halt(void) { - if (!tif_need_resched()) { + if (!need_resched()) { raw_safe_halt(); raw_local_irq_disable(); } diff --git a/include/asm-generic/preempt.h b/include/asm-generic/preempt.h index b4d43a4af5f7..4f4abcc5981d 100644 --- a/include/asm-generic/preempt.h +++ b/include/asm-generic/preempt.h @@ -66,7 +66,7 @@ static __always_inline bool __preempt_count_dec_and_test(void) * operations; we cannot use PREEMPT_NEED_RESCHED because it might get * lost. */ - return !--*preempt_count_ptr() && tif_need_resched(); + return !--*preempt_count_ptr() && tif_need_resched(RESCHED_eager); } /* @@ -75,7 +75,7 @@ static __always_inline bool __preempt_count_dec_and_test(void) static __always_inline bool should_resched(int preempt_offset) { return unlikely(preempt_count() == preempt_offset && - tif_need_resched()); + tif_need_resched(RESCHED_eager)); } #ifdef CONFIG_PREEMPTION diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 1424670df161..0abc6a673c41 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -301,7 +301,7 @@ do { \ } while (0) #define preempt_fold_need_resched() \ do { \ - if (tif_need_resched()) \ + if (tif_need_resched(RESCHED_eager)) \ set_preempt_need_resched(); \ } while (0) diff --git a/include/linux/sched.h b/include/linux/sched.h index 95d47783ff6e..5f0d7341cb88 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2172,9 +2172,11 @@ static inline int rwlock_needbreak(rwlock_t *lock) static __always_inline bool need_resched(void) { - return unlikely(tif_need_resched()); + return unlikely(tif_need_resched(RESCHED_eager) || + tif_need_resched(RESCHED_lazy)); } + /* * Wrappers for p->thread_info->cpu access. No-op on UP. */ diff --git a/include/linux/sched/idle.h b/include/linux/sched/idle.h index 478084f9105e..719416fe8ddc 100644 --- a/include/linux/sched/idle.h +++ b/include/linux/sched/idle.h @@ -63,7 +63,7 @@ static __always_inline bool __must_check current_set_polling_and_test(void) */ smp_mb__after_atomic(); - return unlikely(tif_need_resched()); + return unlikely(need_resched()); } static __always_inline bool __must_check current_clr_polling_and_test(void) @@ -76,7 +76,7 @@ static __always_inline bool __must_check current_clr_polling_and_test(void) */ smp_mb__after_atomic(); - return unlikely(tif_need_resched()); + return unlikely(need_resched()); } #else @@ -85,11 +85,11 @@ static inline void __current_clr_polling(void) { } static inline bool __must_check current_set_polling_and_test(void) { - return unlikely(tif_need_resched()); + return unlikely(need_resched()); } static inline bool __must_check current_clr_polling_and_test(void) { - return unlikely(tif_need_resched()); + return unlikely(need_resched()); } #endif diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 4eb22b13bf64..be5333a2c832 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -200,17 +200,17 @@ static __always_inline unsigned long read_ti_thread_flags(struct thread_info *ti #ifdef _ASM_GENERIC_BITOPS_INSTRUMENTED_NON_ATOMIC_H -static __always_inline bool tif_need_resched(void) +static __always_inline bool tif_need_resched(resched_t r) { - return arch_test_bit(TIF_NEED_RESCHED, + return arch_test_bit(tif_resched(r), (unsigned long *)(¤t_thread_info()->flags)); } #else -static __always_inline bool tif_need_resched(void) +static __always_inline bool tif_need_resched(resched_t r) { - return test_bit(TIF_NEED_RESCHED, + return test_bit(tif_resched(r), (unsigned long *)(¤t_thread_info()->flags)); } diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 5007b25c5bc6..d4a55448e459 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -57,7 +57,7 @@ static noinline int __cpuidle cpu_idle_poll(void) ct_cpuidle_enter(); raw_local_irq_enable(); - while (!tif_need_resched() && + while (!need_resched() && (cpu_idle_force_poll || tick_check_broadcast_expired())) cpu_relax(); raw_local_irq_disable(); diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 7f565f0a00da..7f067ad9cf50 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2720,7 +2720,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) if (softirq_count() >> (SOFTIRQ_SHIFT + 1)) trace_flags |= TRACE_FLAG_BH_OFF; - if (tif_need_resched()) + if (tif_need_resched(RESCHED_eager)) trace_flags |= TRACE_FLAG_NEED_RESCHED; if (test_preempt_need_resched()) trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; From patchwork Tue Nov 7 21:57:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD430C4332F for ; Tue, 7 Nov 2023 22:00:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 266AC8D0066; Tue, 7 Nov 2023 16:59:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CBE08D007C; Tue, 7 Nov 2023 16:59:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC1C88D0066; Tue, 7 Nov 2023 16:59:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id AC1918D007A for ; Tue, 7 Nov 2023 16:59:55 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8C925160B50 for ; Tue, 7 Nov 2023 21:59:55 +0000 (UTC) X-FDA: 81432526350.03.2695301 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf03.hostedemail.com (Postfix) with ESMTP id 4D9BE20012 for ; Tue, 7 Nov 2023 21:59:52 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="V6/IrpSA"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="I/Cdk8Vu"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf03.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394392; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FD4bmpXlchgZ8GVWezjRtlUp7rKn2l4THNzmYwTAxWQ=; b=Q0xeawVppx8+xPRImf6AlBitOkYBYCH3j3o45oPQfzuR5pSShTo4MfRokco/NC9TCdaeJP DCRAy3+JhqBF5cFsH8gsCsxwD2jzQXJop7uRaY3p9meTvkQfuY5c5u08cogEXfht6pofI5 0BJ08l4dSDs9qBO5sHHOs3uFvtyXPjY= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394392; a=rsa-sha256; cv=pass; b=8VEJLkxx+q/2g068SAVghamuOzqSTIMmwUB5CJF7Ak6okB8UJ5UF9LcKaANr4eOV/vJD4q Nuc3ZgQr5XXfefUTZDsoR7Fg7T1KziNoCFcJasMUOYa6Fc/Sdgx1vSTqE7r4w7tL92LDs2 NOtt7jyN+ED1x9JFSL1mz4P0B4YEtTo= ARC-Authentication-Results: i=2; imf03.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="V6/IrpSA"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="I/Cdk8Vu"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf03.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJlqS020689; Tue, 7 Nov 2023 21:59:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=FD4bmpXlchgZ8GVWezjRtlUp7rKn2l4THNzmYwTAxWQ=; b=V6/IrpSAzrhXyUum08fIXiyanIw1FyZerR/ahHqoKYIKai+Qkc2+8UYWotzsNi5+AFsk 8HzW68eW83V4mFq8BxtDEmIj7pfHfbm7RP0e70jNKJu8LD1C5xv6//HicgDiXtUp1W9q XQnHfAX5IPy122kFqNfv8FTxY1389W+ttkQDS2Kk8FIkbr7+ROckpAc554yteQVygzHm 3bHPt6OPuD6CwY4gHXnPVxO5DajFBrZBgPW7OgFOMphAioP2kRcW80YKMz0qzcWk4A51 9Rhblp3v0xOXGQ0Dx9GS2azzId+bLyhTmQv1kYOf/TRMcLCZNF6YQrAwq51UTJd2I4Zo Jw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202s0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:37 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJBPF031966; Tue, 7 Nov 2023 21:59:36 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w221guw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mEbRs1XZpRXa9hdAD3HsIcG7Xy+WPrtvDJCPgX/RIm0otkL4n6nVWPJG73CVXIjOKjiKfDrztujRVSLxDEpyqvvADzIqLKcuo7R3ae2vvFlGqKUpkL5WwAmoJU8fFEHMp+n0S5n5s5Kb2gkPDes6yKXd5ZlllqlYARQPztN4qNW0d3DOd7uvyCtgFDWyynAB4HAWusmxkIyC3f3XVb1rWf5R9t5pd4JOmU2gvVOjFvkCtQn84SsrKcgezSAk5VnvCBZV3/pcsk06HufKbq1cm4Lq7lfWKxaF+pZ4BmzxEyifP2tEse3w2RYpvuDb//nYmUKHn3431U0qQQUMZIhm4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=FD4bmpXlchgZ8GVWezjRtlUp7rKn2l4THNzmYwTAxWQ=; b=KHm7enNAjMnbDv8Fm7fvOuJSYPz62K2f1T1nF65urJitrgxJ9LaxEXGDkc/Ie5HG2Pt5q/9mc0/cgZV7SsKKd3KLLT6wMx7xE7QRNagocAEclS5lpzaCzL95DvjZetOi2TriW8B95ZHoeHdE0z/HIOqXCs+7qJ9vGUVG5Nt4mcneIaZbIT0GsJcwEhGpIO1nBYLL4GwDihhB5+xzaGR5pBBE822hWvxjwEF0bi0We9nCsMqnrOmJStSMKQs8Je32GUbCZMRX1VICXlzelpY9/dMhdxXQlpOcZWI1C4115/gBpjhe88dt8BBN0zVVN+IO4imXAyslFvkCgjUUEXTE7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FD4bmpXlchgZ8GVWezjRtlUp7rKn2l4THNzmYwTAxWQ=; b=I/Cdk8Vu3nBxFdDIEEJHxT87ItDLUtAdxNphRhFhGPjlugrhp/QpSl4Qc8puvS1Q55DA48/6FrV7rQ3iLkAkmuZfKTYki6b7oSPUpiO57Ije0lZHOk2rPHZ7lM9aAkf9DsL7GvVdpOlIpTbAXqLPFFZUf2ySnW5auUOrDh32www= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:34 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:34 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 36/86] entry: irqentry_exit only preempts TIF_NEED_RESCHED Date: Tue, 7 Nov 2023 13:57:22 -0800 Message-Id: <20231107215742.363031-37-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0038.namprd04.prod.outlook.com (2603:10b6:303:6a::13) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 37adc040-d37f-4a16-afd4-08dbdfdcd3d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y+zzraS5kvBUcoDe1zI2QcyZt9MK7el5+tyGleG3Lx0jVLHJEIw9wcWDhD+xAa6VlzOlXDO/mh1x7gUsA5Y6VEX2YcpEsqtMlZewmQdqApyodeFm0q39nnMclW/WCMpQTatW7jWXBl5hB0Nq7tIrp0A7wCQZXWeLTWAJtRGwCnBUWRv+Qxjrs+YQdvReweE3/4YFGrC5uLPNTOynGjVOakeGQkCfUr85EZAqHw2URZLSpEmjJfabd32wcZHm/mUxw0OMmmI77Slkro3KBYqZnUN96QAy8NyT9wbkQxnH93C4TdtQSswXx8S7R59TkDpgpMTGuV72u8tKfgXnH83Xi8Y9/Tkuobo8Pbxa1SpC2Ecgoul/CHkq90ezYP6g9exOSlSnyfg/cgkiPUDv3y35tGoQ7lPByNp+giWgKhvVg35bwMElOPIbwHcCNNGrPPtA0MX2cT/l6kqZ+HPUMUqEZLs1jUmJfL3CWNX9y1YYI47BVoUKWcc2mtsWVghITl6fC3II49SbMPywH2RZbTfb1aU3nl1yNmJvSJIIj0kpSk1E123l8ZEESoeqjKOT91Bk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7fnT3QBlCWyadqI6kpgkhw9v6iGEyO7unL9iGSeTArZPRktyxjGgvlwUTwAyBJAO90wiAvijnqU2m8UCLyH+ytrtfljo2b95xXLcIEQa1OQb7s7Nt0Sf0h7p29D7NGD/9wCko3Jn5G2Txpty8SUTTveZZcLxXxR9WsfcPEzqShw1ZuHS46cFCEUrHLQN1DXAUT7hIObqpQZhJe/KDz+gjaLqslqfEF6znfumBBuXk2Xvk7XgkyjpaeqVlJamobLPHg8UarMfMMeXpyO15n6olewwpkliU8MBuhsxI7TdPcqsl/4JZyVVCte0fXBGhTy76fOHvjAIgCAQ/A1bWSypGvBSr5SVA4SdNcr3v5MqvU0Z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EE5HFn3fOLjnj6NVB94PGPU9qZkC2w+87Anv8emsa/rSgfju4/Cku/VvdiHQvEdEiCPRs+qb5o7IGjaxG4cxAE0BKH8rjX+suQHOq8+gnuxLtB6+lJuUIzm5KLp86uLetosjkTG/txPY+f4g/RqOBDSBhs2fB5jqoQz9ow5FrUfvK48JsNOgAta5+6sO7TineLvzWs4TCwUijZfvKXlkFqoZStpVeALZLGgkNkyBRl3xC/TH7yCXGxe1ey/oQO446gjqRr5M7KQwMff0Xi5AiWdFsA7fuDRGxuEeRi6RxUN09mVt9eC7UKaqyNUR+ABtWYqrBY7V/CHoM1zQNUEL3Jbc86D8N1Ow5NzvN+AN6diDqDOdsKW3XAPJVyfHKf7j6vJJgDHPL5uQms8/djPchy088QXgOiAv5fxw1GjnroEQ8E6/AnEymvPNpi4c0tT0G6dhD2Qc0OYHEe01OtjinbgBVrMkGeoIeEbdtAT0JSzayIYmYmg2mgRQuT7xcHmYj4dtoAQzAfjw0bmfSG1aNOIGTOMHZsVT2+qRv8UedmsYGOdhqLsavICbXVMM5EFYhXYNr35GiYfV5+iFEMDykyLaOViKlxTUssp4sBFXcF49+z5wF+HSSCSzJ4Hy6QRABuiLMW/CGoNmIZJCCvbmR1FL2kE88Lnx8I7QG9JuxjMTJDRWodHKclu4oE4Q4jt12eOfFpwzVHWDXxywXO/p7rDJ7irpbSgerAhlsfET5dSvJ5wFzmpmKKK2oKw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37adc040-d37f-4a16-afd4-08dbdfdcd3d0 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:34.3817 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Yi6bAqqBzAGj1f1RiO/WyiKNSuZcbQrgt80+8oU7iCEOLthVjskt4j5p9aN2Md/0PpM9Ldcj59KCSb/0PDbW7lfdK37qL0/USlnoqIFK/h0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=930 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: jr99TgQ2zl7BNlRuGs-_oLSdR9PF1tKu X-Proofpoint-ORIG-GUID: jr99TgQ2zl7BNlRuGs-_oLSdR9PF1tKu X-Stat-Signature: 4oszo8t8gi3593a3yeq6bzxtfhrhsc9h X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4D9BE20012 X-Rspam-User: X-HE-Tag: 1699394392-836851 X-HE-Meta: U2FsdGVkX18zL51rI30p9a6uPA5qT8on8zhycaebScafAE7Q9N4WGuUYxoSdWHjWz8Bg9IzYiDGDpoTEAE0gyIa+PJ2bAD4UsuuqzGb79KxPJDtRR6eAR5WPVSHCQLS3khcroNHA4Np1C+sdN/xcDVAYEs4AAND+lvon3DeIYqMI3HFvG7m2OmuYY3TalzwC8ydOG8pv2afnjTyxjs21lRvVGfr2bIAu5D0K4ih+TgCPLm3e+7zuHxmhmr75pkPCWnRGoDZKoVfTlPzLWk1+GAitKymsBv1RJPY2sgQLciXT5E/bmRfddOCXfWvCnQ+u8MJH+Ac64d5HUJ+6UUXfTmx4vZNAeRq0fYkqNWoLJ47YLBSZWnmpQt+kyUeQKwUFNLR93L35I9Ox79L+dd7zBEFovnin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, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The scheduling policy for RESCHED_lazy (TIF_NEED_RESCHED_LAZY) is to let anything running in the kernel run to completion. Accordingly, while deciding whether to call preempt_schedule_irq() narrow the check to tif_need_resched(RESCHED_eager). Also add a comment about why we need to check at all, given that we have aleady checked the preempt_count(). Signed-off-by: Ankur Arora --- kernel/entry/common.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 0d055c39690b..6433e6c77185 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -384,7 +384,15 @@ void irqentry_exit_cond_resched(void) rcu_irq_exit_check_preempt(); if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) WARN_ON_ONCE(!on_thread_stack()); - if (need_resched()) + + /* + * If the scheduler really wants us to preempt while returning + * to kernel, it would set TIF_NEED_RESCHED. + * On some archs the flag gets folded in preempt_count, and + * thus would be covered in the conditional above, but not all + * archs do that, so check explicitly. + */ + if (tif_need_resched(RESCHED_eager)) preempt_schedule_irq(); } } From patchwork Tue Nov 7 21:57:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A328AC4332F for ; Tue, 7 Nov 2023 22:00:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F133D8D007A; Tue, 7 Nov 2023 17:00:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E48028D007C; Tue, 7 Nov 2023 17:00:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93EF68D007A; Tue, 7 Nov 2023 17:00:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7B4208D007C for ; Tue, 7 Nov 2023 17:00:01 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5917580918 for ; Tue, 7 Nov 2023 22:00:01 +0000 (UTC) X-FDA: 81432526602.28.4778401 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf09.hostedemail.com (Postfix) with ESMTP id 01348140019 for ; Tue, 7 Nov 2023 21:59:57 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ecT3GYc+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=e0z9IIWF; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf09.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394398; a=rsa-sha256; cv=pass; b=C/jWBrd4aPkgxtlUJM/otY9H4EDMkqCsXOWfYJCZNOt6lchGF3SOeDlQKy4zyQcPHnLWn+ ubB51+jpaftnCxAOosRpjT/Gjwdfcm5lZBsaJtRD2ObNoX91009NIZXNa5xNDZaavfl52T LZBDi92ZdYdCasIEqgDEekfA/booF9k= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ecT3GYc+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=e0z9IIWF; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf09.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394398; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YmgAgvFBQBQ1RlnhG7sJhAFaYMeGOMdlXGUigYIR6iM=; b=0Z2P+S3vjppD106i2MHQ2J62Q9aLap2s//MUSxbcDwACmpXraSIRhC/3qJtjUEshPaot68 icujRz4whTtLFplVzqvg86WeOfpsJVGZL4c9L8xFmSTC4swg+edLeZ3LjtYmldnQdfLCbJ U+aALt2zR6KN2nGHIvmojMF4uUSVdzc= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LKCxV023477; Tue, 7 Nov 2023 21:59:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=YmgAgvFBQBQ1RlnhG7sJhAFaYMeGOMdlXGUigYIR6iM=; b=ecT3GYc+Faq5fuJh0NylaCiuGTae2PBIPMnefpaYnXAO3PWeE0W4FG683HdL0cB/cIkA Eg6hxxu14yqCMssEa2qDywazxHI0VGe3pT9f/vst7Ufi0Ko28YzOzmCIsUJspe7x8OOG r0F10JgUj1sRS9TU9FxYN3wEnQF/j5qzzkKyaVlmCSDDPUchLeiVPuJJenER9Tz97a4q CG3RRy6+lVwY8OL7qNqxFUsci+Xdfp09LH3Xy5Our5IBqWYC262dWw8UVn+ZnkWRTMHt 21ARJVUPpV3Al/XrvXwk7XqAGfYclzv9Z/ETXiloW9moDSoILw4ac9biAGVTd32qxxwr RA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2002hk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:39 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJIKj023748; Tue, 7 Nov 2023 21:59:38 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2040.outbound.protection.outlook.com [104.47.73.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241ghy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgNMgA8UJr5MQBUNIvf28Kdgtu7+fgAZG3qhBXI9exlIgq/7nB/HUAAV9LNd7C4LRbLlmiaDex5IkdlXuxu8Nd2/qyy96TSIWaWcl+uzWdH5aqjfsN629SSFLcXpiXMY6jVaLWeCrzAAB1Hx3E51axhmFvvplk9jCe9QR42uEedkciMeQNVyqPEPAdEFzhee702jPj/MQ4QCGPwV+Kffwloq70BuWf796GRON+O+tbyml/2Gq2z0Vx3HDrf9jPCQK5+Q35GUvD5VQr5XeK4/n2U3uDIkCBvoA++brqE9gn+uwVkFNgjLSe6Hahp03ynqvBNgQlNDQS74EQH3z2tN6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=YmgAgvFBQBQ1RlnhG7sJhAFaYMeGOMdlXGUigYIR6iM=; b=m94W/3r42CKM6NTbLBuzuh33HNbI0x/WUBljNZWXFu+b2UwFQrUUM9gArZ+5LImTxqDgcl6G0pRxE5ECtpKJj65CfwH6oh9x+SzPOCiIOC7Z351fi3p0eOQtCWkBPz6fxa1aOP1nO4IineF/PAIHwoHJGFOuYpWVmxfZKX48GT2ByuQMBG1J1P2vI/vpdaMeJxFDZvN1t6fV6fqGrrq7+2IO2Jd4O5WYEJCGfKzQ2LB36MYrM+GWvRjoqvPZrGIVbW8dIbzZ/rxS0L7ljUz9VHPBI2NqhSAwXm8vZUltRLm3Lg28l1nkyD+vmtdxZjScGydYnv4f/gDj3NL1A8Q8qA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YmgAgvFBQBQ1RlnhG7sJhAFaYMeGOMdlXGUigYIR6iM=; b=e0z9IIWFtpRFOZ/FqYi+9nwXYIf7dtq/vW2XcMJHVrJDdHNdxxXWsbvKERC3kEpiJ4Hc5hcDp9GDYWTKmlrqRVp6kjg5nZMwnvSlIsTnsYpKvdg0HSRXGVHCwIvsCd4D3A5xbH46soOawvmO3Arq2dvTSyGlXsWf+4ZTbARlhP4= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:36 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:36 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 37/86] sched: make test_*_tsk_thread_flag() return bool Date: Tue, 7 Nov 2023 13:57:23 -0800 Message-Id: <20231107215742.363031-38-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0005.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::10) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 6fd9d6ac-9e76-44f0-6df5-08dbdfdcd4cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uXfE7riqVCjzop+7ucH/vYW89KbduvzqXACrrb8f6x6X+aS2wlx10yJhEDYgZPc1Vd+heF7gQTopC1VzZHDe0RY4MtRwzAORi6esYZj2eT1eX7BQJZjvf1WWYTDu0/xmNZle5umq0ORqDF4EPCYghxVZpzKapIrPnZHY68EVNk3+j6InlI/2ddiOiL98gqnf5SZDleH0KxqokqoOQ7Hsj6pnqKQI7g8kaBiEWzIgIlH5TDBUcnF5G0DnObHkmfIUarVyHXWUCICiBhjv1/JCOcHXpc3GNccv6R5i4GfCrXxPb8FpbUATBgxnIwNXCXBMnVM4MXwT+jjJ+v6s8U7qYT6ZAu0A1ciUa4UP8RkgCDIFw+vxgiuZgLsxkjoGdFgC+N+ll/kMcOE7u8lqowWfEB1lywZ535Copu5YpsmP6TDBP1Nk/KEFvPntOKv2CACdNkGf+V5FdD9Hp7+/TJEKgYBJU8YopXtU4GCAUH+krVBiUyzAadtTq2Owa8YX8fbHULfk3OUJ+EjNH4mSKBs6Sr8VjeeqH618tlR51ed/3uERiUWXFRQjXvkrFEm1+ptn X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiS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Msjn/Q8bjhK/4VIbsO4Zd7K4raizFup6g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fd9d6ac-9e76-44f0-6df5-08dbdfdcd4cd X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:36.0638 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3p7NUjtuXMOExkHH9+VdXxixp7nHdA19JM/+tDnk653+ypcYR9TzUQRSXY0nhzUasLSlk9M38v9khg9U6r1rhroYYDVpNOVRioU0CUP+rU4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: 8om7VioEVbVJLYwRjxkNJX-KMP13eo9T X-Proofpoint-GUID: 8om7VioEVbVJLYwRjxkNJX-KMP13eo9T X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 01348140019 X-Stat-Signature: 41txgap19yj65nu6sk5rb6tpbg8ma4ns X-HE-Tag: 1699394397-826883 X-HE-Meta: U2FsdGVkX19fSmp0rMj9p5rn32fRfoDRGrRaakkaL0sDzkdlERqyl+ThgyX2/otw9a6Hjmtx1Idu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YODf1un8unaQM4BZRc1+Ai9TZaeaZ0m8IhCq/i0lxRsA8vHNRjGCGH8JRFluVj76xCBdsvt4mi6AqWxCNWD+RLTYJnI0XuFpk0qXahBup5rEnALmq2mQnlB+YgflpXSsAFKXLIk88ocJVCW+Ank0XZDca7XKQGRrInPDWytKzTgsVP3h+7RYBK4PEl0YBZzCwz/IggvqhPp5p9wC+QRkvXvFr6HGE1x9srdqDm90RTODD3NBD4715uhcvQFHQBbZo0UbGNPI4/ohO0EvjJiVYRTFw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: All users of test_*_tsk_thread_flag() treat the result value as boolean. This is also true for the underlying test_and_*_bit() operations. Change the return type to bool. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- include/linux/sched.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 5f0d7341cb88..12d0626601a0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2045,17 +2045,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, update_ti_thread_flag(task_thread_info(tsk), flag, value); } -static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) +static inline bool test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) { return test_and_set_ti_thread_flag(task_thread_info(tsk), flag); } -static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) +static inline bool test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) { return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag); } -static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) +static inline bool test_tsk_thread_flag(struct task_struct *tsk, int flag) { return test_ti_thread_flag(task_thread_info(tsk), flag); } @@ -2070,7 +2070,7 @@ static inline void clear_tsk_need_resched(struct task_struct *tsk) clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); } -static inline int test_tsk_need_resched(struct task_struct *tsk) +static inline bool test_tsk_need_resched(struct task_struct *tsk) { return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } From patchwork Tue Nov 7 21:57:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22254C4332F for ; Tue, 7 Nov 2023 22:00:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CEC618D007E; Tue, 7 Nov 2023 17:00:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C02C48D007C; Tue, 7 Nov 2023 17:00:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DCE68D007E; Tue, 7 Nov 2023 17:00:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 877BF8D007C for ; Tue, 7 Nov 2023 17:00:06 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5A370C064F for ; Tue, 7 Nov 2023 22:00:06 +0000 (UTC) X-FDA: 81432526812.29.8AEEB21 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf13.hostedemail.com (Postfix) with ESMTP id BE5582000E for ; Tue, 7 Nov 2023 22:00:02 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=GG1ZUl9W; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WpHpoALR; spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394402; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=c9v4Khm6/vMY8YkJAQXtVZyyMtxVvUYHI0R7VpMBhRw=; b=kMkyphLI0cy/heTiR/shfrEmsnv6WkU2uLKWMvhO7dTRvp2h4FkmLSqFShrvMHAJf9982K fr+rLwjEZMRdzdxZxbttn7M4eV0IKae4Z1JCq0MkSBbVRxo9zZlrqoOdHq02xSqSd1CeTj de4VcAxHifTrZ3/+ngLsbZ9Hpd5hA4o= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=GG1ZUl9W; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WpHpoALR; spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394402; a=rsa-sha256; cv=pass; b=g9NfNN24LTkhdZy2MHz8Cp1jrVgr8G7I6xjOHFvC9V3xPkr9aTK0HCtaybONlfgYMdpzrb u9FPx1u/RDi5hmeVzHrqeDw5f2pljrF+lGXDbX75YCbKkP8g0Q26SXhGKySsCA3rW7L6I5 T33We3V7cArUwPxet1Gg/g6vqx1S+Po= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJODE032058; Tue, 7 Nov 2023 21:59:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=c9v4Khm6/vMY8YkJAQXtVZyyMtxVvUYHI0R7VpMBhRw=; b=GG1ZUl9WmvTFzxqBAxf9RFy3DEEf9yR+toG+tls+zh9K9o7SUyMX8ATSmGzaoVl3iYEN hSS6Gvn6a/ZikJq8fUsEhbfUBjaU6eJzsfjDcP1y16fv4K+BXfHUvMNa8cVknXVfm17C TxeyBaFhckHaNiYxwERcSv2EActb9QAS7W23+edDlEp4RWQJ4sAPEffuwm8SwMmWocP2 iPIoBL8obccv3fZ7DCYt5kuv1UWmU1e6wh+mzU1nQvt+qE0nhIEIj8WxmbfYPVwc7ZB4 h6QElQtXowbI/RO8IOrMKvNvIw5E5UHN+tJxKo3VxuAy+2+a8SaHsH0nNn9i989fQdDP wA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2cv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:42 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIpY4000579; Tue, 7 Nov 2023 21:59:41 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1v9k32-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eac8JORGCDLxorCQsFx2KQ1CEGrJrgDvZftjpOjH+MEENDYihaZQ9Hd7ZeTlPYDwgKc8GFmnVaHHfyU6EkJy+CyhzDPn5Azem8Sn9J4DjMbgWb3DXhCg1fAbJpS3c4LNZqWgy8hmSgZOWsJA6U+inhPnBVGhFmTeS7Hd1LdPDlB0dNv08SKeBuGz2U86ZBdqfWBlsMbzyDbIiVQBLBPQ/8tnVipdW8exdKF0AYxxBxcF0kCCaAl/eVzmODNOgIIPsvLWk1rQc1MLdRSPdF1kCGrT8KEs7yQTbZ/OcqlFSgGem8H3KTZCqjV2XrchTKXOkL78duaa6V2iL9/jYpeYgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=c9v4Khm6/vMY8YkJAQXtVZyyMtxVvUYHI0R7VpMBhRw=; b=dm7Sgjw61fUG64lyX7CVZgiWvqU4+yIN0TdoxASJMrWNT4HwKrIh3zovnmaMVTq7wJuw7mRRqGGepSg/W5gP6ZlMVgkGZFw5K85cBWVfbpGpv7s5SjSKP54vRuY0/fGcYUvyMkStdRwI/ieAxsm5wVEwJu1zeWLJ0+MyeapESJ9OZBXsIMdAZYDq38EyrNKLO8tRgM+CGOOfPELOjsihlJxJgzWB2CFoCbOpndmqn3EGmV64+e+WKaJFQkWWg56BvrbapQ2bAX7ZaWUv+yKSE+0KhmXsbPGcijO1fCJ84w+cSnujgDW8yFWyJya/9x+pKHt0x+gMNDVOhTqk0tlXHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c9v4Khm6/vMY8YkJAQXtVZyyMtxVvUYHI0R7VpMBhRw=; b=WpHpoALRXWLqgpxuO4oCtXSbBFtSpjPzRQYFJ2FWSjmwM1wiRoCXhVxcRcPuQ3z9NZExtQlPKLCZ61if2j42i3QlB6BIz022XbpkbdVD1u4K74xJeH1daJxPDKwNjqn0tvGsnGdy3+hE+BM3EwcwDe+AtWcP8Eed5etN4e0J8Fw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:38 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:38 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 38/86] sched: *_tsk_need_resched() now takes resched_t Date: Tue, 7 Nov 2023 13:57:24 -0800 Message-Id: <20231107215742.363031-39-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0011.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::16) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 042e553c-fb11-442c-532b-08dbdfdcd62e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XRminZ3HBxYzD0JU8jz5RqsB7R/Scj7ztsiyyfG+eNDzT2/iUOIZXiAFHsM3VMaw9qH3NgWTT4FUHDRcjFeajIQnZUw8Ql4sEhTLgPlrXrfFIpKHx0o/0pVJwo6GRLaayNLB0F+3acFfQuQwVFnFJDCfRtdP+upjqTTfFLXSSKl3xzPAKTzW49xwjHt3i2nq5Nrddl2AvV8J9uHWKW/SgJJVKjZhIfTiy8CbGplxKT9bFdnedbX0vkMSqOjNKYEPH+qUwA12HIi/Nkzr7MnFQYygVXIlGFe804ewPz46UQ8HW0j4EQ138GJSp5GKdAn7OgaHB/Sw55kJqdYJxSmDqZZ+Oyu7TVENO+BKGBSC7RVBcmpYaJHbxnV4BobLhADnA+UOLVRzDSqLmrtfb9rsbBZKxFOp3rvjspehgd79WZzB6xIpeIDYv3P2IgjasgCcy/eBcmiRLykXzOzdLQ2VVwrn3q6h2vXHN0e6DUtJ7i2CFlrEEI5I0WiQZCmKe167Gf8UlD+LBIOOP1p+iuRH6kNHLo25qolu7FlA9LOPUtLi3PhXj2zl+AFgf1UAWV6v X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(66574015)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vScT9MqfmS46K0ucVBqUPRaY7aPm4X1HuuM/BWeRQE/2EqdOu0OlZIv+X4kOmLiVlRjXpiTnaUyKuQyA7mK77RkZ5zLSf6Qk3WeBIW3AmZZA1A99H1luRHEGfHfGbhcnAnDqBYL7ZW6wIncv1MbIYdcJSDVW4x/YTaoJtZYzgS653xEFLi9Qj768G+NNg9msSE+tlXXUafKIuy+bPxCihvPGBQ0agY45+MgtHcS8IuLhkgzlHGWLuJAfWiRIZkHwqot5861MFIigQFhV788440K+VB6KXASdANwbYi5eDmsd3eEnrJxZ0LA27R/mR9/UO9vZOw0Yv4ZzS8a03QqwocAKDdMyru+iv+jJpvubg/6/9x21RLMzeWL0D3QcpPiJyTnJwOz8lcUyD/MzK7H22ls0unZzuaPK0poQGEimJ/Q39nQj80yJjHh5ToEvubv0K8hVIrdne0aJ42VbZounFO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2I9OCfV6gF+V4RQs1p8n0k4juY+ekijjMfXCUAZE28Iqr4necksrTiw/bZ+BRPLmoc+nhXNHisZM6J6c8jGTkNjgdhgOPYKZkyOjk0CnI3sgTXgRWviP4Re1AO7Cn7qRdXhh9bgGeIyykTPGtsRWrI0bDI5uPfytHsati1g06K3kS3gsv1B2jPZbmQf67wunkNXO+QvByMwDQvjTkFwJOiBamMbYa7+QBl+rKJeORbZNnxrP179vt1WF0yXvvwmafYWZ3KPPnOPzGvKc1EV03WtTJ2nVjoncVZl5JsM3/ah8FRBNaUg/hUoi4tP0EgbOUiJ8xWDpqQgvc1rBRtFaDHs49JIWh0zjy/yL+oHW/vx+ycLt2NUOn3rV7EeGgzUR0498Ib0RQUNxkdpWEzyPZ8nsBUMy1SeIsUOrLMEzK4fDRU0Ns7c42EF7/k6tBBhsREytxyX02N3l7PYVTdxcbtPzkPLyv1GD3QcJFMmoURAoiUv3DovKbxTd01rN1C/M2NMtkaPcJitP7wafFb/qf8CLjp89HmnJZ7nZe0x9+azOHPooDPY19E9egMn1rOgEmjf2I2Iw58JiRjxXkhXACVvA729CBxqQy7X3ggn0uIzXZ/1JOJWWz4WZYw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 042e553c-fb11-442c-532b-08dbdfdcd62e X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:38.4630 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q81M4D34lOWmuPYcmKzDCrfjdsTZHr8n9kMxPqi7KrOA610vUpHq/n0M8Ej2LEri8sNL9n/l1NyhYlU4C8JBLPKmiW2Mfm8GwMVgHP39QKI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=816 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: xsfmtYUmhCHZi5xj4pnaAmavxja50UjX X-Proofpoint-GUID: xsfmtYUmhCHZi5xj4pnaAmavxja50UjX X-Rspamd-Queue-Id: BE5582000E X-Rspam-User: X-Stat-Signature: jw8t6bcnnzqu1fgcod64pc7jd69qkby9 X-Rspamd-Server: rspam01 X-HE-Tag: 1699394402-183285 X-HE-Meta: U2FsdGVkX1+35AZbaLA8VyBEk0w2eGm9jO2sPrKE0IO5nwA/Ia+5q4OiL/fBbaTqNQBN6o97ThP0uVlvoIBgoGWPlhIb1+nWGDeUzQDIcPN0Eth5Aor+JhFULV8iq0zSW1Y1nj1iVVy/Y6HUSAbCFpNr5lrDsYK2X7Aeu0n9KpeN09R6laWWom1P5NgifIGwl7pj+vw/VHjOAxr9cTMc/D6m9T+4PWuPuMT23NO1CyPP27FLBtnc1L+s4deDGZLtyYetvIgoSM0G+J9QI9EnEBeEjBHBQp9XUedkrgufXcewbkUml5ub+0u+YskX7oDXaDZMTfz9r1eVjHPoAyMaUzVao/64Luh/hctXrgQGHduYKao5RvmhyGv9euNi+TtEWBUFUa4KuuTbRIEuqpAtNaMl5GLby0f+WsI9Zg4bgk975MNL9DHTI3Ij479hIAzcN+ija9JjCDMXu5e8hBbS9aALEtWa9OUOCB/n0PLp8T/afzzcbQ/KfgAfqb+vFeEPyPGtarFD2Y00JrjhVE3qDPauc20j635ImtaoPSueWUraKpqWXeEdYwnWQZnp0RE/3ZXoQYq6Tc0RYeEV63VP97awzdBEEFqZUJWhcKLgkLKHnwD+R4rDr9ke0GQD1RABVExWfanhJ7yVw09IooA7RpfZCT3lJxLrLpvX+BCpbdQDKN83lKSzRVn/e8mvRn+3xnm/xy1eWtO6u4U2vNCkrEHwkKIiLac27iru+6q6SUB2+3OWsBsvDwZdaAYx8U0nOTiB9b8+s5GQBV//5O+4K4t3CKr4cWBpPsLA+gzbk4mzxQCaOMF+up3+6sTyxDwfTfhZyfTaqOHsGASH7aeFvZJCrhJRIIrqK+k9n/L2tVGkyVTRLaxHJj81oaRHvp+LoAKKlQsMv3wjlerrY2qqp5oQpOl2gSfEdnRNGrX3MF3dYjaImxnXbp7dLnCrzFVhK303Xr5M+jmRWhYOXxM hTxH+YJS rYMd1CAPUS3dh3Tp/YxvsTBRKuhe74d6UtcgADDxMZ+X6eRUTVlb2Chl4BuFzAfHjJom4Te4HWP6+I4qpDoV2egbQA9nysCctzsQwe6fEt2gqbxyhAcSj/P8tj2WR6sD8LfUDbbXZff9uuYFYwv01VsKqXDFya/AV1Lo9bw0x1AgtwisIw2oDIRqhFm2+xqycJtZ6+mX8cVKsR2VkYNFf/o3kXzCBKoDO5RCHGxSgsHl/65skqjEAq9px0IyUVileHaiCNTfC1hQoWtVSjK5q5Z4g+JhxzE1Zmac4A8wieDo3+9RfhbqrXCUuYCf4+BhSzKOy7kZzAre84eKfAyu6iVC43cVZus0Z8K64TA28RJlmNpHpqAZrX/gYIFvapj6zJniIKtg8p9h7uuHUEtAKii41+WlhLd9+znSydUHyuSQzpVN+GBh0BIU2KevyaJJ6Jmc3z9JKh18HrDY41Jr7RPdKvA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: *_tsk_need_resched() need to test for the specific need-resched flag. The only users are RCU and the scheduler. For RCU we always want to schedule at the earliest opportunity and that is always RESCHED_eager. For the scheduler, keep everything as RESCHED_eager for now. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- include/linux/sched.h | 17 ++++++++++++----- kernel/rcu/tree.c | 4 ++-- kernel/rcu/tree_exp.h | 4 ++-- kernel/rcu/tree_plugin.h | 4 ++-- kernel/rcu/tree_stall.h | 2 +- kernel/sched/core.c | 9 +++++---- kernel/sched/deadline.c | 4 ++-- kernel/sched/fair.c | 2 +- kernel/sched/idle.c | 2 +- kernel/sched/rt.c | 4 ++-- 10 files changed, 30 insertions(+), 22 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 12d0626601a0..6dd206b2ef50 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2060,19 +2060,26 @@ static inline bool test_tsk_thread_flag(struct task_struct *tsk, int flag) return test_ti_thread_flag(task_thread_info(tsk), flag); } -static inline void set_tsk_need_resched(struct task_struct *tsk) +static inline void set_tsk_need_resched(struct task_struct *tsk, resched_t lazy) { - set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); + set_tsk_thread_flag(tsk, tif_resched(lazy)); } static inline void clear_tsk_need_resched(struct task_struct *tsk) { - clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); + clear_tsk_thread_flag(tsk, tif_resched(RESCHED_eager)); + clear_tsk_thread_flag(tsk, tif_resched(RESCHED_lazy)); } -static inline bool test_tsk_need_resched(struct task_struct *tsk) +static inline bool test_tsk_need_resched(struct task_struct *tsk, resched_t lazy) { - return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); + return unlikely(test_tsk_thread_flag(tsk, tif_resched(lazy))); +} + +static inline bool test_tsk_need_resched_any(struct task_struct *tsk) +{ + return test_tsk_need_resched(tsk, RESCHED_eager) || + test_tsk_need_resched(tsk, RESCHED_lazy); } /* diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index cb1caefa8bd0..a7776ae78900 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2231,7 +2231,7 @@ void rcu_sched_clock_irq(int user) if (smp_load_acquire(this_cpu_ptr(&rcu_data.rcu_urgent_qs))) { /* Idle and userspace execution already are quiescent states. */ if (!rcu_is_cpu_rrupt_from_idle() && !user) { - set_tsk_need_resched(current); + set_tsk_need_resched(current, RESCHED_eager); set_preempt_need_resched(); } __this_cpu_write(rcu_data.rcu_urgent_qs, false); @@ -2379,7 +2379,7 @@ static __latent_entropy void rcu_core(void) if (IS_ENABLED(CONFIG_PREEMPT_COUNT) && (!(preempt_count() & PREEMPT_MASK))) { rcu_preempt_deferred_qs(current); } else if (rcu_preempt_need_deferred_qs(current)) { - set_tsk_need_resched(current); + set_tsk_need_resched(current, RESCHED_eager); set_preempt_need_resched(); } diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index 8239b39d945b..a4a23ac1115b 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h @@ -755,7 +755,7 @@ static void rcu_exp_handler(void *unused) rcu_report_exp_rdp(rdp); } else { WRITE_ONCE(rdp->cpu_no_qs.b.exp, true); - set_tsk_need_resched(t); + set_tsk_need_resched(t, RESCHED_eager); set_preempt_need_resched(); } return; @@ -856,7 +856,7 @@ static void rcu_exp_need_qs(void) __this_cpu_write(rcu_data.cpu_no_qs.b.exp, true); /* Store .exp before .rcu_urgent_qs. */ smp_store_release(this_cpu_ptr(&rcu_data.rcu_urgent_qs), true); - set_tsk_need_resched(current); + set_tsk_need_resched(current, RESCHED_eager); set_preempt_need_resched(); } diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 41021080ad25..f87191e008ff 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -658,7 +658,7 @@ static void rcu_read_unlock_special(struct task_struct *t) // Also if no expediting and no possible deboosting, // slow is OK. Plus nohz_full CPUs eventually get // tick enabled. - set_tsk_need_resched(current); + set_tsk_need_resched(current, RESCHED_eager); set_preempt_need_resched(); if (IS_ENABLED(CONFIG_IRQ_WORK) && irqs_were_disabled && expboost && !rdp->defer_qs_iw_pending && cpu_online(rdp->cpu)) { @@ -725,7 +725,7 @@ static void rcu_flavor_sched_clock_irq(int user) (preempt_count() & (PREEMPT_MASK | SOFTIRQ_MASK))) { /* No QS, force context switch if deferred. */ if (rcu_preempt_need_deferred_qs(t)) { - set_tsk_need_resched(t); + set_tsk_need_resched(t, RESCHED_eager); set_preempt_need_resched(); } } else if (rcu_preempt_need_deferred_qs(t)) { diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 6f06dc12904a..b74b7b04cf35 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -705,7 +705,7 @@ static void print_cpu_stall(unsigned long gps) * progress and it could be we're stuck in kernel space without context * switches for an entirely unreasonable amount of time. */ - set_tsk_need_resched(current); + set_tsk_need_resched(current, RESCHED_eager); set_preempt_need_resched(); } diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e30007c11722..e2215c417323 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -927,7 +927,7 @@ static bool set_nr_if_polling(struct task_struct *p) #else static inline bool set_nr_and_not_polling(struct task_struct *p) { - set_tsk_need_resched(p); + set_tsk_need_resched(p, RESCHED_eager); return true; } @@ -1039,13 +1039,13 @@ void resched_curr(struct rq *rq) lockdep_assert_rq_held(rq); - if (test_tsk_need_resched(curr)) + if (test_tsk_need_resched(curr, RESCHED_eager)) return; cpu = cpu_of(rq); if (cpu == smp_processor_id()) { - set_tsk_need_resched(curr); + set_tsk_need_resched(curr, RESCHED_eager); set_preempt_need_resched(); return; } @@ -2223,7 +2223,8 @@ void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags) * A queue event has occurred, and we're going to schedule. In * this case, we can save a useless back to back clock update. */ - if (task_on_rq_queued(rq->curr) && test_tsk_need_resched(rq->curr)) + if (task_on_rq_queued(rq->curr) && + test_tsk_need_resched(rq->curr, RESCHED_eager)) rq_clock_skip_update(rq); } diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index 58b542bf2893..e6815c3bd2f0 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1953,7 +1953,7 @@ static void check_preempt_curr_dl(struct rq *rq, struct task_struct *p, * let us try to decide what's the best thing to do... */ if ((p->dl.deadline == rq->curr->dl.deadline) && - !test_tsk_need_resched(rq->curr)) + !test_tsk_need_resched(rq->curr, RESCHED_eager)) check_preempt_equal_dl(rq, p); #endif /* CONFIG_SMP */ } @@ -2467,7 +2467,7 @@ static void pull_dl_task(struct rq *this_rq) static void task_woken_dl(struct rq *rq, struct task_struct *p) { if (!task_on_cpu(rq, p) && - !test_tsk_need_resched(rq->curr) && + !test_tsk_need_resched(rq->curr, RESCHED_eager) && p->nr_cpus_allowed > 1 && dl_task(rq->curr) && (rq->curr->nr_cpus_allowed < 2 || diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index df348aa55d3c..4d86c618ffa2 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8087,7 +8087,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ * prevents us from potentially nominating it as a false LAST_BUDDY * below. */ - if (test_tsk_need_resched(curr)) + if (test_tsk_need_resched(curr, RESCHED_eager)) return; /* Idle tasks are by definition preempted by non-idle tasks. */ diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index d4a55448e459..eacd204e2879 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -329,7 +329,7 @@ static enum hrtimer_restart idle_inject_timer_fn(struct hrtimer *timer) struct idle_timer *it = container_of(timer, struct idle_timer, timer); WRITE_ONCE(it->done, 1); - set_tsk_need_resched(current); + set_tsk_need_resched(current, RESCHED_eager); return HRTIMER_NORESTART; } diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 0597ba0f85ff..a79ce6746dd0 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1735,7 +1735,7 @@ static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flag * to move current somewhere else, making room for our non-migratable * task. */ - if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr)) + if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr, RESCHED_eager)) check_preempt_equal_prio(rq, p); #endif } @@ -2466,7 +2466,7 @@ static void pull_rt_task(struct rq *this_rq) static void task_woken_rt(struct rq *rq, struct task_struct *p) { bool need_to_push = !task_on_cpu(rq, p) && - !test_tsk_need_resched(rq->curr) && + !test_tsk_need_resched(rq->curr, RESCHED_eager) && p->nr_cpus_allowed > 1 && (dl_task(rq->curr) || rt_task(rq->curr)) && (rq->curr->nr_cpus_allowed < 2 || From patchwork Tue Nov 7 21:57:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83566C4332F for ; Tue, 7 Nov 2023 22:00:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12C818D007F; Tue, 7 Nov 2023 17:00:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DDDF8D007C; Tue, 7 Nov 2023 17:00:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DFC508D007F; Tue, 7 Nov 2023 17:00:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C97B98D007C for ; Tue, 7 Nov 2023 17:00:12 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A43EC40B41 for ; Tue, 7 Nov 2023 22:00:12 +0000 (UTC) X-FDA: 81432527064.04.B79F841 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 46C87C0023 for ; Tue, 7 Nov 2023 22:00:09 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MZyguyW1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=mqs1SxSi; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf22.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394409; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2ZY6L9oPxrPlWmZKgAmtx10Uzt7Oy++Nu7qtHb6Gu8I=; b=yt4mkkvNn6R27ZfrPEaZt9E2aIZ2FOjEqpB+YcmMuV75etJ20WWD8NuPJb6Onx8Y0RPjp6 FVC96vzHX2q8D2sGHDrOCYKAZ8gUbHpgegPaBI2cm3CthH+ZeJ/glJR3kFIyGnkVv13Nbl RTOMC2GF13oZLQY4x31jGCZnYydRxGE= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MZyguyW1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=mqs1SxSi; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf22.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394409; a=rsa-sha256; cv=pass; b=M65Jg38X/kAjvKNXFXPadWfBk6LFTXC070+dafKDEieVu+bnin77YG3kYmPeABbgHugtlV fDFVUenOBuN/1CviDHU7HLi+rh8cHrNyePdfVQvvWonSxCL13DVQxCbvBKuEZMpHsS3Z9e Y5bfN9ftYjx9VjcGwTt89eCMOGTb7Tw= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJP6T004600; Tue, 7 Nov 2023 21:59:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=2ZY6L9oPxrPlWmZKgAmtx10Uzt7Oy++Nu7qtHb6Gu8I=; b=MZyguyW13tBDpL6bIvbuyHhlHOQMNOu4SA6O2pyfSrXZLk8wqlafyb/64NbsAwxEacbJ KEhZqa7ZxwwGagNDD4kxy9luiTbfjsAxjlqxSoIZWBrTsq+8mo0HUjVyNHhg9Tw4ZnMp 1B0L0PsSVbjfwaTvCe2Beoz94o5PGgkU30sOu0dInBWvN4AoJ/1BniHQsE1qpmrSkl1N S/POgciMCDithDUSH1RTp38nOtOLpBFSfcCq4eU2RYq8HV1JcdD7/FTdow7lglEd0zYm qvigtTeqS2yRoz5SR4inU5NH+UWj1OIK1imH8Wf5MIzRXjGcb/FZtT1R4VriMN48itFv ZQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2dd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:48 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LItTo003981; Tue, 7 Nov 2023 21:59:48 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsk1r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aiCEtZShEs0MffEv60cSkjoU5RjbfRq17TVizyEw+z0pIrG9wxJhlXvW/ctHRJRfJclpbE7ZogJuwOnZMleLyj8OUUzGxeaCItRLs4vzDjG/FwiuFUldbAO/4Wd7rbKvb1dB0f0oTy4zYqAdWFegiQF2U6awiZGgqGEubh1mOqDoydPVl63LKuYV/QDx1vDMWybryO3H+r78eJ5pLCRiPvXtxKK2Z5FXrTtqnkZvgQT3Vo2jOwACvrU60vvA1vnYow166xsdZGP2U4Dek5NlkBeph5YcHRjibZ9Al7nilntSBKOaGYaCQ0fsxMAMYtma9z3jpH9156y479yZEqGLvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2ZY6L9oPxrPlWmZKgAmtx10Uzt7Oy++Nu7qtHb6Gu8I=; b=i6208VcHZN27A9JrVA+f+50gvE65HcrO6pvICsgr102D+tYrISfzsdukC7rmmM/DItqLV8eU7yeUJ1D6X9y8OyWG1KNcyUpQ+5U5CSjEeBmTW/pvz1Eccq30elgzXdkd/ChVg8pZCl2qVyMfVIyjFryVO7qd5w+NAJe/IPZti0aJOsEDVLsIlLhoUviY9VRcSk4efxzej+KyqtjibhSRdJmlxvMa9YeGPlD3jpg6MhgqM0sQptoLO50L+2rNhbb5wJBGQcd9EAQla3Z7X1UGISJizpARyxjz0E96CWj4AruPnmlKv89GIeAdKgOIUbalFhuKgZWGjOYC0yxTWr0qug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2ZY6L9oPxrPlWmZKgAmtx10Uzt7Oy++Nu7qtHb6Gu8I=; b=mqs1SxSiiXo7UEmFNDHiXZoLuwQoXiw/usW58F0aqUu/iiwEBXkVVGYMER3qAl5befiSnxEtbHKibsll7qvquuXIMe0Ce2iF31InKPbiNOxkOzX/rVq8CAI6VDwd7bNXtfbEeQ2MtKKhzyLyKPIagKRp+hSotv5+Bvgz+AnbWYk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:43 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:43 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 39/86] sched: handle lazy resched in set_nr_*_polling() Date: Tue, 7 Nov 2023 13:57:25 -0800 Message-Id: <20231107215742.363031-40-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0015.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::20) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: c09bc759-dae1-4d26-4eb9-08dbdfdcd929 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0Pj23+h+y26oGGWj302C9dY555Xj5Kf5fmfCodiWSLC8B4eseEc2pT3YmSRBh5SH7mcXJZ/2s5MEBs3PY/oDFLWq/w6viv+8GTjBRdm9EODO0hl4wGjIbACC7XG3lYwT5oGcS3j8MMXyF7xOqB3a6PTWTzhDfvH+NzyGzS5d07X+z3GMNo32onoMVLttKw2ZYCvTBHJFLIeNlTkpxQ7QMngo8IG9ZlNtcSLs2Sh990fG6oNnwrlibiTnyn4lKzUNg3cSun57fr4PceT14pfzBaoM2If+rzZ2U6e0PhuF+PaZY6vktbnte3pCEDQz8aZ/sP9a6AEi5/R5mZrezMN/MuWlvg5ZmYesNBWV93mFgqb/vrY7mBhrQPPG1qIJW43iOzqGKqkuDdGKhha+8SJ0iXhj/hrsxNEu2TbzO1tSfWmgVLR/SPJLXxbLbOKlmDMp6QA+HD0Zx4M8759PdEVQ+TQF3nnjYLzhlQW1ZhVIN22jQOzPE/n6tD81kszhjiFdVBC0o7Qxe2WlcnLlzizC5/AcbJg1+Xtk851FVbwFlSaXUQOQIEiM2r1YwaqlcRSu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: roaUkf2m3pmWVQD1uhEAO9QW9nskEFMyNZjEzObRKeTG4tm1XpJaSa9mSq12beUTfMoIIGHSErFzO0iOWEMlz+NXMGZM089QVme/aE2gN7GEdrP4yNoi24A2XkZH86P+ur3YaVLCCrqYR6PVshywvASV7lQOL3xbmKzCog+9JScmbCXcyc7QHwdl8Tz8TZjiatW8nqntb630JVT3m9KUtqTmk60Lo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edYNVtoxRPX89qYBGRMsNFVkUDx4mZrXGA+G8vacSFLXl93HgCxbRw2nV4YVss+yVFLt0Z2DhfxXlLGv3lo2VMBgpEIKIOFLcjDsKBTlA8GvNW1SlG/XhfM1gtYGvOahzJTQAztfz6qY+WFDriKru7WhEfjhiV/V1EHU41y6kA+z1QR/KPvRlgXS0SSIBGTz7KmFbGjb7Wr4W5KCKoUJ4GUCidS7mtwdEVU4ywtYXTJNEO33QYvMJ6rAkkiEI9euIUIEVQaYtZkjTV4v5RIRVUi+982/N/3gHi9uppHKPXBU0jnAHHaX8CGI/LUVpTw3/e7/WVJsOe8M/xyKCD91Bvlu/OXRfeAw2kTZSnWinbEs6Tg8SDePaGZ1jnkViBjBaXBFHg/6gSq15/9uSUzKzNcUJM2xoibIVCn4hwJm7uyj8ikR/PK68SWcExGeqJE3JwT+5k/tZG6B9RArakmJXoesjhVsjPSq7eua5fU7b+fN46BXHoslubr7Gx6gaNWlDCW3/1Px9n+gPHKoD1G7z/8SMZlg0RyZnol948hAyRPJyobRtWM6AnTx5O/Enq/S52/9YejtKjm3TzFvZvoP/f2x5fVZzOUJLko8K66cHRZDSUuBt/Fl94HZXjwbCQkQjGvpYMZnW3MYMnHcT9NtRna6azuyPbHhTT8xwqhUkdtgJw1lKgT8bdGmHFiV1JmWaM+Lis5mEhDKL54tJ0tcFwr+mEb/jfkrlansNwONK8Pdvbyo8YOjxlRU2wvd5gUZ8TSMDKJUu4Dtxkx4bdfQ6kvL29hPgu19U/nF4azRaKf1gABJsw7q9fCQ2aD9nvU6Zcw4ixFBD8pBKIjEMnaDeVNtclfifzMt/aXjdNsE9Mk+bFi5JmgvQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c09bc759-dae1-4d26-4eb9-08dbdfdcd929 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:43.3736 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +Z0uWXWVsnEgWk/5dwKtwF/8FTnjONOvtLioY+LuteWR4rFbgq+X7oBNNCPCuCoEqSxplGjE+KMPBIscNv/VF5u3TCPitdIQcSXblhpRhZ8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=878 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: sp2nYV2JAZuCrmu3aqRNJ9yTKinzfDI- X-Proofpoint-ORIG-GUID: sp2nYV2JAZuCrmu3aqRNJ9yTKinzfDI- X-Rspamd-Queue-Id: 46C87C0023 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ea5ahr43nq89omhsp696csweryeceo59 X-HE-Tag: 1699394409-692662 X-HE-Meta: U2FsdGVkX18Tsvaqp3gt7gQGLYHdm+b2PamkltahqkggDu5Q7aWd9z6MlU/HjXKeTOJ7dfyTFUIUSdNdS1iTNrFEDbjINMHfn60xN2DMyWq6B+GCNaaZZMb07XAHMVvz2LsOLcFNB33A40XgWcqPt8IahPqbyHPb2oHO+KepfHJedny4h3ATHQ08TsuHuNJTXcE85Uasp776XzijOfdsyR0kgeyPs8kw+fZENwv/1g03LDa0pnMDOzAwE+wZHmnYWwavNnlyimO88faWaKy/OP906oDl3UzB64IkibPDpt/f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vvFZ1NnVpvQBbfWR3ekWGeI5z6n8NoA3yMcK7bQNaYzTFr30anD027VA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: To trigger a reschedule on a target runqueue a few things need to happen first: 1. set_tsk_need_resched(target_rq->curr, RESCHED_eager) 2. ensure that the target CPU sees the need-resched bit 3. preempt_fold_need_resched() Most of this is done via some combination of: resched_curr(), set_nr_if_polling(), and set_nr_and_not_polling(). Update the last two to also handle TIF_NEED_RESCHED_LAZY. One thing to note is that TIF_NEED_RESCHED_LAZY has run to completion semantics, so unlike TIF_NEED_RESCHED, we don't need to ensure that the caller sees it, and of course there is no preempt folding. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- kernel/sched/core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e2215c417323..01df5ac2982c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -892,14 +892,15 @@ static inline void hrtick_rq_init(struct rq *rq) #if defined(CONFIG_SMP) && defined(TIF_POLLING_NRFLAG) /* - * Atomically set TIF_NEED_RESCHED and test for TIF_POLLING_NRFLAG, + * Atomically set TIF_NEED_RESCHED[_LAZY] and test for TIF_POLLING_NRFLAG, * this avoids any races wrt polling state changes and thereby avoids * spurious IPIs. */ -static inline bool set_nr_and_not_polling(struct task_struct *p) +static inline bool set_nr_and_not_polling(struct task_struct *p, resched_t rs) { struct thread_info *ti = task_thread_info(p); - return !(fetch_or(&ti->flags, _TIF_NEED_RESCHED) & _TIF_POLLING_NRFLAG); + + return !(fetch_or(&ti->flags, _tif_resched(rs)) & _TIF_POLLING_NRFLAG); } /* @@ -916,7 +917,7 @@ static bool set_nr_if_polling(struct task_struct *p) for (;;) { if (!(val & _TIF_POLLING_NRFLAG)) return false; - if (val & _TIF_NEED_RESCHED) + if (val & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) return true; if (try_cmpxchg(&ti->flags, &val, val | _TIF_NEED_RESCHED)) break; @@ -925,9 +926,9 @@ static bool set_nr_if_polling(struct task_struct *p) } #else -static inline bool set_nr_and_not_polling(struct task_struct *p) +static inline bool set_nr_and_not_polling(struct task_struct *p, resched_t rs) { - set_tsk_need_resched(p, RESCHED_eager); + set_tsk_need_resched(p, rs); return true; } @@ -1050,7 +1051,7 @@ void resched_curr(struct rq *rq) return; } - if (set_nr_and_not_polling(curr)) + if (set_nr_and_not_polling(curr, RESCHED_eager)) smp_send_reschedule(cpu); else trace_sched_wake_idle_without_ipi(cpu); @@ -1126,7 +1127,7 @@ static void wake_up_idle_cpu(int cpu) if (cpu == smp_processor_id()) return; - if (set_nr_and_not_polling(rq->idle)) + if (set_nr_and_not_polling(rq->idle, RESCHED_eager)) smp_send_reschedule(cpu); else trace_sched_wake_idle_without_ipi(cpu); From patchwork Tue Nov 7 21:57:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1334CC4167D for ; Tue, 7 Nov 2023 22:00:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4BBC8D0081; Tue, 7 Nov 2023 17:00:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DFD5D8D007C; Tue, 7 Nov 2023 17:00:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6F108D0081; Tue, 7 Nov 2023 17:00:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 99AA58D007C for ; Tue, 7 Nov 2023 17:00:16 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 7699D120B61 for ; Tue, 7 Nov 2023 22:00:16 +0000 (UTC) X-FDA: 81432527232.27.314E89D Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf13.hostedemail.com (Postfix) with ESMTP id 0DA9F2002F for ; Tue, 7 Nov 2023 22:00:12 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=0L6ZVOAP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pDoPnA3a; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394413; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AgHZ1N5EhoaLrXsY9vyuGAOSm3SPTfgdloTSSlmu3F8=; b=fmTsaqTEz5+Zx1al7h+s1YSpEJvXI4g/sapr7lzGJk+cqhDapU+sRfT/HYTzsyd48WfwLh ZilkH4XNNJe7rcsFbK74XphIHPStCWev6/OQRmAT+n6PcjDGSmUMIfNzJsaMvw8WtTmYvf GI4mOb4c3xp7MlfIlCKkNjrBGSjKrWs= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=0L6ZVOAP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pDoPnA3a; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394413; a=rsa-sha256; cv=pass; b=uvlFcWp7GlpOe1/ESWBWDC94F3ZBpoQNNoqK0xnFGyXk8P6zr9TuEGrqvM39dGCWUFkWq4 z9UXveMLfrYzxfXm6D4g8kl1h8VgFtoXy2rouAWi1WQNHRUrSAcsp7bjzdll0S+1MhBFCD S5l+tyu5g30/FJSOc3NC2TVZy0W/kac= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJcBH005442; Tue, 7 Nov 2023 21:59:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=AgHZ1N5EhoaLrXsY9vyuGAOSm3SPTfgdloTSSlmu3F8=; b=0L6ZVOAPUA1CGBIZaRIgMxgX6K7W36eeGNpQAdC8VsmwvVuoVk9XzScRg5r6OX7ndRYs UKKe0M/SOetznVjvoLkqWDnk3+LbKTM4dSkbvtqtc25hrqcVfagWETRNK2QbUFybe+ma +EaUtaGYTkRc1j20cnUWowfhGDwLVstCmfXYJroXt3FUOk30hPhJ1SVPPdKE6sHH/Tf4 JuViJdm/MFf67TS8i8zkNvoXal/s4camLXBlve+VVklgwCkfsFJdAN/sgQ2j3WcFCemh XAxkOjQKDENg48gdS1r5SsVD8HDyTLoF7hvH0XMv7AMlZhm+EbQMKFJZaW33xqKKW2bF 2w== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:51 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIhoV011115; Tue, 7 Nov 2023 21:59:50 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2041.outbound.protection.outlook.com [104.47.51.41]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsjqt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HPMtOzEH9FlKHAvYi2sYd9jmnVEwIySaMAhiUhoNPqSn7FYDkPWjHzj0hHvdn/iSVoPwWdW2EfVBwxiEtJEsCSQhlv2ZY6aDcBwt7RM3z23nLspk8pbGWvf7hvMcCsT6BMO/EIBoPl+e4nN3O5r2tnItSOzTpT7ziRO0cXt1fgnF6u8KMXE9oo9ip1SNF0cibVjllmqaMG2RgTY2p+MmKy+ENxgN5CCjSi7aDy78PzU+SEXH6Y1/GECb8+v+5zS8zj6nKSQS2MBopogui+myO51LxKsRhCyNmms5aqF7lhSbCFxoYwGPYV9GkUAYM9L7uYRPcwoNGFsTUi4lmGtw3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=AgHZ1N5EhoaLrXsY9vyuGAOSm3SPTfgdloTSSlmu3F8=; b=Jz1ajQzbnqj0QN1XSpZSUpAOUWc67RXdxLZsrEFOuhDpaHORrPqlr3L4QuLi45MkUxTw0hfN6z6xou5EQ2XYN1mGZjkUMOkLfCMpKsZa6kUWA+xyishOQtCxdS6g6w99s0IXQcUZfVs3eVx0PQu0y+YhdIO1caeHZqkTEEymhE281WBn5K9ppSzQvVxT3/DmbNBjjzP26iG5fL8Mh21ZF0V06npH1ShC0cMXOmsWAJXX4QWnQJmrKmSrKHic1Z+gLhtuytvZtX/mNTYcqZ9YzHNm1oSxQXjw8fvKDLvU1uwd5NO66CpSxOwk6y3o7oGNkkq2lwGp3X9FaKrvePjkYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AgHZ1N5EhoaLrXsY9vyuGAOSm3SPTfgdloTSSlmu3F8=; b=pDoPnA3ahKme8JyxjMLRIWJ1UHPhEU/SCZ4heli+SmRgjgR3GhDoOpP97ceO3JpdN4pnDSycPXlq8mMnFCEiGXdDWzun/+PWz4/MJ5IOdLUExNeADHIhKfTOV6eS452GY5p2UsETPfahX+CseySN4BYuWzBOaz/g8zLVGbBQEdU= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 21:59:45 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:45 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 40/86] context_tracking: add ct_state_cpu() Date: Tue, 7 Nov 2023 13:57:26 -0800 Message-Id: <20231107215742.363031-41-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR2101CA0029.namprd21.prod.outlook.com (2603:10b6:302:1::42) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: fab9a692-4dc4-4d1e-a9b3-08dbdfdcda42 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9A2Lt71wnSewrbONGEzXnrH9IBszBCDkaIP+/jDZvqDNXk7Bd6RDt8U3J+ZR0Qcmj0iIDMxMOWFvWVcMiaSvJoPZBwXSrIrqSYyFEQprv3Jwn+KAzFz3ouX69hs7poyQVPlfzSW9HHw8jTB/t0UTx+Y+tgHRb3q+Qtrvy29f03498UuqkaPjtR3FLilcc3mlcX04Nywqg/GE3l2H9P7q3/hwPcpAgbft+i9Rmo+v+6tVswL0wsm0VYUfQY7B4o5e/tmK5P1Y21Il5jlLZ8cLNwyxo3T5zT7gtljCbrMVLHBqojy7QlPunx8n9itALomxNKxM7kbKa21Q/qZP74TQR4OS0Xgw9nY9uOYHJYTrzlyZbVV8Ma993PSYkTkD3ZBfjppKM6iDOQTk1bUrvLVd9adr7XE+ZK7KKzIitePQCiQshWF7kGX9z26TJjfjQcerk17qekzjYI/SV4DYFcptV2d9LSLJiwQv16wSFJyVrf4i8w/tbkpNvyQ/kfDb+RZnAQeVIwnVwEJkegz4Z2lNeZqDYcXFQqQTCN41hrKtr5YmnWjtJ0WOrVaveIvL2ZNh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8QYL0eyIYiJCl3uryXvFYLVnQgnDz5nre3gMZjm4U2nHzQa6oj7lq72cbQ9OcvScIpvXOw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-CrossTenant-Network-Message-Id: fab9a692-4dc4-4d1e-a9b3-08dbdfdcda42 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:45.2262 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gRlvqYNHhxZZhopXRsBAK7q1WhyBNhX2/9bQAL8Sf0N2Rs7ettAdm8eDriu5dQaj2yez0YgvnFa6iXfi604XDM6iZnKoAzUErINtiCT5CA8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: skFKXPrKzw3I8UaaOrnk6NVYwCSuronb X-Proofpoint-ORIG-GUID: skFKXPrKzw3I8UaaOrnk6NVYwCSuronb X-Rspam-User: X-Stat-Signature: anphpom87ib6xyng7g9qpqfon9a5uukg X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0DA9F2002F X-HE-Tag: 1699394412-764439 X-HE-Meta: U2FsdGVkX1+wuNIllHeshqNlH8bPZ0AVC+cZrZvMamApuWj6Wr+c69Hq4I67uJSaZWAaUYpMSHCj+uSVDXiOUpvACN4UqeQWQfHIYGcE2X+k1heDBmku8/Ts8bvqR3uWGMmEv4if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HhZwOEOgUTnd3mx8Az39aAjdAg/uc5NkuxRVvRnUmdTGFVjJUdHLZGZzhXKTdHgezNeZAaXpe77nc+QYiakFoTp1nonPzv4c9zmhOoJKO7QqcmCwxQ+nf2JyEFSOI4ANuWMYWy+zxzo0LClxrHn0hndEnSmW5YMESeGT7mOqU0iKIRcxdrqZfP7NHuv1Q9Y1z1ZIyC3FDUDMR2Je3RUvhfhD+0VLEmAH23OYdH7KOJnGQk59wCz6sOp3+OBqxHnBo8c1MA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: While making up its mind about whether to reschedule a target runqueue eagerly or lazily, resched_curr() needs to know if the target is executing in the kernel or in userspace. Add ct_state_cpu(). Signed-off-by: Ankur Arora --- Using context-tracking for this seems like overkill. Is there a better way to achieve this? One problem with depending on user_enter() is that it happens much too late for our purposes. From the scheduler's point-of-view the exit state has effectively transitioned once the task exits the exit_to_user_loop() so we will see stale state while the task is done with exit_to_user_loop() but has not yet executed user_enter(). --- include/linux/context_tracking_state.h | 21 +++++++++++++++++++++ kernel/Kconfig.preempt | 1 + 2 files changed, 22 insertions(+) diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index bbff5f7f8803..6a8f1c7ba105 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -53,6 +53,13 @@ static __always_inline int __ct_state(void) { return raw_atomic_read(this_cpu_ptr(&context_tracking.state)) & CT_STATE_MASK; } + +static __always_inline int __ct_state_cpu(int cpu) +{ + struct context_tracking *ct = per_cpu_ptr(&context_tracking, cpu); + + return atomic_read(&ct->state) & CT_STATE_MASK; +} #endif #ifdef CONFIG_CONTEXT_TRACKING_IDLE @@ -139,6 +146,20 @@ static __always_inline int ct_state(void) return ret; } +static __always_inline int ct_state_cpu(int cpu) +{ + int ret; + + if (!context_tracking_enabled_cpu(cpu)) + return CONTEXT_DISABLED; + + preempt_disable(); + ret = __ct_state_cpu(cpu); + preempt_enable(); + + return ret; +} + #else static __always_inline bool context_tracking_enabled(void) { return false; } static __always_inline bool context_tracking_enabled_cpu(int cpu) { return false; } diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index 715e7aebb9d8..aa87b5cd3ecc 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -80,6 +80,7 @@ config PREEMPT_COUNT config PREEMPTION bool select PREEMPT_COUNT + select CONTEXT_TRACKING_USER config SCHED_CORE bool "Core Scheduling for SMT" From patchwork Tue Nov 7 21:57:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449402 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41DF8C4167B for ; Tue, 7 Nov 2023 22:00:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39FC78D0080; Tue, 7 Nov 2023 17:00:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 34BB48D007C; Tue, 7 Nov 2023 17:00:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08B228D0080; Tue, 7 Nov 2023 17:00:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E1C988D007C for ; Tue, 7 Nov 2023 17:00:13 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id BE118C0BB7 for ; Tue, 7 Nov 2023 22:00:13 +0000 (UTC) X-FDA: 81432527106.12.FF7C72F Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf27.hostedemail.com (Postfix) with ESMTP id 6DAD540023 for ; Tue, 7 Nov 2023 22:00:10 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=uBCx9poG; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=b4B0rJqd; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf27.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394410; a=rsa-sha256; cv=pass; b=FdWnTWIl9yRQ+jgbWioJRYVU5e25XBRjQwIbkz3pikPF/67v8K6grXgpRZEifyrKXU6t1y rQGV2IspaZB+GivBeH4isNugsmubNh3rPHXPPJFrUbNHW1Vt2NODkK72pBWzz4Al3JqvX8 Dx1ujfjPAKWSXo2+Oz7p84eqxyUg44w= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=uBCx9poG; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=b4B0rJqd; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf27.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394410; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PzHw82oEkjWSM8GhCZuzoOhLZoIhhNSDnnxsu9vLv6o=; b=qGAFBXqxlkQfi1P/Q1HuiidSoUmSg4VTfJo1A4UEf9P5eRWdTjvGxqZAzfggSute4FkHxI uYheIaPawSI9/j+QI1U1GhXWxvMscoyiOIaB+ESEWZRGBCNCVvjpq9jyDvSVeLVBwv2HlK XA9ll8QuNfVvWT6gFWm/c03DZTPqD6g= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK255022959; Tue, 7 Nov 2023 21:59:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=PzHw82oEkjWSM8GhCZuzoOhLZoIhhNSDnnxsu9vLv6o=; b=uBCx9poGHhF6SKD85mK2kEM6et/jSfcOa3dKkyUXNA973zwpyxa2DStX3OsqFOfezFVr 6GTMZLJiYw32yEfAVMrWIvSPv9lqeYV5uRhCXP8DQ07QkHCTMvvtGG7fzhVgrg7dtVLj mEaroCcdMmEb6LofBQpHBn0HVR6UwItRhz4uNNmhOg66+jzKA6g8D6tRtltjBS6r+A9m av/itYG8dPz5xTu/hcOtL6tT36Q377ewvWA2XR4StFkGmkaq/aon7WTEydcFzVkEwsr5 fq2nOZGLMdS2M8ZpDsZUuWroLAg+cLku5MnMzZ/coCx1oGrAQcLqzuHjub5+ieCTY6z5 qA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2002j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:51 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIwbU000509; Tue, 7 Nov 2023 21:59:50 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2040.outbound.protection.outlook.com [104.47.73.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsmf2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCpYolXEfBN14K5cCahkwXkpgCCx1cgjaDT82wofFyJx9ueUKemzbapGqPj20AziBzFelfEEdRpPL93vSpsuQ317h93gw60sw1Bqc5L51VcoBvtcmX59WbH1U6ERIeYtKeRddpuPXMPrV3cmiDF5/5SO+JeIx5G6arDjakJSTyqLPr4j+vOferA58cSPWSi2HL+3eChoG/25a1z1vGJRv4oe9n/19bpEuBXQzfee4hbIaw7MvGlouNosh4J5gTfEaCpu641+f9mwdsX9CSEcyE5mCn5AUwKFHpEzK9HDJGMWB89k//WwIYLELhRTQ3dALPQ2TZjaaTgDmNkrpgreaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=PzHw82oEkjWSM8GhCZuzoOhLZoIhhNSDnnxsu9vLv6o=; b=ntFrAitrybSGSqNBUewhVP1XuOn/FOrw8lonGpni6OgSGSx2bbQ9ctrUP4x5AZwlGjwWgxkAfXE6sgvaMBr61nTJ0aznT4a9NKhy2L2r03rF15CRt1OeX8cUQ0r3Qdqfplt+qnnd1Raab1vIJKrSyV2eLB56ltOPej9xaG/lCFOaxHtjOXuTPCVKmHrcqmo18te3vpzCXjv8uX9d5pGJaOhYfyzYAe3E6Zv5HI6L28S3xHZvLLI0Ose75POV0AiL0hHDhgv/gP5W2FkqR4QgkLr6pMn6JUTgpJvsrlAEjZq0aJt1pSugPfrWE7EZdigIP+ttoHxcQuMb53EZKVtkZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PzHw82oEkjWSM8GhCZuzoOhLZoIhhNSDnnxsu9vLv6o=; b=b4B0rJqdH7d+pBBB2J3g4rH7ux+22YzLFcyzjWhpL8AgjJrVxVrQDmZeQsZ1+0rpTqF19wNTYFPRMWofImzcKpYf4qv0ImZkP5NpSO6/eY2I9Zi4rfa3D/NdtWa01adi+HdfxlyETn5hSJtjeqMo4DqfR1dNvNCTzKsoyzAEJ5g= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:47 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:47 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 41/86] sched: handle resched policy in resched_curr() Date: Tue, 7 Nov 2023 13:57:27 -0800 Message-Id: <20231107215742.363031-42-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0309.namprd04.prod.outlook.com (2603:10b6:303:82::14) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 57b602de-ef27-49fa-2b7e-08dbdfdcdb63 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: alIjP+A/j3H7tkRjSsPJGNRMv35Dais9mxh2/ds8jKdXpZu4z1ZMd8Xftr/zgNcEY+4u5cGOA2nGoRsztzXZAz8z71RT93d5SA6W+t+32IoeK70nTIpLZxW+G3bFRMcJbJXf6wygrxxG45Z0QBDj1nYLhaNtH/dnNVZgaPGXBBwSjNREkpSsynO5u2jRxAU+VwiX++1ztHXBBXS2xGNkaFnBPzv1zEAlrB624YUMqhy8Wj7Gl0U+s6dIVFVCrlN+bH/cFREFdI5hmEin6RPxw3xNLUORhkhwWXJo1S7IXZri1mtAQ/aPmI0Snu9+gGB1n+cOKpGSqXAzV9Jogfq9gnkxnfK2mJvzd/ZIqHaMeKYgiokWlC01JnsEmgN0IB+mkK7XUYYxs2IhUbt6VPHQOzZyyceYVyb9cuJISBltPZB8K6dA5cCtZc3OSibfAPk4boEMsoL+xG7UfpzfTb5pR7xQ+9ERGejW8cDaKTbIg4F7S4u/3aXFtoQpbyTkcXn0GjmggYU03Sak16pHGpssEneJrSOeoEHpUMXtOjFmQIZQKEG1tVkoi1Qh93bPCD5t X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JoCkS36sxHBJKGvP0/REZrZv+iEt7Zhq/XXRQDpM4sxubzqe4PA/624H1lRFhcCuMG4yNrq8VncbHqQzna4PqYzrbwUL4i2jxInUP57H19Z5ccbysDpJzIPo0gDlJ4VDRWtlfnqQVlvIq/FOhSq924KtHiOUNQq+quTT/LMik4B7JE9T45IoDTOU/wdp6VwWLP1ObBw9SK9tM2KRYmHu3ydrelqz5gOxrk2JQ8BxWlYL8hFC9gq50f9/obXLq3NeYZ7AocP0lb35TSm/l1U1jKbmH+Ir0xG/kkGAxwUKQW8X5XjxIhNOBRoot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mqGhHItEDcr5/YU+3LLBGVYcUwoWr5QJ2g+eR//kgOUWstSSWVCxuSoVswqAHUQYly92iD6DjVtQ3S6BPwt3iwrwnYm8ooL/XbC9VPTYZGPbZBE638SvL+HxILerndjVXo28Be99GLFia5DiPcXr2hDvmrzk8FJkGF9cneuivIWztMMTBnZkxqQm1rAAxqEzjxxI/VWaVu3fVL3f2dc1mMqwKy3x5zAkoZPpLWUDTRV07INoQLpaJGAUNwef+pgIkUYB2yaHeZQ2GC7GeZuTxlGUa1YZp6/7LbCAtZv4CQZE0AISSamG1fdScHeE2L6MU8ez95DkBqjMBGq87FbAyjYIWVNwbJu7mZsT8GJNFTheCpV+rjHdsd5xJUZKWqOALgdo0LpnklKf0QTaQcYwSygB3t6m1t5J7TK3iJmAVnLt9E0jof+r/gn0smsg2DNQ0wVhv8bMT+VVSciOZPa4CRGl6cakbHgJWsEcFM2kmQtcgYXK5tE+6gUWp+xtWS614GAyxKJuvvJbNKahb5th4VsdH7lTkbIkm86bL3F+AnTyqkizk+Dll3x7CTmOW3E0jWe8ZtpU0Xb8QD52TaOKm6zy0De6totr4QVRjEWLCEW282FX3fnQwGlmIn1AXfFBXDJ9k6po+XHLZgSMYjnKS3z3vl6OGKlWXQli9/DEfMkfcRRtZcO15zMHbKJZWUc/TtaEmLv/GfNKWoJRegs0JUf3WtoExfM6G4amR4EHTfFNh8k1/y4vE40d0U3S8w3FeB5+H1qxjOg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57b602de-ef27-49fa-2b7e-08dbdfdcdb63 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:47.0886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aDr67krRKVBku9HxJswQeqUG9JcfPw2W41N+nH7XPFECnvEAT7jpv4jOccccYTzYiKfgariUK3j7ONCDXBqu5JahFqKWFz+mcUFzKMIZ7bI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: tHGkLVpKjcEGtNJ_4RGk7iDp9yAfm-CU X-Proofpoint-GUID: tHGkLVpKjcEGtNJ_4RGk7iDp9yAfm-CU X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 6DAD540023 X-Stat-Signature: o3y7iggdufyjxg817f5ffoqfp1gtcz9x X-HE-Tag: 1699394410-440796 X-HE-Meta: U2FsdGVkX19sKKEwmdR3tXhanq3wPjXrXNRxaj6QYkbVAiPNZIW2oVgwh7djT8/jPegE7nt7DwZjqEYaoar21VRgIMw8t6HM7LCj65sbg9FcEdWssNkp9T9qmie1iVjq882bGaUmz4G9URw9i0YE8Dxvo9zQosJk4/ESaPO7s5KfPFlmyQfOo9fBC/ocNWN9zmFclvMxDGs4Cl7b6DWmUz3e2eRp5z8ogmpTW/8bmDBvYt5lMMFPB+OgZwH8Kp4MsxZZCS0Tr1BlhSDQg8R/gHeU+ivynim/NO8isdtiz2lDm9qZctxpWyzrDAJITM75wttzL3TLwGmt8X5O+HZginOnSeyO0sTYhvnfDEnYwLJ/7P4IsFYIdXN301DuPLUz1sz+fKwjb4tgxfGWKxtv/9NxH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spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: One of the last ports of call before rescheduling is triggered is resched_curr(). It's task is to set TIF_NEED_RESCHED and, if running locally, either fold it in the preempt_count, or send a resched-IPI so the target CPU folds it in. To handle TIF_NEED_RESCHED_LAZY -- since the reschedule is not imminent -- it only needs to set the appropriate bit. Move all of underlying mechanism in __resched_curr(). And, define resched_curr() which handles the policy on when we want to set which need-resched variant. For now the approach is to run to completion (TIF_NEED_RESCHED_LAZY) with the following exceptions where we always want to reschedule at the next preemptible point (TIF_NEED_RESCHED): - idle: if we are polling in idle, then set_nr_if_polling() will do the right thing. When not polling, we force TIF_NEED_RESCHED and send a resched-IPI if needed. - the target CPU is in userspace: run to completion semantics are only for kernel tasks - running under the full preemption model Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- kernel/sched/core.c | 80 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 70 insertions(+), 10 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 01df5ac2982c..f65bf3ce0e9d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1027,13 +1027,13 @@ void wake_up_q(struct wake_q_head *head) } /* - * resched_curr - mark rq's current task 'to be rescheduled now'. + * __resched_curr - mark rq's current task 'to be rescheduled'. * - * On UP this means the setting of the need_resched flag, on SMP it - * might also involve a cross-CPU call to trigger the scheduler on - * the target CPU. + * On UP this means the setting of the need_resched flag, on SMP, for + * eager resched it might also involve a cross-CPU call to trigger + * the scheduler on the target CPU. */ -void resched_curr(struct rq *rq) +void __resched_curr(struct rq *rq, resched_t rs) { struct task_struct *curr = rq->curr; int cpu; @@ -1046,17 +1046,77 @@ void resched_curr(struct rq *rq) cpu = cpu_of(rq); if (cpu == smp_processor_id()) { - set_tsk_need_resched(curr, RESCHED_eager); - set_preempt_need_resched(); + set_tsk_need_resched(curr, rs); + if (rs == RESCHED_eager) + set_preempt_need_resched(); return; } - if (set_nr_and_not_polling(curr, RESCHED_eager)) - smp_send_reschedule(cpu); - else + if (set_nr_and_not_polling(curr, rs)) { + if (rs == RESCHED_eager) + smp_send_reschedule(cpu); + } else if (rs == RESCHED_eager) trace_sched_wake_idle_without_ipi(cpu); } +/* + * resched_curr - mark rq's current task 'to be rescheduled' eagerly + * or lazily according to the current policy. + * + * Always schedule eagerly, if: + * + * - running under full preemption + * + * - idle: when not polling (or if we don't have TIF_POLLING_NRFLAG) + * force TIF_NEED_RESCHED to be set and send a resched IPI. + * (the polling case has already set TIF_NEED_RESCHED via + * set_nr_if_polling()). + * + * - in userspace: run to completion semantics are only for kernel tasks + * + * Otherwise (regardless of priority), run to completion. + */ +void resched_curr(struct rq *rq) +{ + resched_t rs = RESCHED_lazy; + int context; + + if (IS_ENABLED(CONFIG_PREEMPT) || + (rq->curr->sched_class == &idle_sched_class)) { + rs = RESCHED_eager; + goto resched; + } + + /* + * We might race with the target CPU while checking its ct_state: + * + * 1. The task might have just entered the kernel, but has not yet + * called user_exit(). We will see stale state (CONTEXT_USER) and + * send an unnecessary resched-IPI. + * + * 2. The user task is through with exit_to_user_mode_loop() but has + * not yet called user_enter(). + * + * We'll see the thread's state as CONTEXT_KERNEL and will try to + * schedule it lazily. There's obviously nothing that will handle + * this need-resched bit until the thread enters the kernel next. + * + * The scheduler will still do tick accounting, but a potentially + * higher priority task waited to be scheduled for a user tick, + * instead of execution time in the kernel. + */ + context = ct_state_cpu(cpu_of(rq)); + if ((context == CONTEXT_USER) || + (context == CONTEXT_GUEST)) { + + rs = RESCHED_eager; + goto resched; + } + +resched: + __resched_curr(rq, rs); +} + void resched_cpu(int cpu) { struct rq *rq = cpu_rq(cpu); From patchwork Tue Nov 7 21:57:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DA81C41535 for ; Tue, 7 Nov 2023 22:00:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 920078D0083; Tue, 7 Nov 2023 17:00:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CE6F8D007C; Tue, 7 Nov 2023 17:00:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CD3F8D0083; Tue, 7 Nov 2023 17:00:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 50BE88D007C for ; Tue, 7 Nov 2023 17:00:24 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 16EDF80BBD for ; Tue, 7 Nov 2023 22:00:24 +0000 (UTC) X-FDA: 81432527568.21.711A0FE Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf25.hostedemail.com (Postfix) with ESMTP id 9B1FEA0017 for ; Tue, 7 Nov 2023 22:00:20 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=xxy9bm3b; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=x2D1OQLK; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf25.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394420; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/+dZ8EuRBjh9qZi0qxIr/G1BamPMT8CzHU5Xn7Q5MtY=; b=B6FjNE+y4B3ZtyPC9HDJNpmzR9aSAy4rTo8tSo1TbJbbw+AgSN1vyt5x+qZ6niJE05kdBY H5M8fn3l8GWraMwIHc+nRehlu60fA4vmLU7+IXZuyNL4CS1ePJNeXvpjU/9w1vAx+I21O8 Qv+fKgJ5Oal+yRRQriDsVMf/Hzc5W/U= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=xxy9bm3b; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=x2D1OQLK; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf25.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394420; a=rsa-sha256; cv=pass; b=WzmlI+RkaJC+AYIS2U1Qgp35/xRZQoa093kr9hCKsn3bwwA8RlgFLM7QP4ZDSue7Ey2mP4 Uzm7yzgZ8paI38Gvfpf3fgxdv8MSpYDDJd4UcXOSE30OaAUJzMGpqDrnjASoy4cRh8RuZg L/bDvaFHP7ntJUMU/7PeHy735x2ITuU= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJm5P004891; Tue, 7 Nov 2023 21:59:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=/+dZ8EuRBjh9qZi0qxIr/G1BamPMT8CzHU5Xn7Q5MtY=; b=xxy9bm3bPae98uIiuEgOPFdmick2K9epEUSy2IfO+oIeapJoNOOlYea1OaYybtJzlf/L cntkjige84LBMl50WrzgSnHf4V7CaLyEj86o6RuHAP6huhYnOHN1gsQY16jmKiVm/Dqb aBx6wFglyljLHfWD5w1pYEpOYZEfQuQnBK/Oq9oL4x+8Ux2eGXkK8Cwx32oFP9U6Akk2 94mxb8zi0Sj1ZDHAaUKaaFpiYV2/07RcH7b2uY6tNw6rqek1O+64SO9VJsse/Djlndx7 ED2na0k5840Dx8voArzx2YHlARnNbQZv5K/FPPq+JjHgfnENLHi88dwHzXITYfO1Ar+x 2g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g2ny-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:56 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIrZv000400; Tue, 7 Nov 2023 21:59:55 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wsmhr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DnFGpd49WR3VO8GuyYvuaoOgZKbP4TN3NCdyCtV3+HiBnraS51dzc4QDqAxllOFHVIOkP/+tJURUCqrteVBhkPPrh7+C1UaIbz9BB6Nu5va+MYB8WLPOTSylb3NmbToWr0N7wAo0FBa2UUYJp0pNZHbkpWatrlu+7vNwACT2OtQ3FsXB9bQ1JP+t2EvUa5RfqXrsyDnkXOd8EpGjnZKkW3v1O8wiXR/i9tnCTie/7XZVkMvyJX97jNsLusHoBWIGQLVWGjj1gPav8MqsJQpllaD/IakuzOOrue0mtEHfh7+D7F0fdV0UvRaQw5gJGKk3bQZ5W7yNl+VKXehygRhlZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=/+dZ8EuRBjh9qZi0qxIr/G1BamPMT8CzHU5Xn7Q5MtY=; b=KDJIAiJjW/CtF1J1pogj5ie50FN68W2Md10Jj9Lndt2gfLmZHScxWp8sJbwNCXj/O6xS/3YafeY8aXpVw/BYec8Zxlm60YehffvZjYcVON/lwQARhuyp5L4viYIKJBOiaUxZqG2yaFnwEYHIWL8mpOxl7Fuczk2pQdhBBQLaq7H8J7ihc9VI4K5FYg+fMpkdD4CAwYSJdi42FeikyewKfR5DsNPqosDOSpkI6Rfq+xWExEl9EBK/whkdnk9nvTg9Kja5wnfQ2QB70fcJFy6fqcdoLbncloeDnp5C4qV7uLJXqjMAvUMRXpSMVH61lLjrVW0jRu3gTYP5DXJ3t+DL2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/+dZ8EuRBjh9qZi0qxIr/G1BamPMT8CzHU5Xn7Q5MtY=; b=x2D1OQLKKcp/yErkFWrKUQDTefHoVy7JkcE+fWCk31KkF3NuDaioAjAJNd6ugEkM/QspfYlu2wlQUSbZYMTeZyFIUZSXPYBMzfCkO539MpKtqmVpYUOAkSLNKAMUJYN8Rzl2CKRz/1zJy4p+rk+EMrqgPs2LhWljjijv24BtNAw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:52 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:52 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 42/86] sched: force preemption on tick expiration Date: Tue, 7 Nov 2023 13:57:28 -0800 Message-Id: <20231107215742.363031-43-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0319.namprd04.prod.outlook.com (2603:10b6:303:82::24) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fcaccd5-26c3-45c4-c68b-08dbdfdcde7a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LiMEbrdjeRHw3hhaWr4bKN3mX6YK/ectIhKNtCfRc7c8BPu4QvjRhlQsbQ0HDzh28V8MLRcVCcMbBAVGmHtCl3N3pDEaUQVb9APF3omBYidfTIGWswlzBtNRTzlML+LxeU9n8WemwWsOMvU22ZjWszo5GWwCAKKTAYnNax/ZhmA7y/OWe3TVAPaGYB6mi87VQWLWZ9LEJtKodKAfxL3TbqlZolelmp+QO1+o0SL0JbFF/vh24UXqS68kxpQx+mCWiGD116Wc4UccquFjGQmXeSL8X9+9KrWOrMn7duSFzJapg82sylwJUf5Wqd1S1ExAmhyOFY/YzAhZGzIF/MRx5sdoIZPXNuAZhwxmoBCx4efSiIVpQkVfz4stMUU/1lnY5yWpaMs1wbK0yBPuJ0NnEb03dk7AU0CpNczsthgyqqNP1ohLcEUluSukarM8gt8zK/qTRJqFQ6aNsD4U/M6Ah8rGnVnhLW1QCu2DimlcG+YKi1Xl/S7rjKgMup2LGy6CtepYt4gOHuVburDLlFra9R3ZfrlsbG8ed4QUfBjQqXYkZkjqMhF968i8LohJAT4uTSTDhBCTSlBX1xjK15Yc558BhO7KtL3fuhH6x/ILTSM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: N7Zl9kzSy828eFXLNeTc4eYYSpi2VaGMj7V8D97WdmjqL2IruFNV0oTv5giIUdg1rb5RZnLVWe5C3NAthhI3wFVOvbcXdxhKaEun/pIU0DcqUybPK9G30BbE2sclPWtklurTDyBVWlpPx1a567C0S2saUZNEjkCiisLlxDLzMgfmg+2z7eYXnqYm+Uu9K82VNwM7e9q+9Ttx5zZO/z2ugNKtvD009b+OxpJpdqAf8KsCgoLC78UualXoG2oM9Foz9ojxK6UcZ8pbf7JVo2YioZ79m8VUQPSIqU9gqqcpQr86K0sHS0OfdQ92bZ6sP2h1j86JPvfS6cNVP7YiOnEHe64nNNfQvPTfSjtgK5A9a8jfXxP8+JBSh/tVrC83YuRIYfBJT/B0QGCz5qac/oL3Bw9MMVau/DXWtBjv7/jOTF5VPlalShphA+EImwozxYsiD4jvwiQWe5b9TuqpanUAwra7M2zTV5fRot3e2z5bsHX8Cu18w8V+jPD3sIgB3HttQJKgcZQVwowuSoQGoBnkz28TD6MNviJL8MEl/9GClmhnfcBKQO8tFTtk5P6uJ6/AcVGfuZ478TuX9/zxMhJqEwEA2dgeTL81SE1PwgQyeZI1DLdF6lwCO1bKZxNRBXjxb7jPKtlNaaC4DQPlZ88hB4ZSRfPt0IRqO35d8zBu/rpqFg+Vundxw6Jjgm3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AqMKbkodhk7X+tK770i6b3ZWUAdeUgfTjl6gfV0lVzj2p9vlUPtBVw01paKrSKFwVLyGliRFeixYZtsSXKjEQx33u+RboZcfLW7spazaAPP9GXzlANfMb3nJb15LqbYC/nOmrp+M4ivB/YIgR7Xs2/d3BQD+HCEpyJFF16GOVyp9KyIMQTPW2mv6BrcNjxxZfqehkC4nYww0F9pScGDDXE7eOiUwYmYXJMHyAAZDeLQJYKxs/wis2crwrl2lcEoXZo8vduRrcX9H+RlSEtZ9Bm49zBAil5f2DM/12AFJSOx3pm8fajWsXxcgC9apmdz0PVvgeHzyvA26aguFV0mehSZxiFz0MEoQEH0fCNnTjBrXffUl++09oeQB5nhY3f1B9f8PlviqVsy0g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fcaccd5-26c3-45c4-c68b-08dbdfdcde7a X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:52.2891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r/ZrSR6uUGKoFyolI5aXePsPzF0G93etPoO49IN//k3lpb34xxLrfyuzuHVHWNjIU9qaS/34aBeg1h1lwTfHVongnh4wEY2mnxdli6YW8T4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: v0Hwn4KELhgeHSddVmK2RFUVBvarqlJO X-Proofpoint-GUID: v0Hwn4KELhgeHSddVmK2RFUVBvarqlJO X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9B1FEA0017 X-Stat-Signature: o1ftf7zbjzycmhm9ki7kttf14ry9z85w X-HE-Tag: 1699394420-394732 X-HE-Meta: U2FsdGVkX1/AltfylFRpgAZ0GvpQq/41c87X/+ouazqm0jpNF9yA9dhgbsJKtWLi8qYSNLZzigrQKT6MqhBsnua664Tr6/EkkzliJUjzCfJi5KRhnkLMYKP5VgvSez/xMRZOg+V6PT+hQMlMAyXURXd5MNYV1HuBtgUu5T70pyQ92Nw78RCVxMkn5Pbkp77ff8srih8UPwSm4aJVOUljGd8udZilEbl6mUBpEYgKGs9C7SXsDMhgjYQfg+Q5UkHVOwoukDb7QnyXOVFFnn84Q87IzOFDVBBh2HXORoX5C8ByqaS2iO8AcvGGHBBPEMSbbZxtPyXaLHS3dIu1RYbFwI/0vzeUvSQzRvW/Ystz225fnKsJkdwQndn4vXPoWZ2CBgsr2R7n/VyANRBH98Ov6JBGcMXW/7kENrP4ypqD6mqn3GQrNJB9Y2xnoX+WRKFuViIanadF87VQc85zkdsPY/zA2E6MsSCHhANbYju/gCnyT8YWUTA2o84jFdUIhKxFMVoTuvzTIHF1eQb7T2Rn+y0UdOUqpCMSvLBjmOQ+0EQUZygG0z3dO0Blvxg29InPUJuXgAWs0CDmSS0kbmZ8dc4fCsP9RB4JYpdJLhOKLEF8ZsmdpGAKhYQeAm4ZzuGjXYnt0pLLd972QSiQshy/ymJzIFPl+YdotCTZMPewq9LN49b0G9sqpJYyIQskTTAOpdwUlurMv/tsVHnB3lUG4XeHfXzreHh6Lfcq//inyA9IIgQ/JKXaQ3x6Cw+YhhdylFJfQB5bBhdD0EQgPJ4RnJG1PIIFvJRJ7Ab0AN5dlVKKpED3lSCOeoFYMr8rGrYfXJsYhqOITL4ujbhqMHclUjatSsh8FDE597JJqAFCxJX97uRG27D9HM3menYbJGHk4UBquEKwbtbyh8kjmacCSX3aBm0NsWl5sZpVMQF2KuQ028cNK2tGyUaKmrrdwywuib/aSDp/vdB57V3b5gv gQ8ts50u /36igaxJ23/8FO4W924K452LTJw6yUp1Dhta0Lsduz7aW9NTOXoifKN22u5nswd/sDXOf0l+0ISvJJE8k7pkJpBj8qiln+w9Ao4pv3w/TT/zwVvFNlAvUCrJEITJzMQLNTkGqVnNEKk/XcB0IHkLJTeh+wNs0QtczcC7REhupUkNadFlvYQUz9XzAxgsxHESlppteusXqzG4QmFCj7QYtgTJzyZXLTWTccqGdasxly0D2S4XFQ5rV3ER27DbTeCvWKVWBXYCspdyVV8fEOC8IfdpTQIE6xUNbvc8hH2INNTtOA6awCYWnml2Pi4aSYtykPhmr63y91oHzthOSFdDzTvBe1p4eqAD7ctgQt9NP8a1FrEBxYxiaTgC3exVbivkG1FYSQ9nXNFMEXbHJdYtm0b7FOgpRIraAepFz X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The kernel can have long running tasks which don't pass through preemption points for prolonged periods and so will never see a scheduler's polite TIF_NEED_RESCHED_LAZY. Force a reschedule at the next tick by upgrading to TIF_NEED_RESCHED, which will get folded into the preempt_count and a reschedule at the next safe preemption point. TODO: deadline scheduler. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- kernel/sched/fair.c | 32 +++++++++++++++++++++++--------- kernel/sched/rt.c | 7 ++++++- kernel/sched/sched.h | 1 + 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4d86c618ffa2..fe7e5e9b2207 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1016,8 +1016,11 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se); * XXX: strictly: vd_i += N*r_i/w_i such that: vd_i > ve_i * this is probably good enough. */ -static void update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se) +static void update_deadline(struct cfs_rq *cfs_rq, + struct sched_entity *se, bool tick) { + struct rq *rq = rq_of(cfs_rq); + if ((s64)(se->vruntime - se->deadline) < 0) return; @@ -1033,13 +1036,19 @@ static void update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se) */ se->deadline = se->vruntime + calc_delta_fair(se->slice, se); + if (cfs_rq->nr_running < 2) + return; + /* - * The task has consumed its request, reschedule. + * The task has consumed its request, reschedule; eagerly + * if it ignored our last lazy reschedule. */ - if (cfs_rq->nr_running > 1) { - resched_curr(rq_of(cfs_rq)); - clear_buddies(cfs_rq, se); - } + if (tick && test_tsk_thread_flag(rq->curr, TIF_NEED_RESCHED_LAZY)) + __resched_curr(rq, RESCHED_eager); + else + resched_curr(rq); + + clear_buddies(cfs_rq, se); } #include "pelt.h" @@ -1147,7 +1156,7 @@ static void update_tg_load_avg(struct cfs_rq *cfs_rq) /* * Update the current task's runtime statistics. */ -static void update_curr(struct cfs_rq *cfs_rq) +static void __update_curr(struct cfs_rq *cfs_rq, bool tick) { struct sched_entity *curr = cfs_rq->curr; u64 now = rq_clock_task(rq_of(cfs_rq)); @@ -1174,7 +1183,7 @@ static void update_curr(struct cfs_rq *cfs_rq) schedstat_add(cfs_rq->exec_clock, delta_exec); curr->vruntime += calc_delta_fair(delta_exec, curr); - update_deadline(cfs_rq, curr); + update_deadline(cfs_rq, curr, tick); update_min_vruntime(cfs_rq); if (entity_is_task(curr)) { @@ -1188,6 +1197,11 @@ static void update_curr(struct cfs_rq *cfs_rq) account_cfs_rq_runtime(cfs_rq, delta_exec); } +static void update_curr(struct cfs_rq *cfs_rq) +{ + __update_curr(cfs_rq, false); +} + static void update_curr_fair(struct rq *rq) { update_curr(cfs_rq_of(&rq->curr->se)); @@ -5309,7 +5323,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) /* * Update run-time statistics of the 'current'. */ - update_curr(cfs_rq); + __update_curr(cfs_rq, true); /* * Ensure that runnable average is periodically updated. diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index a79ce6746dd0..5fdb93f1b87e 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -2664,7 +2664,12 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued) for_each_sched_rt_entity(rt_se) { if (rt_se->run_list.prev != rt_se->run_list.next) { requeue_task_rt(rq, p, 0); - resched_curr(rq); + + if (test_tsk_thread_flag(rq->curr, TIF_NEED_RESCHED_LAZY)) + __resched_curr(rq, RESCHED_eager); + else + resched_curr(rq); + return; } } diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 9e1329a4e890..e29a8897f573 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2434,6 +2434,7 @@ extern void init_sched_fair_class(void); extern void reweight_task(struct task_struct *p, int prio); +extern void __resched_curr(struct rq *rq, resched_t rs); extern void resched_curr(struct rq *rq); extern void resched_cpu(int cpu); From patchwork Tue Nov 7 21:57:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449404 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE8A6C4332F for ; Tue, 7 Nov 2023 22:00:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2CB58D0082; Tue, 7 Nov 2023 17:00:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B52F8D007C; Tue, 7 Nov 2023 17:00:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B8558D0082; Tue, 7 Nov 2023 17:00:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 618C08D007C for ; Tue, 7 Nov 2023 17:00:23 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 3BB9AA0B5D for ; Tue, 7 Nov 2023 22:00:23 +0000 (UTC) X-FDA: 81432527526.09.2FA3454 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 7F78B180003 for ; Tue, 7 Nov 2023 22:00:19 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=AwsiFAMD; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=prbTUcMA; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394419; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rR1rkZaAcUjbJhVUuuHUsBP4wRC0wqW6GVBbfHb15x8=; b=Rm4aNoWP7xISQbSWnGUugbLnIdtnu3fx/h4bDEitvYZSYP9P/SaIFvfZPZYPJfV2e4DLi/ VENsaerARIiYqUH+bLUFCLnTLxJ/7kSZG0jJSbhHQiSQtGsW+4uGqqnaiS/CZIxGAElQ1m TMeN4Hxa3vEHHoYl/FVnydYGkU7ypoE= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=AwsiFAMD; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=prbTUcMA; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394419; a=rsa-sha256; cv=pass; b=DzbeJxATbOQJSVg9fUlRcdb00C+VYpatEgHAY5RvGD0c8rCe/Mn0dJSniCyVdxux9UDYKI 7X/l3PRHqhYu5JX/GpfrI2uxHRXbYBKBZNECEWGKU+SA37ZvVcDDOJpvzM1VaVDXbcoGlj jx4LmWEoM10U0qM/czVKzi/4MGIHXDU= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpwG026315; Tue, 7 Nov 2023 21:59:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=rR1rkZaAcUjbJhVUuuHUsBP4wRC0wqW6GVBbfHb15x8=; b=AwsiFAMDdloUNUPeyvfyMO+aMi0EkQXiEasxSzq735RWh0hj65kJw3RdfSFOhYfKeDcI NZCBfHXLWBs9BRKzhpHfZPxM2uURobrmETAhR947ypcB/+DDyJt5zF7RMZIB7pZhwph/ j/+hAQYbqel40grJYu+pTi4kd3lNjDNIFoqXYkAagofRMbLAzD6T/i4Vm7k1SxK5wsSD 0CuCCFyEg+Z/9xb/ftlJ7yBu8dI6k6rCxewAVwd+0GILv2y5S/aa/4MlD+OgTGnlckb6 FDKrhRN2fhL3f1rGd0FA413vuVsAcLoyhNW2oVYKvigyAYb1bo+4FKN0xvJZVVYr5V/x eA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2102q0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:57 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJOlK023824; Tue, 7 Nov 2023 21:59:57 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2040.outbound.protection.outlook.com [104.47.73.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241gvt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 21:59:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KgOJ/mz5lOcv+9EY5ImUX1gsmXMkKYy+S/FeJA2HWTa/nGgj4KDo1dxEFP+uZpJKIquP318avQvTvXP9NRvFD9rVKsEFKL4VRVm9tnacW7XXsuNauwA1nfzR3+kv6nQLdOnBamoTQzzkx4ksDz3fH7nj3ik2XebLpjRzu2DSM01iBnvNDJpfxRpH1qXJH3dsb3w7oL0Qj+vx95E4E1ARckuLjdGy2xOYyfkaDuTgRTGIyT5kJAjt8ygsm+4StarTS/oMXq7ulJk6gKFHq9kz4sFKKUoM8Ucigz8vMVSPhq5MqOh0IQQ1evYrbNbs4oqt7/Eg32YNQaG8zD6pY/czug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=rR1rkZaAcUjbJhVUuuHUsBP4wRC0wqW6GVBbfHb15x8=; b=fD8qjFp29z2dFsmKcW9qRFcHbp+mnbwqhY0T5D2ltxokSwS4NVS0zKiepLWdajKSvs6xlBURIBeoIbLP2UfcPOFDbRWlxfWo7gX0cz8s/RMEa5JPIZ966KKZvz3ZdR+qekYC4m1X7tAXLkUNMzHqL7+xJykzNozH1r8EkS7TqGuAys+qP0H77oi9pj9Z8sCJg+3Duymo4lbB7KP7RL5UY8o1QuWfD3+n2AHnMm5Or95thDY95419F/lg/A+l4z3DqYloEc0/mV+Po6G6MgTN+Goxzlgz+XnSadZcPKFNpXu99w8aPd7fcEuUvMYs+vDIh9CKdHCAOqEGJkFKEeSJ1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rR1rkZaAcUjbJhVUuuHUsBP4wRC0wqW6GVBbfHb15x8=; b=prbTUcMA3tI9tKkKd8/zkGWi0pIGVmhSAuZf2HCEYNFzhYwtqz2rlQqDz1UVLXVpuy/8KVZLTlJLHtjZz7AsYT1PKtq5HNS3aP58ypdWl13N5e7pbjTD6LINZumT3nDybQx+ehk12cdLSd15W8JqWJRRfY36YhUyvsjiVOuMycA= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:54 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:54 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 43/86] sched: enable PREEMPT_COUNT, PREEMPTION for all preemption models Date: Tue, 7 Nov 2023 13:57:29 -0800 Message-Id: <20231107215742.363031-44-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0250.namprd03.prod.outlook.com (2603:10b6:303:b4::15) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: e23fc83e-3569-4276-4692-08dbdfdcdfd9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4i1r8YnG08dLkmb/W3ggCv8d4f+0sRTbVy8b/3F5xsy7FBmrawbE7NtK1MUGNqkdR0AtB/h3WrCpQU3uDsV2y6KePXIeJ9No3f6HCTtHYm6SEdJu7Vom33RsJadq07TeOWtqGFXbBVhKZ85R7lZzaMaPDoplflD3ImHkB6cQcBX1PHcdD7WxihAaLA9YpBdI/54ZleQfh1azSAbxoDxndMQ/DFn6BUJ39jTXj2JuS3t42ROq+gYGfMbd4DhxFZJaR2j47742WlbnsOeCtACxhUozyotgudi2yF/2v6bISGo+mcUe7IBzEG8xcXoL9QLm6LgqoFkMP46LSyrPsBwrNVNX7mq+d4SP2ir+37ibkroNSder2g0YgUO3/KRT210DyOKWc1wbvOIyef/yaymY/bAcO4lKg5gI3JMsbwUdD6PPU58/RNOI3H5QpjEofTSq9zCDLEwpZJsO8JRZlPNzUmhM4K2BZyizNNLr0gawYICK9GDiBf8ggQ032nLZIr7AiCY+Qyy02tA11JzlHN7eiLCYsKvLsMIiu9xQX7l9y4zDdl5g2eUCC2kc4kRV2vlu6oAGByjf8ZNgxOsL14cXI0UG1PoJ4oiicLwCquPek+ZsiLqGYioas+tb/D8PaVCo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001)(170073001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GA0RiWnl/1dkrogtczrnNsfMGkIUWj61x5yAfnBKwG9t3oLwMx50leppf8/AA+WJ+hAJZ0Noa06h5GZeW0TNFvL+QaEEkD0dnHyKMKAldxG6nBf+0ZO6VajwFvaMyNMGFTRtWQn1a54ol0lPkr+9/K28wPNZhVuRiXR+LNL7QlALpNAsSC6BWGq+XH9C6I6Ryaw1/YQZWvjzopIQfl0vNZ3OmX+fdvRt/78VOWiZuH485uMG834l//D4cAXfcBAT3d7VSZpvKiZ+tJN0/EnVhe6a7F6dh+6Wzw6p9DhtVknNiQFcaEfSONysmXixpk+COiL1DTnzJLCcLdl4kicKJhEBMtfh8q+veJnBOMCvfkvifPWoWGyhYSjmLH/SgPzszjUmDeU0JzckUH3GbXxYsCR6FuBGWgMsbKaHsSTWz6IGkmpnLIRAh9r32E1DQdgM7rxLWstoOxdkTewyNGGA8E7SILQeb2igkRXUjCJopy97gGKI37uTO6br5jOVSkA3Fy5Z3vVlwH0LyOcaO1UIp5OuCr8zYSlUtg4QVA6T1yc3CgvOc4nGY8ZdcSLDEwmS6BOUwzEUEJLzgnYgKtAPQQMzmj56SoZJs9QTXB6ePVFi6RzULjYo5WZsRGVTbbVQrmyg2Q6MeYEUWPD2TZdvCYGUoCavQssKQjE9uReC5OsQPewmFKuXmXMQIbgpf5w1oPk2CoFLZwFNcJ6lP4uVkiq94mgaUr/B0n/kpNOwSOreOtmyKAsXYbmCJJqniB0VE0R9yTTPIBaovCqYnUWN1mayaOEQDB+iI1KLtgKcjn/P6ppFy+fvemmVT3uXxwkY46j1nlVxFyFWCWB8HNSOBVQ3ZErBKAT7tAn2rlFYEnDbdnTtO6wwSRVezQL3ZWuRrlB4Jjar1w8P+uZI+BiuqIlQUVU+B+MC/FnrlTBHMIYTulfEepoviNKNPU4SmlfcYWMtT1rz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2JCEprFXcXAaeHP4Ak0CItZQHMB+GdCMB/BUCvNHLs2tp2cyEWzGLu9+xSX2XK37Xa7QqOOQoKp+n/QBkZwLFFdyh/Yxybh54taQLBKn5AkQsVnFK0g/eGXzzRD+AYArfg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e23fc83e-3569-4276-4692-08dbdfdcdfd9 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:54.5899 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ov0nHQuUC80qS7AsA/au1oN20mO3i1UajO67O7HTy7M3+ukgONY0I2B7bLJDLBE+jyMztb/7m+wz6fxvCdOsE36pkQ/tw+Ia0+H/yaxPpow= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=829 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: HUXlBx9Ae2D8bU10bNXdXpUFrxiOPGJz X-Proofpoint-ORIG-GUID: HUXlBx9Ae2D8bU10bNXdXpUFrxiOPGJz X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 7F78B180003 X-Stat-Signature: n6d59k4hjympfr8pdqhy44jjdqzf7d34 X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hgyFv+tbJGGBkntXWpgX9oMvQuKjOOaZHPa5wK/6U390l2IPtnEwN1bAhUr5T8F5+SeE591xEXkt05/m5dtf/nuDniyL872l34rxPqZWyhSpa9S1B6ax8FvHN5FwHZAJrDIN6PCrZTw6Ze3yVC4S+c39QlLgRclBXo5DtGlVIRCFxgi1t+oRuGmD01RyTUVqALrxcrpcc6de7DHs1yoM2UBFh0gBnOv9Pjhyj4DQFreiwUILqbo7OjqyJBQjpNwuBCoHVBWBGnqOP+v+JZDJq7YAZNWiM/6fk5eLC/Qhx3f4Umuqk2y7uS/pVBq0PIADPqvgcrGgXg6ndLh8e8E5QPOPqYOq8BJ2xqpkFNJYiA/h74PRBZ3R8mNSgV+UnFBE2uqldqLUomCQRrpA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The scheduler uses PREEMPT_COUNT and PREEMPTION to drive preemption: the first to demarcate non-preemptible sections and the second for the actual mechanics of preemption. Enable both for voluntary preemption models. In addition, define a new scheduler feature FORCE_PREEMPT which can now be used to distinguish between voluntary and full preemption models at runtime. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- init/Makefile | 2 +- kernel/Kconfig.preempt | 12 ++++++++---- kernel/entry/common.c | 3 +-- kernel/sched/core.c | 26 +++++++++++--------------- kernel/sched/features.h | 6 ++++++ 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/init/Makefile b/init/Makefile index 385fd80fa2ef..99e480f24cf3 100644 --- a/init/Makefile +++ b/init/Makefile @@ -24,7 +24,7 @@ mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o # smp-flag-$(CONFIG_SMP) := SMP -preempt-flag-$(CONFIG_PREEMPT) := PREEMPT +preempt-flag-$(CONFIG_PREEMPTION) := PREEMPT_DYNAMIC preempt-flag-$(CONFIG_PREEMPT_RT) := PREEMPT_RT build-version = $(or $(KBUILD_BUILD_VERSION), $(build-version-auto)) diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index aa87b5cd3ecc..074fe5e253b5 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -6,20 +6,23 @@ choice config PREEMPT_NONE bool "No Forced Preemption (Server)" + select PREEMPTION help This is the traditional Linux preemption model, geared towards throughput. It will still provide good latencies most of the - time, but there are no guarantees and occasional longer delays - are possible. + time, but occasional delays are possible. Select this option if you are building a kernel for a server or scientific/computation system, or if you want to maximize the raw processing power of the kernel, irrespective of scheduling - latencies. + latencies. Unless your architecture actively disables preemption, + you can always switch to one of the other preemption models + at runtime. config PREEMPT_VOLUNTARY bool "Voluntary Kernel Preemption (Desktop)" depends on !ARCH_NO_PREEMPT + select PREEMPTION help This option reduces the latency of the kernel by adding more "explicit preemption points" to the kernel code. These new @@ -53,7 +56,8 @@ config PREEMPT Select this if you are building a kernel for a desktop or embedded system with latency requirements in the milliseconds - range. + range. You can always switch to one of lower preemption options + at runtime. config PREEMPT_RT bool "Fully Preemptible Kernel (Real-Time)" diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 6433e6c77185..f7f2efabb5b5 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -422,8 +422,7 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state) } instrumentation_begin(); - if (IS_ENABLED(CONFIG_PREEMPTION)) - irqentry_exit_cond_resched(); + irqentry_exit_cond_resched(); /* Covers both tracing and lockdep */ trace_hardirqs_on(); instrumentation_end(); diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f65bf3ce0e9d..2a50a64255c6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1065,7 +1065,7 @@ void __resched_curr(struct rq *rq, resched_t rs) * * Always schedule eagerly, if: * - * - running under full preemption + * - running under full preemption (sched_feat(FORCE_PREEMPT)) * * - idle: when not polling (or if we don't have TIF_POLLING_NRFLAG) * force TIF_NEED_RESCHED to be set and send a resched IPI. @@ -1081,7 +1081,7 @@ void resched_curr(struct rq *rq) resched_t rs = RESCHED_lazy; int context; - if (IS_ENABLED(CONFIG_PREEMPT) || + if (sched_feat(FORCE_PREEMPT) || (rq->curr->sched_class == &idle_sched_class)) { rs = RESCHED_eager; goto resched; @@ -1108,7 +1108,6 @@ void resched_curr(struct rq *rq) context = ct_state_cpu(cpu_of(rq)); if ((context == CONTEXT_USER) || (context == CONTEXT_GUEST)) { - rs = RESCHED_eager; goto resched; } @@ -6597,20 +6596,18 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) * * 1. Explicit blocking: mutex, semaphore, waitqueue, etc. * - * 2. TIF_NEED_RESCHED flag is checked on interrupt and userspace return - * paths. For example, see arch/x86/entry_64.S. + * 2. TIF_NEED_RESCHED flag is checked on interrupt and TIF_NEED_RESCHED[_LAZY] + * flags on userspace return paths. For example, see arch/x86/entry_64.S. * - * To drive preemption between tasks, the scheduler sets the flag in timer - * interrupt handler scheduler_tick(). + * To drive preemption between tasks, the scheduler sets one of these + * flags in timer interrupt handler scheduler_tick(). * * 3. Wakeups don't really cause entry into schedule(). They add a * task to the run-queue and that's it. * - * Now, if the new task added to the run-queue preempts the current - * task, then the wakeup sets TIF_NEED_RESCHED and schedule() gets - * called on the nearest possible occasion: - * - * - If the kernel is preemptible (CONFIG_PREEMPTION=y): + * - Now, if the new task added to the run-queue preempts the current + * task, then the wakeup sets TIF_NEED_RESCHED and schedule() gets + * called on the nearest possible occasion: * * - in syscall or exception context, at the next outmost * preempt_enable(). (this might be as soon as the wake_up()'s @@ -6619,10 +6616,9 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) * - in IRQ context, return from interrupt-handler to * preemptible context * - * - If the kernel is not preemptible (CONFIG_PREEMPTION is not set) - * then at the next: + * - If the new task preempts the current task, but the scheduling + * policy is only preempt voluntarily, then at the next: * - * - cond_resched() call * - explicit schedule() call * - return from syscall or exception to user-space * - return from interrupt-handler to user-space diff --git a/kernel/sched/features.h b/kernel/sched/features.h index f770168230ae..9b4c2967b2b7 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -89,3 +89,9 @@ SCHED_FEAT(UTIL_EST_FASTUP, true) SCHED_FEAT(LATENCY_WARN, false) SCHED_FEAT(HZ_BW, true) + +#if defined(CONFIG_PREEMPT) +SCHED_FEAT(FORCE_PREEMPT, true) +#else +SCHED_FEAT(FORCE_PREEMPT, false) +#endif From patchwork Tue Nov 7 21:57:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73727C4167D for ; Tue, 7 Nov 2023 22:00:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2B408D0085; Tue, 7 Nov 2023 17:00:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B50D8D007C; Tue, 7 Nov 2023 17:00:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 769D98D0085; Tue, 7 Nov 2023 17:00:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5E2AB8D007C for ; Tue, 7 Nov 2023 17:00:27 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1AA9E1A0B20 for ; Tue, 7 Nov 2023 22:00:27 +0000 (UTC) X-FDA: 81432527694.28.E958A51 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf10.hostedemail.com (Postfix) with ESMTP id 83BFDC0002 for ; Tue, 7 Nov 2023 22:00:23 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=2XhRGuye; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=G5uiIqT5; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf10.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394423; a=rsa-sha256; cv=pass; b=c+i34XzqkTPEoAXV3bvhpmU3iCiKX42MZAZQrpnStR6vUx9PoDJ0BkMfoe24EHn+9NytR7 pwmCT3v6Rx2y2DigDR8Um3JUJH7lwpXsejkKZWvfA5t1u1TyDfhGbgAM/3+fNFI0UIt0zD yoLBt8Sh6+0gbNtaMrFWZ3+uav7rNXw= ARC-Authentication-Results: i=2; imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=2XhRGuye; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=G5uiIqT5; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf10.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394423; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CdxkzwCkAACo9KhjEACiAY9GZyZVnoZczDrZBjKY/sY=; b=uBT+PK3u2kn2LvCaUvAJ9VkqZKjHfUTWM6AaKdMbqI1IId3TT1CbN+hdO3iOR+sckMekBH 7j3Fnq0juGhjxUSWawuKPbD59cK6h5tzHPNnE6RiPYpbG0hIDjFfwRjj0kug83N2CFvQ0l mFI/5xmwl69YAm8AFI1KPbCj7i1ZVZE= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJlGq004887; Tue, 7 Nov 2023 22:00:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=CdxkzwCkAACo9KhjEACiAY9GZyZVnoZczDrZBjKY/sY=; b=2XhRGuye2hzF0IcFdzUOMoqDe5QWyN3wJQpM9ymZ0L2eRDHhsFqcCf5SSBbNDLSRs1vm /AE80sJVdHtOltwxS+GkFfFVbIRgfLtuQoRfR1BOHxk/zYaf+TBSRMVGUtLRe2d/u0j1 QvH7X7JnzNGWr94/ynvlJEXtuT9oGl+UXzgGLOUMocF6pKTosN9rohDXRr9cnOpSGIk6 BV73Uhht6Lh46qFLA+zNWnZ6I5shSU559AWdqeQ3UHVwOkVR5PM9STi1ECGMWgniG5Nx J8TRHPR/3KSH4iqaj50/9hZ5Enraxfefu7QGm+JmLamWmcFhuF/BTjG5yk2p4l3QY5nA 1A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g2pm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:01 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIqeI003884; Tue, 7 Nov 2023 22:00:00 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2040.outbound.protection.outlook.com [104.47.73.40]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vsk8m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=djpXAETJgBzFHOapNMQ0YIfZDpOaVHpbXzB+bfUAeJ27KpuBjQr8J08/Pw/MU89yJHl4hqV+rX7v4nZ/PljxHDraJdCa3fBwaOl1BX6x/YhQl1WJn2Jmst0VUir6GDQgTf6M8l1N/8ir95fxvCJlGXPvXYiU6odVJsBVnFvC8pbaMRKOmVjeiHXC+kWPeDuYT1aBDCbT35vjYkumzVpuuXLtm6Bs2cMthT4PrRvNNPUzhVG0zw0+/ixhCM85FzBreGAWoi5xk085Wd69ovx2AduO3DJuhULqyGKvYa6KCoJ2M6lUsL/Rng4YB0Eu3b+XPjI1qORbvxlZb3+VZhDuGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=CdxkzwCkAACo9KhjEACiAY9GZyZVnoZczDrZBjKY/sY=; b=awc9wqxnz18IHuneUt40zdduwMA8RO/vkaNA2PzA2sdX2F6rRhAG0sDFT7ba6pgyZ5Js6IC4oPYcYN/VBKBBGN5xWnFHI9EcFwVRcW3qzuxilRACkS0kmx+98LLGax90uJnkD8oFnk3uw5njOyVfhksGOKGTse22sFV9PmwJKm/zFloVE/Y28ptE+htgLSzro9N++I4FnqBOglkTTgryTGtQqP641zHOQc2davk6TUMvJBvKBWzRU2cCptu8/w7frlnWgKMotlaWfJ6sesPrEpoE1XOfap8djS8gWjTmMSkyfHbX6nqXKWEvSOCLrXz5Xb/fdhL04L0QBAgbqP3KYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CdxkzwCkAACo9KhjEACiAY9GZyZVnoZczDrZBjKY/sY=; b=G5uiIqT5Lrgxl7UeXAXXwTP4abnuAZ26aqrM1xmjZsM5isrYpLwjoT5CNYvoUsjbEfYSbXc6qo6scvupQFQA7enoL4Kin6ONPVOci+AhZWAr1iDb1g1lS0P3C1WxW9q0Rt/u41kKnrc2FjsEf+IGnfluS+dTfNa9yiko6GdUNIk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 21:59:56 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 21:59:56 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 44/86] sched: voluntary preemption Date: Tue, 7 Nov 2023 13:57:30 -0800 Message-Id: <20231107215742.363031-45-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0173.namprd04.prod.outlook.com (2603:10b6:303:85::28) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: fae18619-eb89-4604-2b3f-08dbdfdce0fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FcrHNF16HEXWKX6YVL9Qjs+62GmEz96u1A253vttgdAAtQIS/HRKC7Mejq8UOJnung8dGaVHE6C91jgHOx3iCMVpuHYfH0/Z5kvoGGwDUqMybbZeTT3iXm6VrlLBvC1HwMDq+6clo9Stzd1Qj5G7Yw1+3A/3X3mc59UW9ZcD4Q9YsI2nJPn4+mLPP1Sc3+Ihhm+nxPgVevylYUrd4jlLFmwMSnIoteARAOFoHd0irwD3ieoOVE4NIxFqtgDdb3OoXwQhJFhiaGfbf5PeJpqHkbBet/JeXooTx2iHGs200jOQW+AtequWVtJK+WDoccnLHjCZKtUzxxzOjgEtRMfPoxLzuuPJghVlRdWzzB+A03BuPHltsEiZQSpx7d8xBepwVDPlJDrnRXe9C0Aw+iss4N2blSvSVR5w65IgbPHb0SWKh4iZjRth+Y2wdF8KFBoJLsnX/qp04Vvb9gub2hb6PN2jaNqkUmq4LdSfAbLkshPPbBNlbXI0o+7BD1bXuFwFpnGVy1lFmbkV/66oT9O+b4iXeJWDWeqFq9uMViC3J5g9y0i3WJA7X94Xy9eDTDJS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(30864003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: W3lHyT/l9tb7jyKRnD+wMaBDy2dt5fzGtoTROACr2ZIJHS0FGu0eW611HGaecVN+rYd/Y6Ljw0UYgTL3ri19mexM71COqPPZLxRo8xGhmsaXCHeQHk6trv714xmJPFtAJtL8VwmfDABjFk3KKTHp2cxCnB8hkAsWFKIlWYo42xJorAPQyoS7n0UgszbdVbvXmjF8VSwVvAs7vWaQvZHcrcJoPGgNaJJP4nhmNQmpTeYREqfuIX3f6AIMDKp0X3OuScy8LVBBL6A3uV1pKql8H5e19QbrgTJhuvNvwnwpZYMn6+eZ1qsrCwQ7e5pkgEBKhiINOE7XkmL5B8q8MbRm84iNkHDcgjg/TpEkr5EE1T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Fox821ev30U53oQELPz/m/6xqd+5n6QB+zO4k339C4xV8Uy0IKLXA31fDYLhtUGOg6U7NPWFHGx4720iWNs3i5zyO/OAJo0kXDJcgwbcS6q0Yy3TIG4HHwgy9omk8VlXUz5eboSA5qBUKuoBe4l6SG1XMv8D4IzGZuZAPEb/ZE1jVZYPhA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: MjJ64ByBNDc46wczT0TW+PAYnw1m+ObRE1W6CAVZINNBk19j+3jV6rVs6QzgOwKVujNAOJ9sQ0lDve0lnnWaeeOi7OH92pA5371Vut+oZNqleGAbHpnZqqN5JDpqn7rk1A9NlkdMbudOlHOzkfZNyDscNEQXx+l2ATWCtanF4nfHFpYdyIDDUA2sAoKUT8gv5UViZAGXNEURCWffJpakeBEZjziUQm4T69FlLib6BitIbLhoAWDrAaPZGnwU733phc3Zk2dXR2VvGBPLVPCcKUnMpz0qPZQCsbB7VfnGa/9gOgLJkA+va4s6eHEs/Frhp/+n45B7EwWGa2cX61slY2RqLqZ7boe7U0aiWUytO5I0tth+quyEQ3WKH4ezouzsfhWGDG2vGBAfG2PMEvAaOu6qa7XFpE5xeK4+S5kT/MeUm7TEq3e6mQiR+2Scl/sp+uTbri4VlIHovUhZo+m66qAmVNxq6uZbJdSUDPIm65XglkI7yi/ZyAN9I6m/JX9Ks9+KM8+W1D9FPWSELhm179dSEdRRha+8ocNaa8QX0O6fnUTjO0hPci0ajObFcUJt7IEQdqAmv1/lG1zs5jtEBXkYNnadTLULxMED0Hy2OXmztu/GU3hxsEBK/6vXuG9Bed9KUu0s8+tmBydDq1s+xLF3hXbLVEouNIeldftjN+O+RMs96FsVABws7wcWi5ououmd5dCzvt8NXWl44Mc8EiTGQZn5OW+LFUuLoq374jsbArGGnAgK7yg3CRAg61mC7KdaVh4Q/UeZCR58+CyyAxaL5O1gd5mHdCp5RsikfRCbWaGQo0AgWQnkMA9VnPxBSnCp2BTbsTixrM/RForO5f3N7T4LgZ8N0+hQz3TK0DYQ0IDnXNiw/zrTyCjWfxjvEKSSMgYoArXXvGzsklYTK3d2RQflMUla5aj8Rmcxv1wO+2IDByDiV8C/I7/u7ac3tJXVRbCNpHYbuDDADtCE+kI3BJXJVs51byBZNCPzFacTGTs2bxnqGQ/w+yQmWsoX1RkfC4mBIhb97NV/H0dpJXSI2yNWlyTcGRXwc1Uy3OD+b0mjQcM84MS6S3coKB+Mt2wsqVAF/JttV9QL5ljj1y+h08J0X1iXolJiJ9udHudGKv1+bAUEIr561F7H8rF7KerDfCNcJyHU83yj0NQwYqFgK/I48CBi46rCdY05ngA4ia77Vt9TQ8gs9SB3F7QsPWEt0Jjg7nkSRIguoMm7CvO7laXii7+iwQEJgfjWwfBxklDY0YbGMahzMpA2qJhvLuGw9DeuDfkZICeV54dw5/oHs+PyBZVH0dsQFuP3wvwFz/u0i9XdxfsmeTs3LbIaE0XhODAyC1Lsae6UvGR9o7dRrLCMocQ6zPnzy0I2iPNYTTYqi6tSmHeAg/T5+ePTRTgoGUTaIG8Gvvry26qg1h5JQ60K0kjptPw8bhOywq+zZ/aVbpKQUufHLuMbcFnvgMWnm2hLywj74nEboDL7t4YG4KbLl+NW544COHKGxCjChjCiOJt2XS+uOSP4pBTjbFB6WVKy578Ml/V7GiruFA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fae18619-eb89-4604-2b3f-08dbdfdce0fc X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 21:59:56.5472 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wdPLdqeBIBX7N4Zn3RGRhPYNDrh2StKMpLniMPQN8J/os3hO7+Am5orAn5qQbqAcX9hyT0CZdb1lBXhRBem4yVdLgd00ddOcVXG3fRbak/Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: jzM4HBniecIoK4u9dcdfa1gInCBXSEV- X-Proofpoint-GUID: jzM4HBniecIoK4u9dcdfa1gInCBXSEV- X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 83BFDC0002 X-Stat-Signature: rkzgggh6mijr6igjzfmnrc4iy9baortb X-HE-Tag: 1699394423-161095 X-HE-Meta: U2FsdGVkX183wJO0g2vdcp9FED3VCJr15vABLsJ3+pCWVVpxvVLZG+x3lLfvwjzlumCBjLSy9krgG9bVUFSvGzsBb2XZAAcGP/9TWZmyL7L5DG9Wa8Gzgs0h0yVT4nbo4MMRiylBm/PwYrRqS84ua1W6/vXj3CdhSammOJMjC53jnO+rVf8hXnZ1QcV/EryYr+Fis1arqbpBzl90jNC8uBx8yRzRWvmKIPMArOXTcUxfSkHE3dqroSFN5MjfTVDoJxTux+aSkDQKf2GGk/Hx1F4nErOf84SYg4elS7FK3DbUtkhLz/EnfQA0KVSvqAKGc6RI7gWFqNGpfQwaZfKYkoDhDd3ErPIiSo5dIinyRs9cNp8vamMw/duB3jyVizBccfUXzvw0KSgwHtwThH3eUrPA1V2Fr0EAMW2lI0+EtG33rQC9EWSDKeX6UXn4dDxLpvIWQJKT+SWtzqHrcpRA6oLomfQzehqinBZlyIHyJT6XPAQm+ySTED9PYf1ikx8zPUvY1YF2xB4wx0yjp7l1nyr+I/tiZZPkO/Xc4buXoBzMy246FXSpmzxTQQCrgbXzAYwx0naPo6zIdk6zjAMRvHL1BZlNnqORz2TKXjK24ph//FVlcJ2wwPIbfuakHy88dBoi4Iih4jITKhOPZA705fVNzRoaaBR2KO8XCVrDLLpA4upvSTIzo62LCWDyK8N2tb4uIP2o4OgTs5xlNa/ATFL4oVVq8ZB2t4AbOgFLI3a5WfO49j827g3UKl367OHhCOmEcui0okQz72BisDhlVvI5s4pyqxsQ6rn/nqFQi/3sWIRen9xzJUVA6M92Ct/G5o9fF0fuedifR4qb3sDslyysthBBd5V+DeZs6dYOpX9JbIAZ4MloiaQgveAR5wnJptU+memKiK6gq0+MzsYhufXkeNdB2Z5aqZ6em8gvKrrgum8JPTFRPErkDojTqgKBUIAE+q5fUQmF1smgoHL kz00M1ZS 3hbrBc0AeZP6In+eg8sJIjUG7cZ7PM4llhGkOfs5t9BCuFB6y5xAft8CPbc3gPwVQg1KCuxWZG3dQeGMPgzf/SjMbaoLp7lztp+V+qFJrCxnHW2BnmPbhHA5WQdf7rF7RlxAP+NFQfTFb7bFoK3ahEO7Kwzlais0LsNgw+8eh0PtiR9zcce8Exl5ioml0BT0cpYXIRNWLPwE97jPgE3lVOoYewellKgzyqqZ2VtHslb449QpT+oDoI+owPNYtnl3FLIeENLJx7nWkS+pPyIjHfSHvXs6pqkEjtjcv1wuTPuVGrRZOeOO9LzdBTKRXqpowFiKdSqwDWAJMdM1XNT7YVNabWb/OlhYefJkozAqXE47qymKrSO60ij0AK+BIBtIOBp/KCLTxjp25RnarczCksSBAS9ZMMENDSLdl83L2zCcaIn0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The no preemption model allows running to completion in kernel context. For voluntary preemption, allow preemption by higher scheduling classes. To do this resched_curr() now takes a parameter that specifies if the resched is for a scheduler class above the runqueue's current task. And reschedules eagerly, if so. Also define scheduler feature PREEMPT_PRIORITY which can be used to toggle voluntary preemption model at runtime. TODO: Both RT, deadline work but I'm almost certainly not doing all the right things for both. Signed-off-by: Ankur Arora --- kernel/Kconfig.preempt | 19 ++++++------------- kernel/sched/core.c | 28 +++++++++++++++++----------- kernel/sched/core_sched.c | 2 +- kernel/sched/deadline.c | 22 +++++++++++----------- kernel/sched/fair.c | 18 +++++++++--------- kernel/sched/features.h | 5 +++++ kernel/sched/idle.c | 2 +- kernel/sched/rt.c | 26 +++++++++++++------------- kernel/sched/sched.h | 2 +- 9 files changed, 64 insertions(+), 60 deletions(-) diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index 074fe5e253b5..e16114b679e3 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt @@ -20,23 +20,16 @@ config PREEMPT_NONE at runtime. config PREEMPT_VOLUNTARY - bool "Voluntary Kernel Preemption (Desktop)" + bool "Voluntary Kernel Preemption" depends on !ARCH_NO_PREEMPT select PREEMPTION help - This option reduces the latency of the kernel by adding more - "explicit preemption points" to the kernel code. These new - preemption points have been selected to reduce the maximum - latency of rescheduling, providing faster application reactions, - at the cost of slightly lower throughput. + This option reduces the latency of the kernel by allowing + processes in higher scheduling policy classes preempt ones + lower down. - This allows reaction to interactive events by allowing a - low priority process to voluntarily preempt itself even if it - is in kernel mode executing a system call. This allows - applications to run more 'smoothly' even when the system is - under load. - - Select this if you are building a kernel for a desktop system. + Higher priority processes in the same scheduling policy class + do not preempt others in the same class. config PREEMPT bool "Preemptible Kernel (Low-Latency Desktop)" diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2a50a64255c6..3fa78e8afb7d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -256,7 +256,7 @@ void sched_core_dequeue(struct rq *rq, struct task_struct *p, int flags) */ if (!(flags & DEQUEUE_SAVE) && rq->nr_running == 1 && rq->core->core_forceidle_count && rq->curr == rq->idle) - resched_curr(rq); + resched_curr(rq, false); } static int sched_task_is_throttled(struct task_struct *p, int cpu) @@ -1074,9 +1074,12 @@ void __resched_curr(struct rq *rq, resched_t rs) * * - in userspace: run to completion semantics are only for kernel tasks * - * Otherwise (regardless of priority), run to completion. + * - running under voluntary preemption (sched_feat(PREEMPT_PRIORITY)) + * and a task from a sched_class above wants the CPU + * + * Otherwise, run to completion. */ -void resched_curr(struct rq *rq) +void resched_curr(struct rq *rq, bool above) { resched_t rs = RESCHED_lazy; int context; @@ -1112,6 +1115,9 @@ void resched_curr(struct rq *rq) goto resched; } + if (sched_feat(PREEMPT_PRIORITY) && above) + rs = RESCHED_eager; + resched: __resched_curr(rq, rs); } @@ -1123,7 +1129,7 @@ void resched_cpu(int cpu) raw_spin_rq_lock_irqsave(rq, flags); if (cpu_online(cpu) || cpu == smp_processor_id()) - resched_curr(rq); + resched_curr(rq, true); raw_spin_rq_unlock_irqrestore(rq, flags); } @@ -2277,7 +2283,7 @@ void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags) if (p->sched_class == rq->curr->sched_class) rq->curr->sched_class->check_preempt_curr(rq, p, flags); else if (sched_class_above(p->sched_class, rq->curr->sched_class)) - resched_curr(rq); + resched_curr(rq, true); /* * A queue event has occurred, and we're going to schedule. In @@ -2764,7 +2770,7 @@ int push_cpu_stop(void *arg) deactivate_task(rq, p, 0); set_task_cpu(p, lowest_rq->cpu); activate_task(lowest_rq, p, 0); - resched_curr(lowest_rq); + resched_curr(lowest_rq, true); } double_unlock_balance(rq, lowest_rq); @@ -3999,7 +4005,7 @@ void wake_up_if_idle(int cpu) if (is_idle_task(rcu_dereference(rq->curr))) { guard(rq_lock_irqsave)(rq); if (is_idle_task(rq->curr)) - resched_curr(rq); + resched_curr(rq, true); } } @@ -6333,7 +6339,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) continue; } - resched_curr(rq_i); + resched_curr(rq_i, false); } out_set_next: @@ -6388,7 +6394,7 @@ static bool try_steal_cookie(int this, int that) set_task_cpu(p, this); activate_task(dst, p, 0); - resched_curr(dst); + resched_curr(dst, false); success = true; break; @@ -8743,7 +8749,7 @@ int __sched yield_to(struct task_struct *p, bool preempt) * fairness. */ if (preempt && rq != p_rq) - resched_curr(p_rq); + resched_curr(p_rq, true); } out_unlock: @@ -10300,7 +10306,7 @@ void sched_move_task(struct task_struct *tsk) * throttled one but it's still the running task. Trigger a * resched to make sure that task can still run. */ - resched_curr(rq); + resched_curr(rq, true); } unlock: diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c index a57fd8f27498..32f234f2a210 100644 --- a/kernel/sched/core_sched.c +++ b/kernel/sched/core_sched.c @@ -89,7 +89,7 @@ static unsigned long sched_core_update_cookie(struct task_struct *p, * next scheduling edge, rather than always forcing a reschedule here. */ if (task_on_cpu(rq, p)) - resched_curr(rq); + resched_curr(rq, false); task_rq_unlock(rq, p, &rf); diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index e6815c3bd2f0..ecb47b5e9588 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1177,7 +1177,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer) if (dl_task(rq->curr)) check_preempt_curr_dl(rq, p, 0); else - resched_curr(rq); + resched_curr(rq, false); #ifdef CONFIG_SMP /* @@ -1367,7 +1367,7 @@ static void update_curr_dl(struct rq *rq) enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH); if (!is_leftmost(curr, &rq->dl)) - resched_curr(rq); + resched_curr(rq, false); } /* @@ -1914,7 +1914,7 @@ static void check_preempt_equal_dl(struct rq *rq, struct task_struct *p) cpudl_find(&rq->rd->cpudl, p, NULL)) return; - resched_curr(rq); + resched_curr(rq, false); } static int balance_dl(struct rq *rq, struct task_struct *p, struct rq_flags *rf) @@ -1943,7 +1943,7 @@ static void check_preempt_curr_dl(struct rq *rq, struct task_struct *p, int flags) { if (dl_entity_preempt(&p->dl, &rq->curr->dl)) { - resched_curr(rq); + resched_curr(rq, false); return; } @@ -2307,7 +2307,7 @@ static int push_dl_task(struct rq *rq) if (dl_task(rq->curr) && dl_time_before(next_task->dl.deadline, rq->curr->dl.deadline) && rq->curr->nr_cpus_allowed > 1) { - resched_curr(rq); + resched_curr(rq, false); return 0; } @@ -2353,7 +2353,7 @@ static int push_dl_task(struct rq *rq) activate_task(later_rq, next_task, 0); ret = 1; - resched_curr(later_rq); + resched_curr(later_rq, false); double_unlock_balance(rq, later_rq); @@ -2457,7 +2457,7 @@ static void pull_dl_task(struct rq *this_rq) } if (resched) - resched_curr(this_rq); + resched_curr(this_rq, false); } /* @@ -2654,7 +2654,7 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p) if (dl_task(rq->curr)) check_preempt_curr_dl(rq, p, 0); else - resched_curr(rq); + resched_curr(rq, false); } else { update_dl_rq_load_avg(rq_clock_pelt(rq), rq, 0); } @@ -2687,7 +2687,7 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p, * runqueue. */ if (dl_time_before(rq->dl.earliest_dl.curr, p->dl.deadline)) - resched_curr(rq); + resched_curr(rq, false); } else { /* * Current may not be deadline in case p was throttled but we @@ -2697,14 +2697,14 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p, */ if (!dl_task(rq->curr) || dl_time_before(p->dl.deadline, rq->curr->dl.deadline)) - resched_curr(rq); + resched_curr(rq, false); } #else /* * We don't know if p has a earlier or later deadline, so let's blindly * set a (maybe not needed) rescheduling point. */ - resched_curr(rq); + resched_curr(rq, false); #endif } diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fe7e5e9b2207..448fe36e7bbb 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1046,7 +1046,7 @@ static void update_deadline(struct cfs_rq *cfs_rq, if (tick && test_tsk_thread_flag(rq->curr, TIF_NEED_RESCHED_LAZY)) __resched_curr(rq, RESCHED_eager); else - resched_curr(rq); + resched_curr(rq, false); clear_buddies(cfs_rq, se); } @@ -5337,7 +5337,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { - resched_curr(rq_of(cfs_rq)); + resched_curr(rq_of(cfs_rq), false); return; } /* @@ -5483,7 +5483,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) - resched_curr(rq_of(cfs_rq)); + resched_curr(rq_of(cfs_rq), false); } static __always_inline @@ -5743,7 +5743,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) /* Determine whether we need to wake up potentially idle CPU: */ if (rq->curr == rq->idle && rq->cfs.nr_running) - resched_curr(rq); + resched_curr(rq, false); } #ifdef CONFIG_SMP @@ -6448,7 +6448,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) - resched_curr(rq); + resched_curr(rq, false); return; } hrtick_start(rq, delta); @@ -8143,7 +8143,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: - resched_curr(rq); + resched_curr(rq, false); } #ifdef CONFIG_SMP @@ -12294,7 +12294,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) */ if (rq->core->core_forceidle_count && rq->cfs.nr_running == 1 && __entity_slice_used(&curr->se, MIN_NR_TASKS_DURING_FORCEIDLE)) - resched_curr(rq); + resched_curr(rq, false); } /* @@ -12459,7 +12459,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) - resched_curr(rq); + resched_curr(rq, false); } else check_preempt_curr(rq, p, 0); } @@ -12561,7 +12561,7 @@ static void switched_to_fair(struct rq *rq, struct task_struct *p) * if we can still preempt the current task. */ if (task_current(rq, p)) - resched_curr(rq); + resched_curr(rq, false); else check_preempt_curr(rq, p, 0); } diff --git a/kernel/sched/features.h b/kernel/sched/features.h index 9b4c2967b2b7..9bf30732b03f 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -92,6 +92,11 @@ SCHED_FEAT(HZ_BW, true) #if defined(CONFIG_PREEMPT) SCHED_FEAT(FORCE_PREEMPT, true) +SCHED_FEAT(PREEMPT_PRIORITY, true) +#elif defined(CONFIG_PREEMPT_VOLUNTARY) +SCHED_FEAT(FORCE_PREEMPT, false) +SCHED_FEAT(PREEMPT_PRIORITY, true) #else SCHED_FEAT(FORCE_PREEMPT, false) +SCHED_FEAT(PREEMPT_PRIORITY, false) #endif diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index eacd204e2879..3ef039869be9 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -403,7 +403,7 @@ balance_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) */ static void check_preempt_curr_idle(struct rq *rq, struct task_struct *p, int flags) { - resched_curr(rq); + resched_curr(rq, true); } static void put_prev_task_idle(struct rq *rq, struct task_struct *prev) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 5fdb93f1b87e..8d87e42d30d8 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -589,7 +589,7 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq) enqueue_rt_entity(rt_se, 0); if (rt_rq->highest_prio.curr < curr->prio) - resched_curr(rq); + resched_curr(rq, false); } } @@ -682,7 +682,7 @@ static inline void sched_rt_rq_enqueue(struct rt_rq *rt_rq) return; enqueue_top_rt_rq(rt_rq); - resched_curr(rq); + resched_curr(rq, false); } static inline void sched_rt_rq_dequeue(struct rt_rq *rt_rq) @@ -1076,7 +1076,7 @@ static void update_curr_rt(struct rq *rq) rt_rq->rt_time += delta_exec; exceeded = sched_rt_runtime_exceeded(rt_rq); if (exceeded) - resched_curr(rq); + resched_curr(rq, false); raw_spin_unlock(&rt_rq->rt_runtime_lock); if (exceeded) do_start_rt_bandwidth(sched_rt_bandwidth(rt_rq)); @@ -1691,7 +1691,7 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) * to try and push the current task away: */ requeue_task_rt(rq, p, 1); - resched_curr(rq); + resched_curr(rq, false); } static int balance_rt(struct rq *rq, struct task_struct *p, struct rq_flags *rf) @@ -1718,7 +1718,7 @@ static int balance_rt(struct rq *rq, struct task_struct *p, struct rq_flags *rf) static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flags) { if (p->prio < rq->curr->prio) { - resched_curr(rq); + resched_curr(rq, false); return; } @@ -2074,7 +2074,7 @@ static int push_rt_task(struct rq *rq, bool pull) * just reschedule current. */ if (unlikely(next_task->prio < rq->curr->prio)) { - resched_curr(rq); + resched_curr(rq, false); return 0; } @@ -2162,7 +2162,7 @@ static int push_rt_task(struct rq *rq, bool pull) deactivate_task(rq, next_task, 0); set_task_cpu(next_task, lowest_rq->cpu); activate_task(lowest_rq, next_task, 0); - resched_curr(lowest_rq); + resched_curr(lowest_rq, false); ret = 1; double_unlock_balance(rq, lowest_rq); @@ -2456,7 +2456,7 @@ static void pull_rt_task(struct rq *this_rq) } if (resched) - resched_curr(this_rq); + resched_curr(this_rq, false); } /* @@ -2555,7 +2555,7 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p) rt_queue_push_tasks(rq); #endif /* CONFIG_SMP */ if (p->prio < rq->curr->prio && cpu_online(cpu_of(rq))) - resched_curr(rq); + resched_curr(rq, false); } } @@ -2583,11 +2583,11 @@ prio_changed_rt(struct rq *rq, struct task_struct *p, int oldprio) * then reschedule. */ if (p->prio > rq->rt.highest_prio.curr) - resched_curr(rq); + resched_curr(rq, false); #else /* For UP simply resched on drop of prio */ if (oldprio < p->prio) - resched_curr(rq); + resched_curr(rq, false); #endif /* CONFIG_SMP */ } else { /* @@ -2596,7 +2596,7 @@ prio_changed_rt(struct rq *rq, struct task_struct *p, int oldprio) * then reschedule. */ if (p->prio < rq->curr->prio) - resched_curr(rq); + resched_curr(rq, false); } } @@ -2668,7 +2668,7 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued) if (test_tsk_thread_flag(rq->curr, TIF_NEED_RESCHED_LAZY)) __resched_curr(rq, RESCHED_eager); else - resched_curr(rq); + resched_curr(rq, false); return; } diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index e29a8897f573..9a745dd7482f 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2435,7 +2435,7 @@ extern void init_sched_fair_class(void); extern void reweight_task(struct task_struct *p, int prio); extern void __resched_curr(struct rq *rq, resched_t rs); -extern void resched_curr(struct rq *rq); +extern void resched_curr(struct rq *rq, bool above); extern void resched_cpu(int cpu); extern struct rt_bandwidth def_rt_bandwidth; From patchwork Tue Nov 7 21:57:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6469FC4332F for ; Tue, 7 Nov 2023 22:00:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 412128D0084; Tue, 7 Nov 2023 17:00:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 39E768D007C; Tue, 7 Nov 2023 17:00:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19DCE8D0084; Tue, 7 Nov 2023 17:00:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 027858D007C for ; Tue, 7 Nov 2023 17:00:25 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D4A36160B53 for ; Tue, 7 Nov 2023 22:00:24 +0000 (UTC) X-FDA: 81432527568.11.7CD5491 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf29.hostedemail.com (Postfix) with ESMTP id 59C73120015 for ; Tue, 7 Nov 2023 22:00:21 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=qY9JE6Nj; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hI0E1Rhy; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394421; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WnmL+bkPmZbyvp+KJh3mqXxxiny0hkTiE1G0LVNwr/Q=; b=sLEAa/vwtwhQvZV8VWgxJYnWpQvLrrpDuJnThybp8eRIHjJB6ej+PtO/V7P8pubW6oVJH/ /fKgmKPKeSWRrxXHlewAcpG2Ni0Vr0aDeJLrmKedPe+9hr4jBT2tpPYEsMVp/Uo+6J/g+A DKxzT8VbwuXGwHsvz98XVF+pJt5eC2o= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=qY9JE6Nj; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hI0E1Rhy; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394421; a=rsa-sha256; cv=pass; b=hfrTFVP4fNLoyjvA2+dwy7rZGVGWjT+MEbhm8CfXrgE/mB4CN+HUaKRd/pv4cmm7ib/cDc h9EOQnPhl2SsAWcBlZfT/edxuwzElvXefnmZqrojdOgwOJ5+JbnDqaTPqGF+eZZEbxVPDd hd5B22SSUN/aQuC/sHfKMwmgGfRudS4= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpZ7020719; Tue, 7 Nov 2023 22:00:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=WnmL+bkPmZbyvp+KJh3mqXxxiny0hkTiE1G0LVNwr/Q=; b=qY9JE6Nj0yvz6yhRcfrTJcSJBIy4+9riqqrwwUD1WmsEqJ9AUsXuUjBPk7+Dvkb/UyxK QhmGUQoX55O35qFdT7RpDY/394oNMRQrNMNwigz4f/gLvPfCemjXPNxljPNbCojb3EXo m1jGLlh6r/TzT0P7Q8IUERvHQy3jvnNxu8UI3ixxIQDqW7vdRy2bjj2833EQZAAFATby hkhbDuITMnCZMFZn5NiMP0RFWKBBydH3OHuO+IS34LuB4RfJp001BLI+W7Y7Hurxq4Vw hz8Jr8RW+hoiiIynjgshY4egsCfwNfmsGHjwH3poE9mop6ONnYQy/2lsubco9lfBlWKL 9A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202tc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:05 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPg0023842; Tue, 7 Nov 2023 22:00:04 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2041.outbound.protection.outlook.com [104.47.73.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241h35-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F0weliJ7JxpsnMTQj/PqvNY9aUjvHZFpBzCNYRAhkOOnQ4fXnMsJKs5lVOj49ZSZR7w+K67tZr2tr/96rtm0Auzfoi2tQvvxoVgE1LDdW9aNLCDbveuybac27yJ4kcBzAoMuMeJXcoeiXZtgBc3IwaOa2qQaVqriJX0MLibpDJUrZDQqhFV2/xVdDM/M984WS8u+Mi5SbCc+M886VDZjZumIL5591Nt9bOK2gaHAuo6kgEZc2jBu1ySgYpMGKfDr8vCumPCzNDHvyhb1Iqkb8NQbh8USi4G3ZNmdtCeNnA5zb1PxVkAcr1XgJrpzjM0zlealoZRD8YBv9J4K/54nfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=WnmL+bkPmZbyvp+KJh3mqXxxiny0hkTiE1G0LVNwr/Q=; b=jgtd3zT+N/gmFH9aWH5FU0uI1CvczLPppLPmH6t7eutUBs/3njYd79NN+Bl1Rk0XZH8/ulgdLfX2F1s4C6HlxPHIOB8X+luLJGJL7A0KqGcXAvQ0UXVgu88jLEYVKVnPNFUyrQIQAZ4Y89VtTRWgbHDUEEl9va19lX5hNtmYPRfAtqXDdVPsRV4E7UOzm5hkrgv98D7aHBDsL01VolU8A0c//10Lv22qDCAwC3MgC3PL597VXP1kMF1ZW43NtlG2tumlTsD6bjopC553lyUrE9SY6IXINdcvAfrBa7MM/tP2byc1Yz+v0kJyIdb5aqoT068Fco5hQtWIYscM4g4NyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WnmL+bkPmZbyvp+KJh3mqXxxiny0hkTiE1G0LVNwr/Q=; b=hI0E1RhyCQl91//KCyMJnmETawH51D0XlXy8FDKEP0HvNrq0unGVwkr2Z4eW2o4UpL7DQY0eMw6mh7s8GuXRhWAvj3SANbPOiI6uUeeYDjOgtU3jadLJCPp+Dd9k0bPVY161c2utOMz/zoW89us1MNZ2rBqnq0R294b1pIltn7s= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by CY5PR10MB6141.namprd10.prod.outlook.com (2603:10b6:930:37::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 22:00:02 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:01 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 45/86] preempt: ARCH_NO_PREEMPT only preempts lazily Date: Tue, 7 Nov 2023 13:57:31 -0800 Message-Id: <20231107215742.363031-46-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0169.namprd04.prod.outlook.com (2603:10b6:303:85::24) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|CY5PR10MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: b64a4c84-2a99-4663-0218-08dbdfdce3f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fio7NFuFJ3uqjdezuagLqhd26OuG8EPxBqX5iidIIG7OmFt3KvN4WGFYtcGSG5LxhzAAJMIwQv/GFgS2OrZAMKaH9A2t1G46W95DIEgWgg5KMqI68n8OwrAuqC1tcMuSCygKnje8TNWyop8ZHuRGgbgVVg6p+eLno1n16udYGwdBW7NisT6DT/xyBLJlC3F79jOeV02X7VdRSsnJFwBCEiM/QjDrU35GfhlIAT1ADKxq7KRliw2J2t2F7Nj9zsG+4nhi5dbcfN8/vCNKKytB4p9j7I/Ome3rEW1xaJZ2HoiD26TNbcB27rfDgZC3AQd3mjZNYupXGWa6N/sOJI/6HwIEavvN2WQi3zJoD3JYWqOayufgCrkBXq4hv9MJJQ8ot8CW+eSLV9iisK8h3ZWDDnBhxKiGOw/qYe4aMFIYp7EGmboL0gx/+QFXKgkqaj8a7kbq+pKq1ZVRlZRmjnuBOD8fEdHuSNCPaG5e9WuPCT3+FPzGYU0iyjEpHRbFeMjGOtyy0bVysdhXy6bHkwvgJku0Z74YHnDXTkqIyiQWaML/JbNEvvVAjBIboRRXdz7B X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6506007)(86362001)(103116003)(8676002)(478600001)(8936002)(6486002)(4326008)(6666004)(38100700002)(1076003)(5660300002)(36756003)(6512007)(66476007)(6916009)(66946007)(66556008)(316002)(2616005)(7416002)(107886003)(7406005)(2906002)(26005)(83380400001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kC306ikyQ+jFprZ4Zl2SU1LJyIVMjr/TtfN5WwlKaru+Ohl41NVoQVEfOKlykU1d9L2FqsgsioMO360RLEJKSi6BGlAP7VzM6rzJ+RJfDCvuUn8es/naug2C5nGtDR6FKrAOyipgbWg1181ajUc8ND1uLPVNE15Bwefjz2+Mji+9tNRczcAxTfDvvJn68JMWOoFPWAh4gui1ohHb/SBLrt9kA27tQ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t4G20rhOsUtETKg7bPhxkUuXo9aKoRaV/t3slqg7tWZVYjzL7Wf51Gr9Pqi5LMiipiptsWa5d4rutQnJgGqMezrm9+sahtRM2vcOhiX6rYuG1iZlUVw5qtvVtPcC611yzelmgVXM6Cb0sPmwzBuFoxdhLcMrcuo8zS/XlEp0SGyGyzHY1/eFD8B7LYhnW4Pg0ceWlu1xgCDJaoahtoLoZKa+5iQI5KHkJ3lY3AcrtO/jv//XHSsOgXd8V8AZ20q0qJ9LPNDr3YlzoNvcv3Dud8ziENFd6SHRY40Z0wBN3oA7haYZs5a0tTMhogwUD1mJTf93mthVS5OKaER32nPujC1efnSvSERhpWmtiTkL+j8fqpKB1CZj+HC/chRb4jMgTGnMCa/njksMScCAakqm6jyhpOFDxn96NymgYmRR4uIZps/ppHjHgGPSKMdVafzgWMUTbvmkJdpjDRE3GGoBpnzsjoX0gpMU7W34UkXJbqNEVA5O9PT+iNko3B0YxK2ZH5SYBWTf3SU2DX5IG3z76R/V8rjljkWua4mrxjEr4bPDqCJI5a6kX/8LI9OuCBut27npROhmlivrL96VSAxHs7efaPytvuG0E2YNCs71ANmK/tRENU1OlWjt/Zl2v1GeUWvRfKB4ek+XTV5CXVoPaX8zGSIDrl19/NAL5NSaONLn7P0mL5N/pCzj5kjNSB5ncPdD3foRx+FomFdzzVSqkLpBCh60TyuhN6ZP4tt1AyBGnXwfEguYrwmgSlueHoWJvapKuR5b5yzFo0TovV226TlQC6ab9kPTKhwpHv267dIXsv5JwNFZN5HEO98m6W9Z9mtkXtIC0wqHdRjy73FKzRO8jZxFm8lgwVeZAyOxYTA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b64a4c84-2a99-4663-0218-08dbdfdce3f0 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:01.8975 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TjfXn2mpkJGCUE+jZiUIWmWDqbRJ6NDOPlNNSo4Fi6JuqdsFhIiyBqomRkrmKPMr8yGa0SavMAOIpT6AbLsKNza5a1KaAzM1OXx3Ytog02A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6141 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: J5fkcx4Vl6lfchMmOAheXQL5eqLEplXR X-Proofpoint-ORIG-GUID: J5fkcx4Vl6lfchMmOAheXQL5eqLEplXR X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 59C73120015 X-Stat-Signature: 1w9g58xted5a9x7tuyudnmdo4sakojd5 X-Rspam-User: X-HE-Tag: 1699394421-516090 X-HE-Meta: U2FsdGVkX1/enh5UQqiv99iGCxYWjtjNhIy0ZPdtLVoL1NgQMysZAXzCDI7OQOiyVdEjPakb8+cxzzlzhtyH5omPGthZ3ibzHsvbvmkq9Hwoj2GzS+MvzP+vDm8YADuSfI/yAHgFpz+DNn/GQLMo54SRJza75dj0Mf4da+tTu61ht+EbmzImOTbwq9fePj1XcCyTNeEwXMcBrilaZntxQrmecNgpwl/fWctyAChZBJMuqeYljHK9HzO8sVQyrLllYE6HE++yrd6zA6bCIDUJj54VjFllZEeDexBClw8ZwlcWO0FT/58SXWBGrIxjEM6cjNm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vSjqzZenMlFQlFPz8pA4jBydVmn6kT+xp8WDrUiTFHnpvUWc+9zCjldoTDnw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Note: this commit is badly broken. Only here for discussion. Configurations with ARCH_NO_PREEMPT support preempt_count, but might not be tested well enough under PREEMPTION to support it might not be demarcating the necessary non-preemptible sections. One way to handle this is by limiting them to PREEMPT_NONE mode, not doing any tick enforcement and limiting preemption to happen only at user boundary. Unfortunately, this is only a partial solution because eager rescheduling could still happen (say, due to RCU wanting an expedited quiescent period.) And, because we do not trust the preempt_count accounting, this would mean preemption inside an unmarked critical section. I suppose we could disable that (say by selecting PREEMPTION=n), but then the only avenue for driving scheduling between kernel contexts (when there is no ongoing userspace work) would be explicit calls to schedule(). Signed-off-by: Ankur Arora --- kernel/sched/core.c | 12 ++++++++++-- kernel/sched/features.h | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 3fa78e8afb7d..bf5df2b866df 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1059,6 +1059,14 @@ void __resched_curr(struct rq *rq, resched_t rs) trace_sched_wake_idle_without_ipi(cpu); } +#ifndef CONFIG_ARCH_NO_PREEMPT +#define force_preempt() sched_feat(FORCE_PREEMPT) +#define preempt_priority() sched_feat(PREEMPT_PRIORITY) +#else +#define force_preempt() false +#define preempt_priority() false +#endif + /* * resched_curr - mark rq's current task 'to be rescheduled' eagerly * or lazily according to the current policy. @@ -1084,7 +1092,7 @@ void resched_curr(struct rq *rq, bool above) resched_t rs = RESCHED_lazy; int context; - if (sched_feat(FORCE_PREEMPT) || + if (force_preempt() || (rq->curr->sched_class == &idle_sched_class)) { rs = RESCHED_eager; goto resched; @@ -1115,7 +1123,7 @@ void resched_curr(struct rq *rq, bool above) goto resched; } - if (sched_feat(PREEMPT_PRIORITY) && above) + if (preempt_priority() && above) rs = RESCHED_eager; resched: diff --git a/kernel/sched/features.h b/kernel/sched/features.h index 9bf30732b03f..2575d018b181 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -90,6 +90,12 @@ SCHED_FEAT(LATENCY_WARN, false) SCHED_FEAT(HZ_BW, true) +#ifndef CONFIG_ARCH_NO_PREEMPT +/* + * Architectures with CONFIG_ARCH_NO_PREEMPT cannot safely preempt. + * So even though they enable CONFIG_PREEMPTION, they never have the + * option to dynamically switch preemption models. + */ #if defined(CONFIG_PREEMPT) SCHED_FEAT(FORCE_PREEMPT, true) SCHED_FEAT(PREEMPT_PRIORITY, true) @@ -100,3 +106,4 @@ SCHED_FEAT(PREEMPT_PRIORITY, true) SCHED_FEAT(FORCE_PREEMPT, false) SCHED_FEAT(PREEMPT_PRIORITY, false) #endif +#endif From patchwork Tue Nov 7 21:57:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1357C4332F for ; Tue, 7 Nov 2023 22:00:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4877F8D0086; Tue, 7 Nov 2023 17:00:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4415F8D007C; Tue, 7 Nov 2023 17:00:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23C398D0086; Tue, 7 Nov 2023 17:00:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0C8298D007C for ; Tue, 7 Nov 2023 17:00:30 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D79F01A0A29 for ; Tue, 7 Nov 2023 22:00:29 +0000 (UTC) X-FDA: 81432527778.16.57B336E Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 656701C001C for ; Tue, 7 Nov 2023 22:00:26 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=mNUEa5TA; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=VSjkTLWl; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf21.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394426; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TL9Y5NXwSCMqi0BI//p47SGdWVHhaQ0lKLdpboL8OGw=; b=XlzJhaZ+KvGbPBd0ybaoFnyGcCReyiinMagrrbzfUWhsXVWsL7z37AS2v4EHrDWnO7/+YM 8+L8G5ydnus6Fe34VTd9RP4f5lLoSsFiRPWUohJH5K04HlHIjXGhOyhJkzvFaJnhAilNdp Avj1+QI8Zv15p78bHhYntJBHysPyGPE= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=mNUEa5TA; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=VSjkTLWl; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf21.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394426; a=rsa-sha256; cv=pass; b=HCTV7shk1h3j/dMEeF2o15Ov1sRavxmDpVtTnW5mnyeC3EYNShDJdKGdWVfyyC6ngY9GoV QkTb/ZbaSjDBdUX+VkQ/j88VWbuEOncs3Eu32o7YjuWxzKHyLLDvGsRnwTOglAJvUcSIlW Kn0rG4F6HVrsQuUPX7unr6fxSG/IpjA= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJlqW020689; Tue, 7 Nov 2023 22:00:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=TL9Y5NXwSCMqi0BI//p47SGdWVHhaQ0lKLdpboL8OGw=; b=mNUEa5TAVzY0bj5EOAiWB249Dou783hnE+xe6Zxz3PG7UShwgi6WN3y7l7X6yIsY27nn rk8hqkHNINip4Pgtphez8y6Ttt3F9Dmrt94fnejtYrQhNYx0d3bclcSAtdpY+yONfflT S2DX/A9KDIHcr93SvSXVwkSWl4yDE9x3DRAsepMPGthZBlwPWED9O3IyeKyuDwHNo66t eeqYndZiezWoLzLWjFKB66KBobKF67a/MUvwz0qvtWZfoFuU4d2V7QLj5W+6vblmxIlX oT3HDL0LuPKj4wxCSYvHk86FbiUb4KwmQjlWXwyArwsbM1GWC/iFwSezbx3q/ihqPx1s zA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202te-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:06 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPCQ023844; Tue, 7 Nov 2023 22:00:06 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w241h5j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NXMfU0ZagE4G9WOkLHFJmd1zK02ubqIRrkwwNdC0RvftyMHQ8RMTwZjSbyGYvA8hpV0Ur/efuqWhJZUWWwzPzh/muwP4CyJcHnz12UY2uXfaT6VBpjQ78TWwKAq/bMG0MPssEJII2kGU3SWtlw/lVsaOXzdg+dcxbK0VWf5sqhHxlCiQyph/8Q+/gUyHw+oU9XxIpq35wWy02TXfRZ0uG9vTDzH7IAgFS3hbzwvUghX5XDbX+ShwfW9fQGEmJjY/8gUvuz84Q05BAvWIvG9MfdEzr5iDnpPzr9ks5gQTwHfOVMYjDT5hTMG5Lf0EYCAx2wLO81kCoNrfs/D51a8JNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=TL9Y5NXwSCMqi0BI//p47SGdWVHhaQ0lKLdpboL8OGw=; b=Taf4cwtO5jIImO5NsIpIY7RRnVc2Y6bYhHyT+BpEOGeEfrBT4mN6BKnsm4/xqCDC994oAQuJ/Meo7DWNx5+rc68K0y9Diud49yMaZIXXoL0wqAO11nQjiT7Sc3Px9TQAsGJwEbHKUZxpBgD64vy4JD5VrsD/9g5M11rnxfhYNI46G9lQVqK9QCx2C09s7hIHi05h0XDk8eQonXtxZbmaXCfNZyxtzOP8IjQBqDOQwEAf1RefPYYzFjMG/+g149R6Rk7LpqHuL/HnqbIvh7c+5YHsfk46q22a2VpUoEzWkzd4Acie357p28i9SzUo3+Eog6TVt2okWf8DivGgTrWYIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TL9Y5NXwSCMqi0BI//p47SGdWVHhaQ0lKLdpboL8OGw=; b=VSjkTLWl5qdacBTDVSYXqqNWOAucE9qtYtdrsgkdYR0hRoFAytrZeTZF2jqjuVyiOShE8QAVGiSWFD73DVR6oftcB+utM8pyja/2FpRhG2uKVlnIWrsyXSWCU7Dw6kCcFAOZWoV4O/paCBeeFHroxuF7aprvIBQ5QOEtWGf0Jj0= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 22:00:03 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:03 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 46/86] tracing: handle lazy resched Date: Tue, 7 Nov 2023 13:57:32 -0800 Message-Id: <20231107215742.363031-47-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0166.namprd04.prod.outlook.com (2603:10b6:303:85::21) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: e3ed8a25-892e-4e5b-4775-08dbdfdce553 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a+qTY7CEvksFhXIfZLZky7YuaZ6TziQ5lT0AFZpQJS/XzVkvuONKNfX6IYJS6jXqRkzSLVIeeP2ZZmHZaLwEs3fEXJKYlCCwQcWdk7VPzmUPzM9Im9CK47+aCIgb4RSMl7pchzflK/I/OzXXfhWFgVjSVpmii2CgS7c3DM45GmMmyHgBC0BI2BOEVrnVr8wOyJdJynQbnxXD7iDaSQJmxPTlq92AszaucFqfOm6dx91iXpAb+JHTGFx1r3j5o79U7sty9UtDJ1xWTpMNEdLHsoCDaoCObcjvYI9uTvH4E0O4veIQBDDTT6xVvxGxe80EIZgXrVLt0lp5bU40qJ2V7CQgBzijGcMHyM71AHvm+ZwuLfA/4xLNZHxC4/DkFz0YSKo5XdZOcOY2gO2re86lHWht1qks+aoJh5HiOvwYQNKG1cDheTVabH+sY/AGueFEBLXCjHO8nHDLUZ2rWyTQrEEVObxOz2wMd6ciyt/CL9YdGvoVumCdDWiyXk/I2DXApTUE9QcQgOORJMMVPRZjxDHf9udwIeTZ84K4a5ZLLO2r6n8MP+wFXo7NhI3RG7Mp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uT9LT8XwLzIIDFJsATxV1SF1/urYoJVmWGzaAs5FTmjD/Zz2gOXTAcyFI5oBAWnRs7zAMcShiMmGIiJyyOb12VpQkyWIcmavGkJrx4wH6Gl29wUXaexFeH+80G5fXbDBxIrIUSODQ9WlS1cCXCVcCqnS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qw9+skOlLkvxW/39ZtQkAEImo3cloSRrr2kKfheRvCNByfy0SVTO2DIEwPYSpXvcd+wYkFp57EgYvOZ+UxW34qTJb32Z+6Cq9BPVnUQi6+K9TtMl1vOEJt50vRzssVwQ1yBouHOqvF25/NlRMQtHqbullKkIj5H3JjxlzMnL3V6sHpPr0Ty2kg4y05Fc+FGyVT2Gdk4s/Dt0cqob7jdF94tzdtt8iMmCPOPRzHUDnitfdTXhiR87fV3dK96HcunSKwYUWO6khXPZwnLaaf0imcN1Tfn3xCHjof3zWu8pQ0gs+EgB/5XXWrOz9oMD9LwojpfEgQP9BqZHDxb6qA+FF1AVx4AvzCX9+R3gVvSbkhqXpHXe2bvqZGHL+51iO+zyVHDP+r3BRIajunr/6U8Dffk2XtyV02rJn2ysefxWGxG/b7pqKyqy94lJlhdGmw6MASXaOQlbucALRaMxJrwoZtQ1zl64TF0e1TUatw4R8nby8qe4x8UkcYT1O+B1xaeAc8s4ql/zzgaS25GQySKpfvFIK7r4R37mrFeINES1+YyhQPBkKDLbuU77+KGLQIncz4V2EViFugQxIKNxmvdbCU678qFSa0qZb28JRaAYrQrFAlbgL0bkRufBHMBti6cOvIwveluPXMVbhD8Mh70T6IxoM9aRjDssRpzLw14h/NJfrLZwbQl0a3YLnGSe7gGDm46Kb+ZiBgCKQ+K21fcCs01sgdwqLALrFm4qYJIF2M73JBpbG9xznLmdQfgdpJyOKnvnwUVFF0GG2dproCkO/Xfjd0CmDPe82us8ZCTYy9eECQ4kjBDqXF0JaDT360sTDcLfXKEb+x88o2NRBgrwQPfGeGqMik9A9yzYXUYgJHzoHkHa7x1dnOx6TYMrjBP/fyxmtd3+JzRDw7IZzTlfYPAI7HOC9gNzZU2khclg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3ed8a25-892e-4e5b-4775-08dbdfdce553 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:03.7480 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CuafOF+VBNOf8GeBvpXBOw6jiPMQAWUf8otUirFvHF4LZgh1EDTArsLNpEsOxMkpre/pBj6Yu6Jyqnr8YskFqO3vIl65BWfvzzKmVGvOY94= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=917 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: h7Iw9HUP9j2GXRr1hlT9Nq8L98UxWFWY X-Proofpoint-ORIG-GUID: h7Iw9HUP9j2GXRr1hlT9Nq8L98UxWFWY X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 656701C001C X-Stat-Signature: he88p8msoa9uqcwgetbhfmzykyw99nt1 X-HE-Tag: 1699394426-333250 X-HE-Meta: U2FsdGVkX18I6vo9h9SB/9OGUZV97WaMv4am1qf+T5G0tpM08tBwmjlWnEBezL1rq30QSBEVLnw98Ppbhzu7Dmd/ZIQwOQEcSNMH+zX9WRSneocyJucB37A8JYh19M4/V/PT0bkN7rI2XaNIUONL3rIQJbfYGIMct0dU/Ih1xk6fd9vDH+TS9JpG5MpO0pbzwcRqHIjnnbt5LRAthBLpT78PZQkoLJSul1ZAL1TMnRHkRPlQCV0HIEANnw4/Vzuad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H84mO3fCUdNG46AcXG4WK0f1rSuBvwg1sDBC/9yLEmY8OhWp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Tracing support. Note: this is quite incomplete. Originally-by: Thomas Gleixner Signed-off-by: Ankur Arora --- include/linux/trace_events.h | 6 +++--- kernel/trace/trace.c | 2 ++ kernel/trace/trace_output.c | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 21ae37e49319..355d25d5e398 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -178,7 +178,7 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); enum trace_flag_type { TRACE_FLAG_IRQS_OFF = 0x01, - TRACE_FLAG_IRQS_NOSUPPORT = 0x02, + TRACE_FLAG_NEED_RESCHED_LAZY = 0x02, TRACE_FLAG_NEED_RESCHED = 0x04, TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10, @@ -205,11 +205,11 @@ static inline unsigned int tracing_gen_ctx(void) static inline unsigned int tracing_gen_ctx_flags(unsigned long irqflags) { - return tracing_gen_ctx_irq_test(TRACE_FLAG_IRQS_NOSUPPORT); + return tracing_gen_ctx_irq_test(0); } static inline unsigned int tracing_gen_ctx(void) { - return tracing_gen_ctx_irq_test(TRACE_FLAG_IRQS_NOSUPPORT); + return tracing_gen_ctx_irq_test(0); } #endif diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 7f067ad9cf50..0776dba32c2d 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2722,6 +2722,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) if (tif_need_resched(RESCHED_eager)) trace_flags |= TRACE_FLAG_NEED_RESCHED; + if (tif_need_resched(RESCHED_lazy)) + trace_flags |= TRACE_FLAG_NEED_RESCHED_LAZY; if (test_preempt_need_resched()) trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index db575094c498..c251a44ad8ac 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -460,17 +460,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) (entry->flags & TRACE_FLAG_IRQS_OFF && bh_off) ? 'D' : (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : bh_off ? 'b' : - (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? 'X' : + !IS_ENABLED(CONFIG_TRACE_IRQFLAGS_SUPPORT) ? 'X' : '.'; - switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | + switch (entry->flags & (TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED)) { + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: + need_resched = 'B'; + break; case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_PREEMPT_RESCHED: need_resched = 'N'; break; + case TRACE_FLAG_NEED_RESCHED_LAZY | TRACE_FLAG_PREEMPT_RESCHED: + need_resched = 'L'; + break; + case TRACE_FLAG_NEED_RESCHED | TRACE_FLAG_NEED_RESCHED_LAZY: + need_resched = 'b'; + break; case TRACE_FLAG_NEED_RESCHED: need_resched = 'n'; break; + case TRACE_FLAG_NEED_RESCHED_LAZY: + need_resched = 'l'; + break; case TRACE_FLAG_PREEMPT_RESCHED: need_resched = 'p'; break; From patchwork Tue Nov 7 21:57:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E538C4332F for ; Tue, 7 Nov 2023 22:00:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3C87A8D0087; Tue, 7 Nov 2023 17:00:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 373428D007C; Tue, 7 Nov 2023 17:00:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0642B8D0087; Tue, 7 Nov 2023 17:00:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E67D58D007C for ; Tue, 7 Nov 2023 17:00:44 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id BD1EA160B42 for ; Tue, 7 Nov 2023 22:00:44 +0000 (UTC) X-FDA: 81432528408.16.CD4F48A Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 2038480023 for ; Tue, 7 Nov 2023 22:00:39 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=1EkMhJVr; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=d84mPyk+; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf02.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394440; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zMJzLbouFyv2RVTsLsfrlR2gP3yXNftDrwME+78WkYc=; b=hFq5bZFM20XdIl5R7OxJCu4/mCyXFX1gC1q2K04P9BrL2vY5VTcA3ciz9goACKoAnep8Ld mhxNU7duJ0g6WpvH6mExUCTQcpTO99A47Aa6I8zS3qosaY5vidU+hFRoRP+z3ScD02djr9 OHMebnjOOLDz8OlW2hTh5uyGJWZhojU= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=1EkMhJVr; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=d84mPyk+; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf02.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394440; a=rsa-sha256; cv=pass; b=Qda2Qk51v+7LSsky/kuKdFMzIj8x0ZVqH4WTYKROcToNKwdp7KbtuOYzOM1NwzHrDQMBJB Mdwvqv3Tg6wr5duSZghOXmMe59JcxKdCa8yE4fkwC0AXiVDo22c6V2WdfZTfgGbKrP0IZV G24jGdejLcbmFjq0RzEZeajvj1+oGUQ= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpqk020714; Tue, 7 Nov 2023 22:00:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=zMJzLbouFyv2RVTsLsfrlR2gP3yXNftDrwME+78WkYc=; b=1EkMhJVrfl+oOjerPpslH1agBGduW8LBW/Ab7svAdk7OMXqqInFgVNcAuUkVDPuiPqsp rk+1mA36BrvIWfIt0QDhjYZNqKHQtvsClnK4/ZAji1xfr2BsIc3zZZWfs9zIFEoYG8b+ +8y8dYzDm1GIHw2tHZv71xRuN2/sYIECASQjuS8QtfIUAvU+1IoSCwrBehnwiM9PNJgB 12ZTV+RygOUYUpsnKpv9wTTIeklO/eJLiyZEETcrRBvp506gYQuZYWt2Ci67b64hRRHC ofNCueFGyLIBLELbO5fAThrTdX9FLkpv6xRN1lghDP6SLh64fHx1XoYKHzx9lhsGRg8E uA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202tg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:09 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIlPk000377; Tue, 7 Nov 2023 22:00:08 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2041.outbound.protection.outlook.com [104.47.51.41]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1v9kns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jjZpnUoQDQyrVKi2yDq5PMUFal/ooiKVRV3J9N3+iwbo59IYRoZG58+4tQLQZ0qkOTyJNS5HTlTZSybCkD4Zb0wZav41huAE9ZmobzMwluYHbQ1ZPbZoy9hnlO53HWS0mVfaK8FmWS9kGSFQBVkBGMlxbRzcZ3LWCLerBaJyxdyyaCARf4BXZQ4le6jstq5Pf5Fl0IwB7IRp7kWPfD1pCg2urM0TPdHwRFbVYuUYh4S5d4lJeWC0NCVcOCrux24B/63couPKMlcxZQpnjroirI/NDZbQEuLKb+kPcB98CktZmKFgn9uX++KhL9ewFcWZboiuCFWFWzY8dFg/t9V5YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zMJzLbouFyv2RVTsLsfrlR2gP3yXNftDrwME+78WkYc=; b=ebl17F7OVaXwzvitsucNuLOF7rviudOBTTCbk3ED2zqaxFwuStGI0CbZZCP6XBk4sE+gXOpw/q2FRuEzn12Mii8wAcq9Ags8NurnRct+Yl2Wd9C+I07+gcA6bshB50R/oYyKcIZdBLGfbwGaU5SbXR2tcEjXhVCQXZVUk7CGFUHbzMzVO7NhztOdPpP8cb8NoXYeTXmKLA2Sp4E+/H3ntwO0ae2sEA+CJdwcKci3TDOTXvwRzyp4ikWb9jcJ8DEwkAZeg/26nnz+1EvaWF7FkuvtRrRLDXSUg2ueVjfFvKqbfjVRryyl19W75/D04oJXAYZousJW2klfZBBZdKubKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zMJzLbouFyv2RVTsLsfrlR2gP3yXNftDrwME+78WkYc=; b=d84mPyk+SzBo0CIOALdxMJA9BhCiyv+dWkiSmCHxnIKfyAjCPELMx1bOyO1962UMCYHv2LeZ9ybHNRv2pvakPBnl8LOTA1vqEFW8hBN8/56Z30vwYo/jCTsspmybGJizQpF45Pi4rop2ZiRQqmlJyjXGm830sc1NYmfr+LUVl/s= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 22:00:05 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:05 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Simon Horman , Julian Anastasov , Alexei Starovoitov , Daniel Borkmann Subject: [RFC PATCH 47/86] rcu: select PREEMPT_RCU if PREEMPT Date: Tue, 7 Nov 2023 13:57:33 -0800 Message-Id: <20231107215742.363031-48-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0216.namprd04.prod.outlook.com (2603:10b6:303:87::11) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: c088578e-4d52-43e0-a1dc-08dbdfdce66c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rMAyWi9vE0v+U517cz8ezNXG+pl7lH41P/aQbw3Q2GlkWTtGD8zXGrsZt/m3wQRZ6A08nLwGKGBCqfsrtAJzntPdI0GgnOpCe4NQxhjBRcTjvUE03HhTaXcMYnX8SBiKgNcRE2QlX3MENuHLZII8Io5TrzM+qyhD5rAlZ7irqwTigFR5QupHY2q/7BMFu/cSWmncJwtj8X6CoiGlPc9Jkze81UFXR+CZp5/dLLWOwyAU0nrPncKIftnBiqzZqy/WrJYQ7tM5k7L3uSM+BSBd27QT50UsanZHUOOzMEAnt2duE566nmk5VTv3uu1YLRPjzkxH5qVqVSttC3kZSTkCoeL9/dGSiXx1oZu+Z9PHpSUdpKviMz4kITZjvfxgxFywATKzJoGVSpu8EmigdDtijUuT8FymQ1QA0BZllNJkRYyjJp6cD6uK6H3PtPNIg5c8pNmh+L+jME26kea9XRZ5ROAN/ClpjQ9Nq5zCKIbgsEp5+UmGrbfn6WCU2jDPqO8HGfYxf7Us1tzXP6Kms6pLnC0iE9CHEVHMjO9W0Ttzm1Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(54906003)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(2616005)(966005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y/40kaPQWY9wtQOOs4mWd35ZNpUXsiiJaB5ALcXbFVZMfR60ROMC+r3yi0sto/rDIQBT3W1hhlRIUgT0aAAmTBaauMU3dtr6cDax3IpuG3AzRMMyrpRImj1ibT+F9eHQuupdz+cmAiAY4gmmuTMBwSdJJYGJyMOtPgAmmPoOOYliXDGWJK4iRh/xucwdV8OJ94D+Rhx0zjAM+BHrr00x+/2b1sdtm6mJ22TYGQ4tfhEFqJUSjxL23uQtXimz4K7GLfQn4EhgeakNxsEHZ16F5wAeGRRXr/Dh2me7vwsZ+nPdOVmI37T8tVxbBP26e8PkAvL+gF1DtIhwoX8tfUXDJ7DwBhWaOMdW4DntmP4ekyFbKKWiTBGLrpwSrP6ZsJd3b0KmTqZ3CBIfGK9HPSbSaFGti+sAIpvM+rWsvfHnMHlptBrZZEE42ccSNhLYc2CDQGjIRrTMlbBdDCOtoPgEv//4p4J7bkR/BTrQ8fr/WYxNvEH2wwjfXCGMqPeju+t96hAWDg4grsTno6tm6OwLNSdWaDUyMES2to2dYHklMHoKbsW9QiUG+k1JVPvBI4jJ6HbxiKa52YFvG9G95UwiSxTgujfxgGUwr71c8RAdN8D3RiqUJvxk+0V8QmCTM1TMUw1BHKwpFjxtNK/g6Nu8YB/joqLVfGryBemZW3r9yHkhUyWjXVWaSY8JI27Li9W/7gWzdBkbUfDv2gV/U+BXPb//e/SA/m5Kzb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Bbo0NEayHPHOqAanX7EvnHoZKkwsmyVST0jwzej83gYRLLXgdE0VOkzvSNfiOz1nxTV5F0lnJRwz5sCogg9rVjQysY4DtXxnUxqaHhYDsRVEpkwFSmk49lDg4+0DaaICso/gT09fxfKwC5zXj68J7lgebPiI7ZZBxjDC1YIb8r2mik95jrLRc1PuY5zxAcVDt5wv6BCpLX12iiTclLyuuKCp2QBTgcq4KAMuxW+Exx/Sd0yOXl/sa2UZL1oyy9yFLpmmYHouiX/Ayb/Yesu0Jqg4jr4xvRZ/kfvprRheUvowTiGgu+jlNT4Dyin3Y9yeu+oNHsbbHr2bZkX+Jmca3GE2EQ6/OhO9rcqkn3ikSbPQNxvUn/RKhtBYAqPpMCK0eJ6H8f1E6JYaQ9DmJunEWYzKo18HNSZp6944rKimtLBjk2q4rJUjtmU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c088578e-4d52-43e0-a1dc-08dbdfdce66c X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:05.6166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jegKBUH+FfAh+SAaKqZON/nvITRnAIVz+D06dE8BecvzPzhtAq5yIeM0oNFyLxielW5VvHHsrFPPq2QODw3SXYasenXQlAHyMtxD8EV3KIY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: hEL5cTwxOZyib5HOyaMQchY1SdatqtAM X-Proofpoint-ORIG-GUID: hEL5cTwxOZyib5HOyaMQchY1SdatqtAM X-Rspamd-Queue-Id: 2038480023 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: bcj6n3g3a3esstwwp3b58gbsp5f6jxj9 X-HE-Tag: 1699394439-359347 X-HE-Meta: U2FsdGVkX19AX/63u7niCL5PdFS+H4FAeUZEMXw2DUddTaKgmPbr4iesw5XU6iSTw0Fz5q5yWtTwbVC65g97a41sJdljHatc4fjTVP5vd35Ri/pXIDk7Yw4hTw2H7SLUKBV2SFW5Vxg3LYFgWLIqv3UNUyylL/gPptW5GZTWjLTZUtFBiVOYlsCtPG2mNPjKh1BwOn1OAhxenBq/zvTmKsXt69w5JbG1L4VJ9bNpP9rWVtCBvsVPD1K8c3S0sm1Yy2EeJxNrWSEjCbk0lnm+XWVzikGx4KdeNouCm6DFXE7Nih82BFtsrsvew2hHOivrljO0nnrXDJJVva3Dr1iTN3Q6SyS+TCknJGG5VHA6D2FLRgTWvMKtZIEboDfxhyGD0l0JGZd+Ol0df7XP4qraIR8aZ4jeeFuel/JxCoprZb4B70IHi76yCOEXcMrPIb5T5JDFNNNRYknXNLkkSFrDCXPTKpE4PyLFnDLcVKLqtHhyLnwHUBWR+/hTbbKe1Ovp1h+k2DiyTA7p8oJQinG5Fsr6DZ0Kv5IpV2rF3i7sReu3Yo7HvtqRI9Wq4TnR5b/gmiatzLN85Oz5A64056+a1+CGXxVYl9WWg/t4w91to0sCGU5+Tpew4FdD93CoFOlDbXQPCCGMsNqrIUcnNBpx4EntdGd45tep5Cu9lFcjgHqBNvTWyqAKlyo/diqnwEFudTMJOo5euZVSoiL8O70/zSlEQ6tpbM3//Qvv+MZUsA/VoT/OFcpUKWdQkIaqYFDY7sfuV5BScoHF4T/HKltwkJoFD+4aYqekLnV2YUUWAnmwHj+lhG1+ErPx6/DpdGfzxU96dZNCXD0qnM8xBbRACUyhSBKlc8zWyyQFBEMIFPLisxtHwPU9gNfuZgDissgVtI7GlsO1qVX2hXrlSgq9fWHgmY9CMnHAgd47f2CJVkHp48a6PQiCxNUTSSY8DHS4cmd5qZtqRVZ8dPM9TIc /NrcXpjA t4ISfi53hTbVNZhGhA7kU7coGeTv4X2xoHYRGP2oOcBTJFM8WU4BjIcxuV3O6EfKF8r6bGXCd17h0brbbWEXJ5AaNqkjEGKfdIrbx1RsfJfoVwcN2MgD0K+A1O7Gaihkrwv4eIMEHpuNwRM6SvwcF7e8mdy/XFFKotAcZ20ZHyFG94/sLWQVSTgKCYTU84bVc8RwdcJNYavzGQ3qENuOsV3JJUKc41RXvn6y2f1IaJ7sVK/6+9IkyTPqhc+S4kAX5eZlP7S9ro7ls4Ki1qrtfqTbnDkHeVFrYvplJzlVOL9H6XggCPfQedx1x7vipsQKLHIPyS6yW9HwL86zRITdU6qHOqMadQWhUnaNPi9a7TyWmZA0olL1kuhPH9hoq73eDK+5HP+sQ7xo80AM/O5KJCejKGN85GqLHI5+vzlpmf4Pm2CFVaCEVaRiYyM92TVt7PAyn7MbO9HHzzahjuWnsvVd0sPU+HK+fjOZdxF1Pkb0ZvoaDoBTNVgVxgvcJYXoGy8e7DWcL8rBKQmcwLk9/UnjoaD7KsfqZHGp32yWofqPUIET+DnXc6Px3vwH2MpFHShyRm0z8ehtr3lHT6Zb419Hi45VO9B0hy5f0R0rOmFUbC6WpmedEY0qlfHwdXZjF7q09yk15nekWZ0FWtxXMjjFHpb2WsBGjkwuo3HHEYY5s6zVFTH+4hXEyjqNZ27Z/wrJfjuJEtXUxcBE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: With PREEMPTION being always-on, some configurations might prefer the stronger forward-progress guarantees provided by PREEMPT_RCU=n as compared to PREEMPT_RCU=y. So, select PREEMPT_RCU=n for PREEMPT_VOLUNTARY and PREEMPT_NONE and enabling PREEMPT_RCU=y for PREEMPT or PREEMPT_RT. Note that the preemption model can be changed at runtime (modulo configurations with ARCH_NO_PREEMPT), but the RCU configuration is statically compiled. Cc: Simon Horman Cc: Julian Anastasov Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrew Morton Signed-off-by: Ankur Arora --- CC-note: Paul had flagged some code that might be impacted with the proposed RCU changes: 1. My guess is that the IPVS_EST_TICK_CHAINS heuristic remains unchanged, but I must defer to the include/net/ip_vs.h people. 2. I need to check with the BPF folks on the BPF verifier's definition of BTF_ID(func, rcu_read_unlock_strict). 3. I must defer to others on the mm/pgtable-generic.c file's #ifdef that depends on CONFIG_PREEMPT_RCU. Detailed here: https://lore.kernel.org/lkml/a375674b-de27-4965-a4bf-e0679229e28e@paulmck-laptop/ --- include/linux/rcutree.h | 2 +- kernel/rcu/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 126f6b418f6a..75aaa6294421 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h @@ -104,7 +104,7 @@ extern int rcu_scheduler_active; void rcu_end_inkernel_boot(void); bool rcu_inkernel_boot_has_ended(void); bool rcu_is_watching(void); -#ifndef CONFIG_PREEMPTION +#ifndef CONFIG_PREEMPT void rcu_all_qs(void); #endif diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig index bdd7eadb33d8..a808cb29ab7c 100644 --- a/kernel/rcu/Kconfig +++ b/kernel/rcu/Kconfig @@ -18,7 +18,7 @@ config TREE_RCU config PREEMPT_RCU bool - default y if PREEMPTION + default y if PREEMPT || PREEMPT_RT select TREE_RCU help This option selects the RCU implementation that is @@ -31,7 +31,7 @@ config PREEMPT_RCU config TINY_RCU bool - default y if !PREEMPTION && !SMP + default y if !PREEMPT && !SMP help This option selects the RCU implementation that is designed for UP systems from which real-time response From patchwork Tue Nov 7 21:57:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C894C4167D for ; Tue, 7 Nov 2023 22:00:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C76DB8D0088; Tue, 7 Nov 2023 17:00:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C23C68D007C; Tue, 7 Nov 2023 17:00:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2AC38D0088; Tue, 7 Nov 2023 17:00:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8C61F8D007C for ; Tue, 7 Nov 2023 17:00:51 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6491C80388 for ; Tue, 7 Nov 2023 22:00:51 +0000 (UTC) X-FDA: 81432528702.25.DDEE7E9 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf24.hostedemail.com (Postfix) with ESMTP id CC73118002F for ; Tue, 7 Nov 2023 22:00:47 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=uZ1ERk38; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Xd5gTbJd; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394448; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yWPCiZxYn64BBGU9hVy0zBTR2Q9Cw9JMNreM2MaUTDs=; b=FzPtT8j5oMLYcg/xQoCddZo28/ONo1d8e4u2sdi78/aUm37pftfzkfr+AZLHqU65qjSdAX 14c999pgR7o2/T9WjZztjts/K3WNs7V8CLtm/WnqXnaDgZgHg8ljFdX/dcHAIqsbM/679d vABkeM8B/VVVHYnfhd7x0od8t/C1vzk= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=uZ1ERk38; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Xd5gTbJd; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394448; a=rsa-sha256; cv=pass; b=AtvJjFy8M9iKCzDmQMxn65ySgO3SpleabeuGWoOVGJMp+IJf342orcDjAwGfjGXQZ22f86 nHpBkxFrK7PxSI3HXAZzIQEi6Z0qJf7EAW9y/rRhD2rKBVvZ81hgbrg2KfBYdD0tS+r4Zr xjW+EykaKYbT3Dnf2LtypX9rRVDz7Lc= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJLaC028111; Tue, 7 Nov 2023 22:00:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=yWPCiZxYn64BBGU9hVy0zBTR2Q9Cw9JMNreM2MaUTDs=; b=uZ1ERk38/99URZZ5LYv10DESAlQ23yaO2R8ecq7LvbQtQk5K2GLNznjwRdIh18mSlckK nvtH11r5DDJZW8iHD5/ZfN5GHV1IEXvRj/YFVQJ7iSntAnif516CaTq4cwx8ZdnTJX5f BBf5FYW5UxEJUM33yrm8R6vrYei2ltdWGTsQlY8Ug7VVvC4DVtLHHy4MYiUDNG2O2VIu X6YL9rcEbO2Bs7Tnvq4N+O6PPItgF3mL1NK9k4UrQlV1QLPIlRhgz4TEWVGH8YVHJXaM DjxnHLIRbL3pOyDs+AmvWOqNAbUzf5Ktgn6bAY4cbeLXUzHhrJ7xQSKNmZ0gJhE+77Ua 0Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2302da-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:24 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgdM011085; Tue, 7 Nov 2023 22:00:23 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tskeh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gKQ3q33yP9U+zqfaYVizMqdEYtYdlWsOFTwhytGWrtcQvqLH/pFI8IwlDgGGqicgO33xJoK5R7y4MgWjTU1Ezp/E/IDHG4Ui5rcHmDRHHFW7GAqu1lRYq55JrQzG8IMo75eHrxe/9q76mMg7HUJSENgoY9iygiq7vvAr/fa0XJ3xS7I2XtSrFtLXU73Zt5ev9O5zSRw8Nc3dN5r/1ssuy2G/RD8li17U2YYY85dfSI4cwe7UWHotmgdH4S6+OwltTIGb9P2H7mhOUl+Wk38Vs1XZWi14sVdORnL8BHu1ATqByzD0zFa5MxYZXxf5fVqZujWzlyasAlYPfdWejbZL6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=yWPCiZxYn64BBGU9hVy0zBTR2Q9Cw9JMNreM2MaUTDs=; b=g1XoODtMWKXxLz7hHAPl/MlVteMx8Lhqfgf6LEMVsyZ2te/R1+p5lWGzyRszXBs934z/VvgA/GqdmgucsaH0VNjD6e3cMC1nVdDZrPXwcoyGtCQl1oBEkdUR6aML6yTrIm/4/wTIPt1aiJrm/uAgBBv+GbI/TD6TJJ33Bl2XSJ7UyUgXVOJgiNEo8VQdiKO6lbr8wKKbNXQHd8gKq5fJiQtRa+VygfPhJDM2NcT/r0YuRyG/vfsV9DYyVLNQ54xeDWEkV4C9QaIip1G1H4m6mcSTFyKYUMF37SSCdi+z/aPPOl89sMbBW3X/N1gIzbP1yefAfZAdLNcwhyJDnGv3Lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yWPCiZxYn64BBGU9hVy0zBTR2Q9Cw9JMNreM2MaUTDs=; b=Xd5gTbJdXrjIoxcE55BCItx/P/1FmTCTymG2z3l4Y9GK1UlKb/V7gR4KtiW99lXYQPA3z7IsLbyqGi5NetFaCRWDGhz6jRzkQHTekFPlCX2cpNOznLMOKN3uT+JZrDt0OXbETHdEcHsSS5+k8w1zUYnXKDGgqRWPlrSo0GJiTvk= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 22:00:10 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:10 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 48/86] rcu: handle quiescent states for PREEMPT_RCU=n Date: Tue, 7 Nov 2023 13:57:34 -0800 Message-Id: <20231107215742.363031-49-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0308.namprd03.prod.outlook.com (2603:10b6:303:dd::13) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: e6b8597a-d11e-4e11-a035-08dbdfdce967 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pE+vNLVbtC+hhLa2LbqKbkDTmGtgLzkN0Y4OHg0UQEG6pFYnyEyGNG6JCIGv+X13VvX6aG4M/rROZt7ueE3GXP1rq43zu31nFHNELQwVgwY8finHUrb7/diVLbsEHAfpXoJmU0UFhO/np9RinRyJi4sw04H+nK05M5ASFbJ8DBH7D9voGQ24d9W/WFdorVnyHXV2B9s3lwyuHuzv9LcSJ+PzYxSuSajl4Iuo/zfLe7SvSMLkDkMs9I4p1dsegBehGOGCTJwbpnNCd7LJOHOZq4QElywvV77e8rO66SwYpfFDCYcPVvRQcypbFpxmgdym2KPxOTHWq7EmtmjmEgXOt/qr8aS/sDEMmlw9njfKrvU/6RCUBz0Yv5I7+BhWUmzNK4eyHt3dl0tlR/EstKHlrMwK9M7oRa1uqEvHoN0EwmKDEvKwJE0nfZ+sOwWGDoKzLX20I9C2bfX23cWCK0FQbhJJR4MQIRaZalsaMUkZINcE1yQ4qC02ZiqCRg1bgwnitAeP0OYXUUp83EPZHU0vsHQqi1CR30Iw+mA/x0meMI7GTgIrMxY2Ppx512UEMdz+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vqpclBl4VsapYuC3eD2uatxqeYPpHELfP62WR2qcANQwT1rE2QF2VICHSS8RGOzJDseBAEp4WIZtnmXCGOa8pzj6ysEkDg/i4Ag53OmcIKZ2Ql4bU5reyDbaae40qktgSqp9ssenL6m5a3m5NO1TC1kqpvJFdTfWt6vw3CfQ6tpi/6yLwo31SL5FVgIiimNlkbT60Rn8/4rhZnfHPD/UX8Lc0W87mSXScNmK6Jz32oWobluLBy4/f+09CkNFPAt+wWnecPUDgj0YhhMGPNMYe4fH5RcZz7c+NA0p2fYwZMeL4ioDyqCQaJ37URuFlvhjiDjlhLDiWgwiQPG+Gcm2kt9/vrU4Dr6axL5UyGNhTUKP5/KitqQ4jTG0YxiWafkBRkOIbBr68MNjiVnZ/OKjCFvvyDEtM1ySBuGkg0+XmnfZeED/8wtkMn4A5SiOLP27Ag0UIxAY9VlkdWZqA01xZ+yscJWcm84pX1bUB8jxRn5Aow7PFNqBtjBCr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F2jnmzE62zc3cKzIvUMM1zyz758gsd8Z70lPefeRTG5XMieXU7E2dPDL3rvEblrEWUtKH36K0N/Fmd5W/pX9DNWYvCoP0w/suJW7+O/nGAIy72FATy7Dpdu14Li16RXAoGkLVp/k5gOoEcRC4gqx6GVHT7EHhx3qgP+HssLzqdJGr8w+3Pxcm3rZiEoqXK2QkE5/3vBZpGnDAh1EqK//nnxlMRN6I2Eo83QxTN3djdnJMpWe7De2nv6v0PDygBMZXIN/LVokNzTsmpaAPDZQjyV1mdbexRB6eh90hLu//bPTpU39s5Gg9fc2Vp0JA/u7sXrnquxgL3uxMKP/lbZdJjmZ/Vwop0L9h8AxtSDGRtWuAU40IGYFNDxiHgEpRQWUlcFxPa3CeVRZ92yVW7u/u+ebX9b0DiMfHVlq5WuAjpnv6gU2Z84yrQqJhjTSk84vqHxpvbFngdC6bwSQbXewTj3qlSh/aQq21NW4MXRSQ42BMN1fI7u4j2fJOAwNwwdYDqfTzhJPrk9MSwwBZym4CSJ5J5vN3HeLXdA7mk/TfO/HY1k/ZQBGJHAenn6F3eq/2RcNEkEjLg+rNEMd1ArfHZMFLOa0c1dFjig== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6b8597a-d11e-4e11-a035-08dbdfdce967 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:10.6261 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: soL3MN/jDK6mPZQ9dciYTHAzOtsz300cRhBbkXd+UJele+63v3Nm60qBh61AzXZWYLDr+EROaU+sHxJQnBn9PQxrV8w/Ux8EKvzG9Uoy+F4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=817 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: OjjEIw7rfFh7J34Km8p3BEoymEXglLjZ X-Proofpoint-ORIG-GUID: OjjEIw7rfFh7J34Km8p3BEoymEXglLjZ X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CC73118002F X-Stat-Signature: nwqkqpngefz8xof16cktwd36krwts4m8 X-Rspam-User: X-HE-Tag: 1699394447-177179 X-HE-Meta: U2FsdGVkX18ZRhren1xr5yjC3J81Ezwfm2F9ijkYGWCgJsZhk5a/KQrOCQ3tZCE08lQDIFJBl0XIpEZVebzmlu1EDxaptm+sjiVvZ1cA1ACJeELxOvAz54MvDCvwdRLh9hjv5Qby3cpQ+KtAJgFE9FpsS1Eiz5tMJilEQ8+bpa7u4wXiUQYN7ZQ7ACCE9UJ1l5zq9zifHhXaxhc4sz4mGmq8acxoX+A5OSZMIh0FOFvYOPs693895g1Nds5PWk31iFaLo07ppoVT7W7ITHDYp3S+xnmlWYh4r+967wv+WfJS0scyrWB6t+tMHTTHBtggo7ON/Qo4UZ4aMG72rYSiVViZyA61UQ2FzW29oqVBmmhneg0Dj1qRgMilt1SLK02+z21mSQ0jcOM7AO4iXSXX7+KY6QCxWfJdNeK1OJ/FZgO9jgPZd2MWZPeo5OAJg6lwXHIJ5uUwiXcvs36vFTx2Z4nLF/CGC0McY3VQn2wZUePt8KDAM/w8o8QRFcrW8t3ZTHQmdGoskT9i1kAoJMFcMoV8Cqb0gfKsnjZp+oHoB+EKxVTFQ1BZz/h5cXidgeBa7KeDhvUz+9wNloqnFsXVs6gQzes4t5SShE6HstvEjoTq1YApYk0bDcO8zTWeLcxBJ5votNX+wRBofLmLqwnpJFr/SZy8yHYXj25/z3s8L2RCrwFEBWkt76gt8WFlGwpQma4tiHWzG7HAjmwSPhOP/7mCqS2ZyzZgG7z4LV3VigRUdrtfnGIK2ihGGuXCjAE1AxM09d8+4r2NdPoQP51gaTNRYp7zhYURFVNhOWH906tOrPQBocOCgy5KAFMS0vIX1yWAnIk2lfKSEV12RrNmFLiK0bq62NhE+TEzpTDofgZQXee+sC9VyCafR8qLdGMqauE9hJTlMUebOGu8zEbkSEPMWvYLutclYp5clFsMo2pAB6M/aB6P9/BlaJHVatsBW3ssmWpPVF418oHTFT9 4W65xnB6 qXOhhfkFdyzfxwfbdlOEOyexG0t8kz9dgqc3t5VMPC1Q5HdlanN54XYrHCGxsW8b31PPsVkKyJkjLT/SAziCpW9E3fFlbMZuBgys9sK6ilQs1owEevWXnS0N/fnEHbhzLRlKtF9yztCKY5XmrgJVeJOWN8oF6F+kYMUZVWsiz6+9WB+z8JUNJ3/wfo1ljgciB1oBQfVkLg8wGt2aak8pZpLjcIRiTeQz6HJMtRgex88s2/bnMWSX/2GrykQ0I5b/gnCpEm4u5/bVc+Nicmyw2An7/+ydt2g2i/hIPFvbSvfiGRw7+ypFNyxlsLws7XEDsjT3VoFwbfE8zSAU18IPsBa1psMKssJoCO/hqcz/Oo9taRjMTNjmT6NujaGMSdHe1/xgG89bUHzfwyoKup6XJMnsxWgRvRRTPFoinc31igHGIdU3ioJpMPWajgxqZrrfcHUBqknGkj9o5Qf0YUjfDL3kEcwT0w+9OoEkZUgmtmExUMiY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: cond_resched() is used to provide urgent quiescent states for read-side critical sections on PREEMPT_RCU=n configurations. This was necessary because lacking preempt_count, there was no way for the tick handler to know if we were executing in RCU read-side critical section or not. An always-on CONFIG_PREEMPT_COUNT, however, allows the tick to reliably report quiescent states. Accordingly, evaluate preempt_count() based quiescence in rcu_flavor_sched_clock_irq(). Suggested-by: Paul E. McKenney Signed-off-by: Ankur Arora --- kernel/rcu/tree_plugin.h | 3 ++- kernel/sched/core.c | 15 +-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index f87191e008ff..618f055f8028 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -963,7 +963,8 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp) */ static void rcu_flavor_sched_clock_irq(int user) { - if (user || rcu_is_cpu_rrupt_from_idle()) { + if (user || rcu_is_cpu_rrupt_from_idle() || + !(preempt_count() & (PREEMPT_MASK | SOFTIRQ_MASK))) { /* * Get here if this CPU took its interrupt from user diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bf5df2b866df..15db5fb7acc7 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8588,20 +8588,7 @@ int __sched _cond_resched(void) preempt_schedule_common(); return 1; } - /* - * In preemptible kernels, ->rcu_read_lock_nesting tells the tick - * whether the current CPU is in an RCU read-side critical section, - * so the tick can report quiescent states even for CPUs looping - * in kernel context. In contrast, in non-preemptible kernels, - * RCU readers leave no in-memory hints, which means that CPU-bound - * processes executing in kernel context might never report an - * RCU quiescent state. Therefore, the following code causes - * cond_resched() to report a quiescent state, but only when RCU - * is in urgent need of one. - */ -#ifndef CONFIG_PREEMPT_RCU - rcu_all_qs(); -#endif + return 0; } EXPORT_SYMBOL(_cond_resched); From patchwork Tue Nov 7 21:57:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF251C4332F for ; Tue, 7 Nov 2023 22:00:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6AAC28D008A; Tue, 7 Nov 2023 17:00:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 632D08D0089; Tue, 7 Nov 2023 17:00:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40F008D008A; Tue, 7 Nov 2023 17:00:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2563B8D007C for ; Tue, 7 Nov 2023 17:00:52 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EF7A3120B5F for ; Tue, 7 Nov 2023 22:00:51 +0000 (UTC) X-FDA: 81432528702.12.BEDB720 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf11.hostedemail.com (Postfix) with ESMTP id 79F984002C for ; Tue, 7 Nov 2023 22:00:48 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=4D8I1DjX; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IQDsXQXy; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394448; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zDfCfQkBw91mMW+9GuR7IRCns/x7hsQuyMEDUgeK+cA=; b=bIVFFZEZQrkyDM0m94rAgSchbhTvJogWe4GlZK5p6khi47oMd15YBolQqhA0jAoZGuie2C 2jKPW2xSrVlPsJ4sDPv6O+3FDszLZG2+JQPSL4d6m5ICvIcsA8RtEEclBqdBpe+lILzcQ3 wryfZ3EClEMQYtIJkggJ55jCu1MSypE= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=4D8I1DjX; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IQDsXQXy; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394448; a=rsa-sha256; cv=pass; b=zpEcI/TZNhGjiRVh+/h0TKU5jc2+JCkHXUpjYGZAnIJiV7igpUnUN8ut+E5qNqt7WbZAGN ukNOHTlgnoPfL5DnSY3+ApOZMHbY5M5H6+QIrAOfh86ygXA6oVd52TX8a0R3QbDb0shc7p YJiAxldMXYsyp7Zwt+QrMY4XFy0O4uo= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJODJ032058; Tue, 7 Nov 2023 22:00:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=zDfCfQkBw91mMW+9GuR7IRCns/x7hsQuyMEDUgeK+cA=; b=4D8I1DjXpEzbQZh1jI+cEY5H+JZdhmkqaB+ACgPQbe5d+zCu/dLuCxWX+nV2v4UqZkNn 5cLymAGpp/jl3e5pBUQl1lak+G2lycXlWASLGUAU1poKOiyllL9JwxkEP7pOrVTmQwBD FHQuo0GaqrqGPQPbMTOY8nVmGhU05ZV0mdGjz70PpqKGFyLqx80JPE3o76ik7w+55cne mDbQYU5gU8dv1+TZNYILRf1xwBv4qPtskDQPSqFYMACPYp6BK3EAHIQNtC5Ky+4vPeiM +nG6yjJSim/rwEspNnHpiUitcwHdMXSLOKgn15yp9h+FYdxJdfzxsKyTkJ1rDBDoeuCt hw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2e3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:25 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgdP011085; Tue, 7 Nov 2023 22:00:25 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tskeh-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V//QWaNdgNCMusgw/N6DBKGpNQx4N+Ln6N4YsJEOMN86bQMOMI/OsnwXoFWz64j3izIDLJ6892W5HxTNVJlAINYRyO4DVV/4k91FdSzSpmUklRccBOcEaCe7gWWQyX/nKBdzxIXiyYKjpLH8QhOx6xGsYRMxEBd518MUfD4LHlhauXaUDz7cKcAeKQ+0eoXJFA+X8AIfgeiO3CjVjQrGIAuXtLf8PxymmzsiQc0aasEjjeVSlsUTgdXjIhtTAeOOsDIY5htBz62KomknIFP+Bq/gckzfMlp61DvEcRpdpeMa5ISmYMsXHvxZtfLIQNjbPnDFt1bg1LadoXXPWSo7cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zDfCfQkBw91mMW+9GuR7IRCns/x7hsQuyMEDUgeK+cA=; b=UHfsfFlBrdTq6jvn5L/SN3ogmAicyUHeJ8fzu9TC+XjfdlMrCnE32JFv/0pC6IE7tFo5jyV1VsYxX417gTNmOB81Gs1hDCYkqiGZwFqHTuShbHZ9kl6t24bTS5JMIQ9+VBDWrilUImeWjkZAXuoZ3+czyYKAszXmPJ4UB0+DqBJCXtJO5kU2fdYT0+tL0sLBnkWW2aLhnDJ0nhk+alxhSwfoNUmvAolwLTYlKJEqa6lgLr3mZweTNOZOhboAVcJ7iy0FPP3KJQ1tenzuyT+CxsRmXIMir17wK27vkNhb554NaVEeuISMRfBN6hH497wSVkljpvRR25TvgbdVrCDbdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zDfCfQkBw91mMW+9GuR7IRCns/x7hsQuyMEDUgeK+cA=; b=IQDsXQXy6l3cyFd+yLaMBcOTrYlWB7MJbmdoTwPMjo61nLf53VfTC+UO591OQnLnRaEWRzxgieGFLG5Lgrjm3GRRSHegwtbSBhvdEwR6/9kSNkEkDB/25fJBnjiQRHddTrsuh9k+3OPIwWSE/g9pGNDLKu+IOS4roos0uEEHnMw= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 22:00:12 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:12 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 49/86] osnoise: handle quiescent states directly Date: Tue, 7 Nov 2023 13:57:35 -0800 Message-Id: <20231107215742.363031-50-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0022.namprd16.prod.outlook.com (2603:10b6:907::35) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f1c91d6-2397-45e6-5d39-08dbdfdcea83 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ku2vLMvqT6icIo+TmTby658ia+Cb7UAJlP27rT68Tl/vp0lNKftuImsAPSiLB8kci9bIt+c4Sb00XQfZx+BhxrhvsDXkY0QuEiIdv1ziaTeY1VMMpa6lFtHeyl5wQmzJabvW8cFmFKHJxzamRSzHkA/ThnBWvl/gUYb5Pw2XFvBjbqw5uE/XQ4Z3xah73VgZt875fSe0d7XljhzBRzVI7kWqxsPxQOrIWqtmL/5QTXr0F1D2AkGiVGZsLiJmuUqbEbBRrB5YbE2cu7VvpuklFFS0eNTNfPK+14necc4uCGu9ABLnH/8ABmDh1jdzl/FI8mYihbB/sv42l3ioJGyd0l9iJKqMM6nTQB2AdYZUtw7BuBXYF2jwgN1CjX8C45eQycyQI+yY4zX2n4bvDq5AhWmAOplsVmbwGnLsWRNTAtZiD0uv2xRoTX8cMokyvb78ofuLKg0orL0V66r38kHKcB/tmgnt9gaiA5kIUGPXmy0h6gF8kv2P60CPDoSD2gHuYeR2vxdvGASq6M+qcMwUT4SCRPrTI8w2C/kIkrWMJthcwDsZn1GLucahhNDIuHyN X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4jUepuOGANNnWeRN3G68t8KHuNMBZkUZpcV3SCUskMWm7ClCJ2zlkBCGK5vpfzXcz/MJmpQ8alunrhKLZk3rjOF4GKTT8RGrKH0QM0/eeFu1unaLdWP8x7p1x8xhaEm/KMkrhCzluPgjjk85EBMPij+sQ4lDj/mn21KwbkQpAfWwg2aivQ+6M9tSTDscYasDLrOv8L4Ro2vDA6oSYhEVSCn04rXj6yIP8/QsMFoXOotCpHYmvY6d+I20M9QIwe7pqq5bG9BAk2RvrYJRbWXoOdAab1o36a+G4czq2YdZ6ubYu2/6u/mr1f8rBiU674qyYHk7/Zj8d5xZKY4SZQWEtEoKIvtxlwg4iIs6WgZrEVuKJOJID/rwR3q6Vps0bGEOm5PUIM4Ee9EFMEXqJiLlL6LHPDpJnUrMS0ng3xgQ2llPqPw177uiIpyQ4PoxykgHnVGPcv59I2hxFHv4Q3wc7rGhTqo4TJMW0C4ubOW3bHIthkqmnHLzHJuNU2wbtrPtbTAjCLCrHSIkzhL0Kcg8WYRVdHfzNuQ0r3p/wOcTDEcquGUNXL2PdL2KQUhFGKZg1VeQihiVeZB5E3XNpUOJ1YObEk71rQRXqydiypqT1OXHrW9/QTZBYaMk127OR+OIBQjAVzFjTVB9fsgU4sLz8hcNx5cCkSj8AjV1RCjxtQIgW2K6L8JznTr1qW41dp8jxeofih25UK8CW9gLZPsnGPczdW7x0tNTf0bDN6UnefCdJVwvXzdx+ijz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zqLR8pLZXNtokG5oTJz0gtX9mXv0yVSW0oCKqif3UlSU6vtzV6N/CRtau4cDBN26QJT/VnvIIxsw2tiO5JRGaIDoqsxTkPyX0H/kJ/Z/2B3QYDGZG/+uc3ilPy0fjH5AWW/TPS2E6cUYDqZRId0Vh1/DI/Buxb/RwiA4btLxtN13+2ujrcsrYpVF0uihX+aJi7OF59hI1LDqjUejZK/FX5j2y3yBRKLr31lqGcrCj0cNrNTKgBg48g0AMTytTqwrrd63jqzOtJS6rFZNZ0V/Zz62jC8vUbUGWEWHQ5IU0prJ8hHJv47/xePy8HF3V8fcV5Flw0GxHVkRfJRX5UdyIPc1A== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f1c91d6-2397-45e6-5d39-08dbdfdcea83 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:12.4762 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SD0lmxQN5N3TJJBD8IxgJ5H5vey+MMYHjlMBrGtc4F9Ij0bnbU0G2tWdku63U07pPxgLd+LX6/9XZKCBZPACAsXRy08LCDks3wn+qzrMI5c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=802 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: JWHRUvapECFaZw5SWt8zlEiJOnvpQH91 X-Proofpoint-GUID: JWHRUvapECFaZw5SWt8zlEiJOnvpQH91 X-Rspamd-Queue-Id: 79F984002C X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 6gy1k7ynqtdcobtfsd6h6u4ib6gbkjin X-HE-Tag: 1699394448-402565 X-HE-Meta: U2FsdGVkX18cBLcPZkwqj9+JvFw2kosa3gKnLA+WKbmMhlR/gBfX+kBRJVRNUHr8xWyXECT1F2oLHib6AVftF+v8ATfKvEU6IU2qaoxu61rvvXo64/s7gfUVCL2b6bF/7X+r8H2lbp/PDNN6rJcGm8zbmWVYSHPanVLOB18V15AvSHA7/e+KiyWWkiP0aSVvgspy1d7P2FmdDmLQCJl85lZ0ooW3OrZ/s4wms7InEO02Gbf1SN3dHew9dMjSZA8o/UkHQ6NUMR7VRzdXAlcLq0cHjFlnZlVQAEmG9IjBSdyxa0GgZM0HQFs63vdHN3C9oc5QxrW8pdfVP6qGbF2c0qFFypiL9syekRa8lUfoYtElLdRbPnIXhW3EThjHgyVbW7EkWysxeHj+VMA1jJSFk/Op6dC2LdYkhERLX7Zt0nw+Q3zDBMGAnvi7YWkEAhVWsJNOcOnhZJx5TKpRb8YIVO3MSWNRVcH0Ro17h8h3sxhiegLTnYerF0CNhV/ArvmuUDC1HalziSJ7xhhKJ6zNxuvoGC+upEhtrFwSwfAtsNDAy8sdgP1fkJmqi29Yu9zwaEsA1QXIKYCuomTPf0LVVUe0aKoagNySHK0xckFn5EG+RW52Xijf8IfZ+CKZQAQrdEF7mIVcT6xGsZklijryhpXQlbhqnqrEnN+DL4q/0GPLNJ023DeBBIAkzRRWLpH5jv+q7oGpwrXyBJZprX3/OCn5YOQCyIRnofJu2BZobsJgblx6DFVZ/usD4pTLPb+vf+lHVByZUTPewUqq3mfKCMg8Uurz/0QsNm75tqc45EX5ZQ6NQ4OnC2G78r4lPFd9Hp8TfNMKCzgWr10EOEfVJDKsguiPWKB6RSX9GNPeG03sdG/dqEQTTNdMtFQL79AK8OsF4BbCwB3v6ixt3cJYROTp08B8Ckx5x0kEf7T26j1Zml6eCk80gS6SA5BJQkOW4IWNbOC7utsB04vVJLo /fLlrES9 AB8mJLrMwKr7Ur4TkwuXHCoJqNXJiME1XoozhozgVESfKYaWlft4rW7l2lnP9ORwV2M4qGKnkk14gk4YUPJ0va0LajASAUcSrkl2rEmY0aHLKimTRMyG0U8+k8n0szBpHQPR7Osgq6yOKWlQSlZOuQ8UQYt9xOx7afoe8HNYCUFZuPm3aDFptafRPVpDZtKsf45lVQomsQViMMv1mfnkEO/88AXFF/21ayKi1kHInZXUeq0pprWBqYPcxMJ1wV/xQ9qiwAKP8/Y3A4j+lFsxM4bJuD37UKFfkRmBVJ+R1w0aTeUgUZ3J7MQXid3A7SMMKgQbeSZI1STH995sGskxfNEYvUHoBhDfVno1R8pm9bECu373nHDhtWGEgOaFS0XhMt+LA0mFqOkdWz43SWaRnFHPuqRo4z39pguaMo1yvuyhY5u8zn5/cBj/3Nn6Fi00mHIowBl7ziLmB7sxqirAmOoizxQ4F7V7cvb97 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: To reduce RCU noise for the stopped tick case we introduce explicit quiescent states for PREEMPT_RCU=y, and depend on cond_resched() (and thus rcu_all_qs()) to handle PREEMPT_RCU=n. With cond_resched() going away, introduce explicit quiescent states for all configurations. Suggested-by: Paul E. McKenney Signed-off-by: Ankur Arora --- kernel/trace/trace_osnoise.c | 37 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index bd0d01d00fb9..db38934c4242 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -1531,34 +1531,21 @@ static int run_osnoise(void) /* * In some cases, notably when running on a nohz_full CPU with - * a stopped tick PREEMPT_RCU has no way to account for QSs. - * This will eventually cause unwarranted noise as PREEMPT_RCU - * will force preemption as the means of ending the current - * grace period. We avoid this problem by calling - * rcu_momentary_dyntick_idle(), which performs a zero duration - * EQS allowing PREEMPT_RCU to end the current grace period. - * This call shouldn't be wrapped inside an RCU critical - * section. - * - * Note that in non PREEMPT_RCU kernels QSs are handled through - * cond_resched() + * a stopped tick RCU has no way to account for QSs. This will + * eventually cause unwarranted noise as RCU forces preemption + * as the means of ending the current grace period. + * We avoid this problem by calling rcu_momentary_dyntick_idle(), + * which performs a zero duration EQS allowing RCU to end the + * current grace period. This call shouldn't be wrapped inside + * an RCU critical section. */ - if (IS_ENABLED(CONFIG_PREEMPT_RCU)) { - if (!disable_irq) - local_irq_disable(); + if (!disable_irq) + local_irq_disable(); - rcu_momentary_dyntick_idle(); + rcu_momentary_dyntick_idle(); - if (!disable_irq) - local_irq_enable(); - } - - /* - * For the non-preemptive kernel config: let threads runs, if - * they so wish, unless set not do to so. - */ - if (!disable_irq && !disable_preemption) - cond_resched(); + if (!disable_irq) + local_irq_enable(); last_sample = sample; last_int_count = int_count; From patchwork Tue Nov 7 21:57:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86651C4332F for ; Tue, 7 Nov 2023 22:01:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0DC928D0089; Tue, 7 Nov 2023 17:00:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 068108D008C; Tue, 7 Nov 2023 17:00:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D836E8D0089; Tue, 7 Nov 2023 17:00:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C19E78D008C for ; Tue, 7 Nov 2023 17:00:53 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8B6FC120B58 for ; Tue, 7 Nov 2023 22:00:53 +0000 (UTC) X-FDA: 81432528786.11.99F6E04 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf13.hostedemail.com (Postfix) with ESMTP id 256BF20028 for ; Tue, 7 Nov 2023 22:00:49 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=2p1Mugt3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ga8lMrZ7; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394450; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=e/s78Q0cIAeUu7C8BHyZikkXhbxwwbevLSilCf+E3nM=; b=N1cqH6o4Rqj5Y7DXNljrKfom5xMLptRQiBAiHkFzvGiN3KOyfmIZeXavp0S2iDmbPCyIjM 0/xW2nEb9GKhavXKhRywcZxNuXtRD3gDObJeMB3PhUTM/0ikc7ANyO32jKZAWe9HlPCEZW aHAWiPubL238J1dEGhd9ZBQIRdFqnUc= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=2p1Mugt3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ga8lMrZ7; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394450; a=rsa-sha256; cv=pass; b=MPg6WIdPvIWio1FXzmdAYVxSFzUSZaPcgZnnhHEsl1jPzcMrlKIEI1uK8oeygDuJDuJ2E4 HJAxTBO2cyjGyex1/Z6D/aPRAmI8OTtQfV4iwR8GK3QOlwlRnr6p0zbTRUQyODAaRjGrVj uweTMVg+p5poQQzm5ENld3PkZpamnKg= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJQ9H014468; Tue, 7 Nov 2023 22:00:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=e/s78Q0cIAeUu7C8BHyZikkXhbxwwbevLSilCf+E3nM=; b=2p1Mugt3V654BvWLhjjk3KRjMWyBEBuo8JB2k/UTUPl7nISU2k0LyBh1OcOTtI4HUbe6 vjBXSRKYSSK83gCceyC2MK/uGeFoOCML/oV82ZJgCLF6kg973/zvGQNwhQAWC1JqQGHK 7zMrIFUm41pU8g6DXljD0V4YnxQKSx1oMokCch1juhdjzzq3yhWjA2qBZbX+wykdiPJS vSZ3BzVrcheALNNw3yUUtF7niHcR2c1NV58tBmPm5MsVET5lNwaxX2kVf3VcmIueBQSt B2HRpBhvqWhcEl3YJ3o+cr5vWKBwCbRyTLtO0N/YUZkjaJq+CpkRif4/kj7RjzhuoJhb UA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2fp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:27 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgdR011085; Tue, 7 Nov 2023 22:00:26 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tskeh-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RzSFR0T5iVurd8peUNAs2roUn7IlkEDJJd0p+0Mop2gcH5gra/4F8Z20SbNMcrZdU+rPxDdabFsSBMnrAnW+gsiheLO8gU7L1LkSIUAwXyS63LL5OGap3ObYTCQP7MW6Ijl8DxdNU48FXKXPbGEf0CE2lbb3qO9tOVw8vSNVS97a7BIV72HbIQgDe/fz6rzosr6SBfzVUi/7vsxqMdRXuK1CPd96Qb4Y2WN5RO75Rl24P2gllZzhTMCUUUGrA8ABTjMY3fuAAMOAPnD2evuc//3NBPyk0AxVkj8kcPUEps5bhGNRKaheOP9ApPfmpetwX38lm7suxWiWG8K/IDBzCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=e/s78Q0cIAeUu7C8BHyZikkXhbxwwbevLSilCf+E3nM=; b=beFkGc6dwpQ6ck2tv8dcaM8f4LpTLpnq6hyadw0Hoynt1ZIKzvseuy1wQpQKTFApLrG2Gx2dbY7+yftaPsxymRadsSBh/+CoBdwJx5pu/5TnJh+4XiO8sn7BXox6NAsVBzbbLoQ/ffsLgz3H/RX82WA6wvyalmZGyTePfJT0DHSOfM9I5WAhnYgflrcrQxNO0C81wxTDJAE/G1DU/4UxUNh8s28B9Hwr2omFWZXcJzD3xThWVXFGjqJ91/WM+SLthY1cNCd8dd3e+LHYjBDnzxMdYNRWU6PFZahhv/Lnk/O1NuENoJzLoNKFnLo1TSSmfJaRoa7pwNmA1/0jYVa0rA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e/s78Q0cIAeUu7C8BHyZikkXhbxwwbevLSilCf+E3nM=; b=ga8lMrZ7taDnOZQHksofO1/LFnnn9thKl2y7Fe5v8Zh3Ggy41y+5yAfSvTOxrB6NnvMyDSSCSBdzptJYXgbGzxyEqmorjN8eZ8tj/ZgW3l0cJltqfwfcX4Bz/EKOYfa8aPJtyQSmJRvoI+4YudUdLczLCLNm9UdVkcmjnVtBhLE= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 22:00:15 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:14 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 50/86] rcu: TASKS_RCU does not need to depend on PREEMPTION Date: Tue, 7 Nov 2023 13:57:36 -0800 Message-Id: <20231107215742.363031-51-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0062.namprd03.prod.outlook.com (2603:10b6:303:b6::7) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: 34127c0c-eb61-479f-b627-08dbdfdcebda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t/aEkEkKkiQ52ESldTybzDDLxqrbNI/PpLWzq1Q64sLQIu+EOesrEoNfxp6tYvBIHx3OM/pZYQgDEJW1Ma7s5yXhNuYx4VHpNJLsfCaJJJYMM3dXG8Yo8SdcRGm9IvZh1sP0v88vMQ16aKvwSwHGuQ/EVf/0cVbpS8pnPBBqAv23oZJ2kqZzya+7wAbPKdeoiDyiyqxoREZVa85Mosr4l1M6xj0TpW8xEy4DCt4OgxUZVqQ+4Vq9RAlv1VSADIV9sijSkk1rd83z2VZzKA0Bl/54g4NhLJg8lMqOB8LI0EWG34SHX9sQmkO/dtaMGYhHSpbc04q/xWGAzQyUUvyp3DoAfww/jtq64IpAQU3Bv9/B2aGHVnog8AOTbQ3nO3SvVeo4pjq1/uHoHob2l/jXbEqdfojthpvzBIBZxvOPBMx+sbIChy2GZSXvw+wBapZ0x2sN0MCK2CqS+ajggoT4U28r59MSkj2vNaFU99FWemAo03fsDXOGuj/TGI8pJHdrEUBDeEGZ6x8TQ7qcP6DrwbPA9a4omZvQm8ObIdGjYLERZWzk4/TZxyE1OOrdY1Ep X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SF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5L18V7eXZ/4kztr4sLskWEa+aHCOLulXP5+rL1IdCDl2DMN1AxQuev2v/9CuhShp/tGtfrkqPQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34127c0c-eb61-479f-b627-08dbdfdcebda X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:14.7199 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1HJhIJHpp7Wwg6oHfU2X97uT0i7UvUC0An0IX5MsFOxStl0i9Wz82NEU3NdajfchC5HzITOwWekBvk6UJ+opxskGpNXXl/7zaYeUcYmw2Ak= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: 8T6UtcZGwHdYg-kln6NIFwyrLLVsOpCQ X-Proofpoint-ORIG-GUID: 8T6UtcZGwHdYg-kln6NIFwyrLLVsOpCQ X-Rspamd-Queue-Id: 256BF20028 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: fj9fer4qa7a4k6jwu355otc97ifpcg5b X-HE-Tag: 1699394449-736390 X-HE-Meta: U2FsdGVkX18ZyPxBIP0pJa6ADYyHl5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gWLggVLrlK/sbO5vVacNewhSirNxGD4BqZJ7Vpy1TO+O5N1JmJUPP13KE/ApXzTRoH9ckdgWlivi/z/1d2i52BGi8HKFS1wg+4s9ia1LxoGRA6LYqmFwzMFU9JAk4GNXtFpi+Yl7D1nlLonPj575MFbpGQnCvv3bITxSebhO83bmLiCAVTqRPkRmwPwPcSbhFkxxr0Wv9AkWu5q3XWNHJ2Vx7dPbCPAEyX66rsst3ohREMCgsvumIm365ZD5eRj/tTHPLHyKDqIgORqd7cdgUAMyw1UeMLstOVAQVp7vec+WlaxbQ+lNiiFy9KfkAcImczR8iWqzYJK1GXIGP1bEeR+zGE5PdCDWMRUp9Z2htUPNTEbMVh7kJhT240biO5Y2M75b6I/Ftlm5/IQYqa5t3cD3b+RVkxAzhmyDJiydIZ05ErDFbioVUmO4ZfuwZ8Uy5RfTo8Qk60XTGyeylBReHYoHUq/Gr8/fgfb8z7yBcoW3ClKolnOqPQ3kDPCb5jzv2EA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: With PREEMPTION being always enabled, we don't need TASKS_RCU to be explicitly conditioned on it. Suggested-by: Paul E. McKenney Signed-off-by: Ankur Arora Reviewed-by: Paul E. McKenney --- arch/Kconfig | 4 ++-- include/linux/rcupdate.h | 4 ---- kernel/bpf/Kconfig | 2 +- kernel/trace/Kconfig | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 05ce60036ecc..f5179b24072c 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -55,7 +55,7 @@ config KPROBES depends on MODULES depends on HAVE_KPROBES select KALLSYMS - select TASKS_RCU if PREEMPTION + select TASKS_RCU help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes @@ -104,7 +104,7 @@ config STATIC_CALL_SELFTEST config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES - select TASKS_RCU if PREEMPTION + select TASKS_RCU config KPROBES_ON_FTRACE def_bool y diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 5e5f920ade90..7246ee602b0b 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -171,10 +171,6 @@ static inline void rcu_nocb_flush_deferred_wakeup(void) { } } while (0) void call_rcu_tasks(struct rcu_head *head, rcu_callback_t func); void synchronize_rcu_tasks(void); -# else -# define rcu_tasks_classic_qs(t, preempt) do { } while (0) -# define call_rcu_tasks call_rcu -# define synchronize_rcu_tasks synchronize_rcu # endif # ifdef CONFIG_TASKS_TRACE_RCU diff --git a/kernel/bpf/Kconfig b/kernel/bpf/Kconfig index 6a906ff93006..e3231b28e2a0 100644 --- a/kernel/bpf/Kconfig +++ b/kernel/bpf/Kconfig @@ -27,7 +27,7 @@ config BPF_SYSCALL bool "Enable bpf() system call" select BPF select IRQ_WORK - select TASKS_RCU if PREEMPTION + select TASKS_RCU select TASKS_TRACE_RCU select BINARY_PRINTF select NET_SOCK_MSG if NET diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 61c541c36596..e090387b1c2d 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -163,7 +163,7 @@ config TRACING select BINARY_PRINTF select EVENT_TRACING select TRACE_CLOCK - select TASKS_RCU if PREEMPTION + select TASKS_RCU config GENERIC_TRACER bool @@ -204,7 +204,7 @@ config FUNCTION_TRACER select GENERIC_TRACER select CONTEXT_SWITCH_TRACER select GLOB - select TASKS_RCU if PREEMPTION + select TASKS_RCU select TASKS_RUDE_RCU help Enable the kernel to trace every kernel function. This is done From patchwork Tue Nov 7 21:57:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D61BC4167B for ; Tue, 7 Nov 2023 22:01:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 87F988D008D; Tue, 7 Nov 2023 17:00:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 82D148D008C; Tue, 7 Nov 2023 17:00:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 631488D008D; Tue, 7 Nov 2023 17:00:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4641E8D008C for ; Tue, 7 Nov 2023 17:00:55 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 1E994A0B55 for ; Tue, 7 Nov 2023 22:00:55 +0000 (UTC) X-FDA: 81432528870.17.23E8E5B Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf05.hostedemail.com (Postfix) with ESMTP id 8F247100029 for ; Tue, 7 Nov 2023 22:00:51 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=0maM7BjR; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=bG4QqHai; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf05.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394451; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2hROQy3T2KGwySSKiDDCRkL0TyqotGIPGYYIK5MOBi8=; b=coNqQmKELYiCSxIZjBGytYwm6bEoKP2enmQafMj3RMlPVU/nQPoSgiSVGF3+gYi9ecgX02 qnLZq+LA/tKue+N6Ic63X3znHGDTKpJhCTll0YQIwp56WHHAiykhsPKLX65l93EvL//WU1 mTN4JZCHDLJjB7FsaK3/MqdoEdyXSqs= ARC-Authentication-Results: i=2; imf05.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=0maM7BjR; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=bG4QqHai; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf05.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394451; a=rsa-sha256; cv=pass; b=F1FUp9I6kbCTkBPDMo020CVHY2RxopIHsJjMBBrk7PLoW6WIHSZASD0ksaP9ulb6ZIzVJH 9yYuQKtan0U032eg6ac4+R+27yr/eK/hFAKH5Ah3mGpwxT3Lg6TM1QFL3i8+3MaqXG6OFd PrmGTidTB1Doz0Erg0twQlXeiO3M/SE= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPwY028640; Tue, 7 Nov 2023 22:00:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=2hROQy3T2KGwySSKiDDCRkL0TyqotGIPGYYIK5MOBi8=; b=0maM7BjR2lf9NyBXEF4SuuHJ0c4Jt7hR9KnfzXOqy8BKtmeoVHi5NGIjmHhDGe9YP4pn 0PZV5tcgRoW43vfqFLEigMUl6JZR7yzeQG2DHBYRbaXlZ9TT8wj5QWHuCGuxLtW2hRwD v62mzibLO6TZ/ZWuioc3YpCLX4HJSz25sykdlZiXxfcUupMNDtDmZuAECAeubKB31MTg 6CuWkFgwL7/qIky3PyWSf1lQR1kSLep9PNJ4qKeBmHTtrxfPuRuZIIQkoX7sPoAaSQOV wJjW8AS4M6/45p/T2eZkzZv8WHtSLI/1T4NOZMRKHKd9lD3aqjaQPEVTwu2zSUVeFdhE +Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2302de-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:29 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIhM4011105; Tue, 7 Nov 2023 22:00:28 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2040.outbound.protection.outlook.com [104.47.51.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsmb8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L0pQM292epIzJFhbgFAAwGyRzx/fpBR25YX7pZRq+Cubk0zutxtI07654cbMtKJnAVDQP8ZBJHA8n0Kc1Y4cXQ8DShITws6lOYQG7YmLVR7+QJf95nRE5PYEluOTjYWDReEwoeJBOZXSAYz9/ndq6CeNYPiuhQOUG+GdibKR+bEBlUlizS/lsyoPJimAVj619F8CgmAJPnjP6HA/YYtfzEyqKb/VbvGhFa/SJBnGjswsNz2RljLruPYRK7Sy7I5D7rrE6j3/oO8axno39jsARtSl7DHUiNeF/A3/u2USJ1X2cHz8aNL+QC8DxtSJEvv0TvZZxlhzrY0oWr8UTXW7pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2hROQy3T2KGwySSKiDDCRkL0TyqotGIPGYYIK5MOBi8=; b=FS2SdSNDBm+kbctJmaQx5O8VGOYmR5AkZ6OMt6e9AfOwTXPs0BULS6EcUtK/oPzeX39PNyIukrBLLWqPtv3Hl4nAihwg7Ajug0XUTpT/Q+IetAO8egbnNsJmGieMta2wEJTK8DAxJhglom21eNKsLQ4dBcduZSheS7m3gzXAs2aBHPfToEgcabRXIwnA11GZdRTnca1OKRDFFKnfnZdEhBAAYwS0eAv7+XZnHv9FycxKTZK+qsaEjnUEtifkPH05e+eyss4BRyX6lu2Chb8J7fpTW7YPHsHRA5aEGjpENi4dPmN9fM6hgvXuupDip11kAwAfSCEwB4lM2qJZN8Or5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2hROQy3T2KGwySSKiDDCRkL0TyqotGIPGYYIK5MOBi8=; b=bG4QqHaiYyafiFtOL7Y9ag5gMMQwc7mY7W8S9hwrZhz6b8JCqnm5GoLwsZ+bsiQWJOR3L6MZMJ4SGJuzmfOOzD3sbPB11VgJ4VLzBrwXImk01J6lYpZtJ4fWPU6WgtuKhhX/Q0J4oByn39oW72E4bvACyTANCxp1HyIGdBTLMfg= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by PH7PR10MB6275.namprd10.prod.outlook.com (2603:10b6:510:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 22:00:20 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:20 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 51/86] preempt: disallow !PREEMPT_COUNT or !PREEMPTION Date: Tue, 7 Nov 2023 13:57:37 -0800 Message-Id: <20231107215742.363031-52-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0236.namprd04.prod.outlook.com (2603:10b6:303:87::31) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|PH7PR10MB6275:EE_ X-MS-Office365-Filtering-Correlation-Id: 6dfa16ba-43e8-48a9-78aa-08dbdfdceef9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kXC+865JkqWtgvRwhCdtjhbUXqOmpSbESQ5kybFO6HO/C5fC2czUOEOFPjyaDO4CoVDg9KRHbNLppPHxdwtxbimVbzO/HzkuidiIFnYjehk55aW5TQ6KxrujKebqpnwZKCydNA33Tego/Z3JPTHGWf74cHduvbNF9DYk9IP51bPpLGuPqahbV3j6yTmk7nWwvaq5DEi3mm0yCPinAyZ31xvAL5RD8CGUnCC70oGsXLLFb1oafieZMWFrvbodRd9IP2CZCNEofKN9tgaJpgZ+5OPA6ZeK8MDR6+v/vE04vkADF8Je8S9FQyJ8+1NyfdxWy2O7cAT5b4Xdi7B4qu3ymvOVh24n+06PckrHP/Af3bJGaAQYomBJeyTA+ZfhV9IP6CN4i8dx2mm1J6DsIJ7LfstP+4aFKbQBesiLwOxPaDFab6hy60QQ8D9tJ+PfDoXbtUBYa7l/SOnwDGLd7FuJOshw13AsaMpEzieKbf3EtUSkch5e80e8Q4NwfjOAHgxQ20z5/hSeEf2vAMeerHpvxmehK5VunycsbN6I2qsCeWNHz2B4seoquD0UvXA9VunM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(66476007)(6666004)(38100700002)(6916009)(6506007)(316002)(66556008)(36756003)(5660300002)(7416002)(7406005)(41300700001)(66946007)(6512007)(103116003)(1076003)(8936002)(8676002)(4326008)(26005)(6486002)(107886003)(2616005)(2906002)(83380400001)(86362001)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bHhcnIASHmV2Jvhem/2ACqML0CZlrq9obSSCtEU4l1p3Bzw2+A4gi5fqD+RGbOOCBd67N1F3uxPgWFhgpvruBBXTvmGbnMyld84QY2ljFx+swi0adXZZh5wU0neU78kvg2ltqXuRkqD0JBUhI7S32i1kTv2MfR+jJz5Wg9PpwhNGCYgSiEyaBvwpGDs1ztBZBWGb/tfYbfza9goJnF35JnfARN2dTHEZZe5ISMtx96GAhnr9YE+12PxmPNq1l/PRtL3Yey4wt15Y5tXrAfuNeOheN8gNyyUreSRrqqMQJ+y86kPJDqmCDjDk50FFpNtz+1XINTqP5DAaJgmHL+xqW8UBAh2sN0th/r7X61cnolnTnuTlJnVpliB/ZcD1NUxBUBriJJsvvL7Ni5WmyHtxabvZJ12WOa9DBmolXqN7AN36jzR1XBPfetFQjdxdmEQ0/I9gVum7J2e4HTMLcwKZjgBmCp60GrLvvwh1rVnc81gI4VouSeSeqyAEIvOqWtDw5WOEsmK9ZRXNa7GQ80e4IWRwFSdD71ZEv3p+ycjRxOaB5KZ6Rm2L8oQwPN8KxZfLNsWcv/DT1VZultCkHyyGiVSykSi8U7bzBJf5HG3sgMyg8Kqjd5QhJ4MdF952Pe1g/yzhBl0evv2oNq0aWarQ0+igiIIHpiIDTq8ayLZjVnmTVXxDo3vOyhTz7eI9EL7Vok9AAMnVFxZ2IW77Pwv8CeqCK1I6ubdGJj2cbzJ6HEip5yvsYpDlUI4MBkbNpjss2eDy5k+HFsaW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5Cry+ypn/qL1gpXgmDV89fKwrqHEVciRDun6FnOqyv14CH0RHgqx/gFBL6qqHo5PrJdkLdL0DuDjmM1QrMdeyHhXqGw72WvhrTtUzjKvg5YEvz72UtKW1N5H0D4mXeGMjFt97vK6wxsIphEcPjN2qQ0+1budvUR0OC42IsfS0vdv9O3LWG0+94vqHWas0rwLnb3IToxQYUO6A3QvP77zMFFWj0zkDKNRflF6UREhaO2glqNvX5s6yFSn1ucImNLUkdEYAMSuNOKiAuYxz1+ifpcxE+pXQiflur/bt0kKwjhFOX7bYJfXHA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6dfa16ba-43e8-48a9-78aa-08dbdfdceef9 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:19.9640 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UJNgn9VEPm25E5E99iWpqs0xWNEyvTUhKQwjrrReNoGB3HMUFMv3ONMnkiitkZWo0I+MAVXT1/fg0rLZ4Y7wxkkq7Z01FawmdaZzmLV9/lQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6275 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=789 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: qWM1VpC8I6hVu-8CvrszkPFyS7xAhbUU X-Proofpoint-ORIG-GUID: qWM1VpC8I6hVu-8CvrszkPFyS7xAhbUU X-Rspam-User: X-Stat-Signature: u3pm6cnskhy1wmtnqdnnxy8p564rapks X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8F247100029 X-HE-Tag: 1699394451-583346 X-HE-Meta: U2FsdGVkX18pCYYsZPj3hqWQyi2d2XKJUy8oUOzX909bio/H4LLoflM1IX/xK4RfYYbNkc6vs9LQi6qYpHvUf/Dmg8kNtzHB3eyP20oQ+ZEUrnjp8FJgDTX9wrOEp1n/kafaczaZlj2Ax3uLblmczZ7Dt8TjEYxW9W0cldXVjxViNC8UVKJGcInw/sJl3nQxSh15egbA348PgvWpLwrJK4DNexMq/71AejDKP7576+VnmAF69uaiLuNcD7MGazMCzO/RB1WCrrxpf+m70AYKifQlP+UdPoyaBdQG0UDhToc9P5m8RBr0Ib+hqhmCIolkuGqJ+IjKkWdVRWTRcObMzq3TjxhKb8QodLgab4gL4/hKZXruiMUWmNgn05DvK45UQ95PEOEogCokpfU0OrgItWAuCjm8k5LqGFCRhO34hM3t8Fh0ug15S0tih8o4iTylCbWwzFtLhqPiwB5J5LZXsMaiESUM2ZZDWRj36OG4heRTK1pFenEiXUJgKjp0pcnLFa+h3S3SjVhbpN2Aq7rU6ir/M+x0pHx7vRO4JjsttyU0hApzKYw6ocK0oUifZt/mBgO6vyY6nLv6dcwYv4WsNH+nE+/N0XvLajkIVSx3KqKVcE4i4OJ8l7/2ydg2GnUfVJd6dZZCILgmLgPx1q0qTBeA4doRvlJ1opZoU/32wX7QO2NJ2yD2wGXMg0W2ggBPPxS+59M1t62Qoc0w5p6ZhBZ0FAVDV58gMF47+2IsF2oDBns6oLl2d8/TTHeZ5pbTZ0MTnpREEJbfs2KvpE5u4l27RSd2EAHZkXOv4n+4CA7vwO1tnmTjbzZeVyretC38OSs1W+wApg09mCD7gEJ1FcMG+OdDcnYR0NpGteZI4knUt2OiI0Syl9GLVGz1KliUBWtpvgBvj5WBmuLeZsheuJOk/prxNuvpza4jBRhYjXMwqnEKgw0FyhCTHGxGS4Tpen3S7ltSgMXImXYYd87 85usOlbo 1kAVh2IgfQeZ62H48LmFOrEJq6C7uN2hjVEMnSvHXkzbDRk/TqadCh/FgfSXnq4R+dM4ah8WyFTjta1dLJCsOtLNrs6Nn1Y84e1BzwVQ6RzozKY4xtx8sbtQQpqd1X9NxJ1UOz9ylr4Tp9fce1Uf0NL0ST7T7jOUJ2GJD/mi/Ch0Lj/NZCn0n3qKA4e+7broB7hT4mI0RtJiae5t1rWN4u9DPxNzXRn/ImGyZKb2JjKyAi5lDZvJjDwDR0ZbuoTLMWSdKbZ5Fv1VZL8BW6nctJ+HwMdIu8A8oyJ0rafth8uJRU0gI3s1wC64MSU2jaGSLJluSUHtsr4v/VUhAVpc+GXzeUsgYYR8qBSOfy1m2i/tWz3p7T6GViHz83nijut6Oq+MZk2w9909sS+3smeLcgdoudYvJOapJ5F65Q7KH2iQSIvUF+KDey6lMhKdsel/8+3DYofEBI5LYpHwCPDsr9tEN46aavFNogHdQYEUMcXGzcKrCY88b5zcaONoCf94DzLY4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: PREEMPT_COUNT and PREEMPTION are selected for all preemption models. Mark configurations which might not have either as invalid. Also stub cond_resched() since we don't actually need it for anything. Signed-off-by: Ankur Arora --- include/linux/kernel.h | 11 ++--------- include/linux/preempt.h | 42 +++-------------------------------------- include/linux/sched.h | 4 +--- 3 files changed, 6 insertions(+), 51 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index cf077cd69643..a48900d8b409 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -95,13 +95,6 @@ struct completion; struct user; -#ifdef CONFIG_PREEMPT_VOLUNTARY -extern int _cond_resched(void); -# define might_resched() _cond_resched() -#else -# define might_resched() do { } while (0) -#endif - #ifdef CONFIG_DEBUG_ATOMIC_SLEEP extern void __might_resched(const char *file, int line, unsigned int offsets); extern void __might_sleep(const char *file, int line); @@ -121,7 +114,7 @@ extern void __cant_migrate(const char *file, int line); * supposed to. */ # define might_sleep() \ - do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) + do { __might_sleep(__FILE__, __LINE__); } while (0) /** * cant_sleep - annotation for functions that cannot sleep * @@ -163,7 +156,7 @@ extern void __cant_migrate(const char *file, int line); static inline void __might_resched(const char *file, int line, unsigned int offsets) { } static inline void __might_sleep(const char *file, int line) { } -# define might_sleep() do { might_resched(); } while (0) +# define might_sleep() do { } while (0) # define cant_sleep() do { } while (0) # define cant_migrate() do { } while (0) # define sched_annotate_sleep() do { } while (0) diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 0abc6a673c41..dc5125b9c36b 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -197,7 +197,9 @@ extern void preempt_count_sub(int val); #define preempt_count_inc() preempt_count_add(1) #define preempt_count_dec() preempt_count_sub(1) -#ifdef CONFIG_PREEMPT_COUNT +#if !defined(CONFIG_PREEMPTION) || !defined(CONFIG_PREEMPT_COUNT) +#error "Configurations with !CONFIG_PREEMPTION or !CONFIG_PREEMPT_COUNT are not supported." +#endif #define preempt_disable() \ do { \ @@ -215,7 +217,6 @@ do { \ #define preemptible() (preempt_count() == 0 && !irqs_disabled()) -#ifdef CONFIG_PREEMPTION #define preempt_enable() \ do { \ barrier(); \ @@ -236,22 +237,6 @@ do { \ __preempt_schedule(); \ } while (0) -#else /* !CONFIG_PREEMPTION */ -#define preempt_enable() \ -do { \ - barrier(); \ - preempt_count_dec(); \ -} while (0) - -#define preempt_enable_notrace() \ -do { \ - barrier(); \ - __preempt_count_dec(); \ -} while (0) - -#define preempt_check_resched() do { } while (0) -#endif /* CONFIG_PREEMPTION */ - #define preempt_disable_notrace() \ do { \ __preempt_count_inc(); \ @@ -264,27 +249,6 @@ do { \ __preempt_count_dec(); \ } while (0) -#else /* !CONFIG_PREEMPT_COUNT */ - -/* - * Even if we don't have any preemption, we need preempt disable/enable - * to be barriers, so that we don't have things like get_user/put_user - * that can cause faults and scheduling migrate into our preempt-protected - * region. - */ -#define preempt_disable() barrier() -#define sched_preempt_enable_no_resched() barrier() -#define preempt_enable_no_resched() barrier() -#define preempt_enable() barrier() -#define preempt_check_resched() do { } while (0) - -#define preempt_disable_notrace() barrier() -#define preempt_enable_no_resched_notrace() barrier() -#define preempt_enable_notrace() barrier() -#define preemptible() 0 - -#endif /* CONFIG_PREEMPT_COUNT */ - #ifdef MODULE /* * Modules have no business playing preemption tricks. diff --git a/include/linux/sched.h b/include/linux/sched.h index 6dd206b2ef50..4dabd9530f98 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2088,9 +2088,7 @@ static inline bool test_tsk_need_resched_any(struct task_struct *tsk) * value indicates whether a reschedule was done in fact. * cond_resched_lock() will drop the spinlock before scheduling, */ -#ifndef CONFIG_PREEMPTION -extern int _cond_resched(void); -#else +#ifdef CONFIG_PREEMPTION static inline int _cond_resched(void) { return 0; } #endif From patchwork Tue Nov 7 21:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03D15C04A92 for ; Tue, 7 Nov 2023 22:01:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2C2F8D008B; Tue, 7 Nov 2023 17:00:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B4FD8D0089; Tue, 7 Nov 2023 17:00:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71C928D008B; Tue, 7 Nov 2023 17:00:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5CE0C8D0089 for ; Tue, 7 Nov 2023 17:00:53 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2894740B4F for ; Tue, 7 Nov 2023 22:00:53 +0000 (UTC) X-FDA: 81432528786.20.DAD3D9A Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf04.hostedemail.com (Postfix) with ESMTP id 912E54002B for ; Tue, 7 Nov 2023 22:00:49 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ois6llJH; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=S9psN0J2; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394449; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NbIG2FDSqQQltjMT80C3mAvHEiZLiM5q+kfnA5OMsx8=; b=bdUfJ8T9BMPvtAJxbu0KJByKqsUmpHbcYdHbPd6nT3y1zBsh0bIfprt0s1Gx61N9XfYuEA MTYOeFCeuK8YJONu7himZSB3SknrEPVALYV5vU9LNSHWssgBRzMGvB/HPNgKiIXCHmGp8O jIRmutyAPIs1BJEtkPfAEFJ5jD3T8mM= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=ois6llJH; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=S9psN0J2; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394449; a=rsa-sha256; cv=pass; b=C/lSiED5z7qcOR632WQ264QOagHV+tXhRqQS96yq721+3CShyhn7597G7CijMkq/XM2Rxb EkWt8PRYCr0x0+ODoarfQUWXRss9DXoI3+WKqCw30xmeppk++Zw26TOPDMR66ta6QYw1lf 2p2U7yjmlWEgeN8t4eIORFtsbpgGfdQ= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJVlY000503; Tue, 7 Nov 2023 22:00:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=NbIG2FDSqQQltjMT80C3mAvHEiZLiM5q+kfnA5OMsx8=; b=ois6llJH2raTDmSBZ+CXcWgGeVmWk44EUp3VYxxxAG/W5zUQ8aNccWOwlmb9LcxOky84 uIxA7MdbqDuBlIV8mDnKYhbGrYlGpcJq368g8Qq05q2kLk8r5lXluXzZ50+8FTlF7ZgE WgkDZ1eN/bgekCNp3AyGFLnRJlGLuE05AbjAz/3BJV0sNnEtpYHjFSgxOgMEfSCFGCl8 b1rR1/3t67C8osHfQeCFhieBAch616DXZx3MTnjIhVYtbLxKu1krwrG35pJww604vMTJ zFYCx+7uuukGft+Z5jxX3iP1omFP9etMoZdZGp//oIUifoUughdak1aex3wh9pjLbWCv JQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2e4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:27 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIhBF011123; Tue, 7 Nov 2023 22:00:26 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsm6c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWGC6s7S3AY8ml3RAjoQFRBhFRm2UDsrMFdFg2Fc/jnjwiy6WNE1Lwt3jBKCiA8qCpHt6yxkrVb/oETjRh9xFVw+Y+PVoCwOHymlXXy1H1+oXzyq7KZS2SGHlUefexCOf2g3RM92ozLmubmTGqpllzw0GOf51VDls2ra312/poJEnP32kaotrTmoNxDsTrF6LvFmUI0jB0c7f3HBxB/ivvun21IWpYmZzbr5xiBak4DKqmAifJ+M/SeTEkInHIuZHPcX/6nR7/9ZGkBoAX2Zb3PdcM2yD+S/t60n3kpCqIgffARCO7ieRMvlwQ9OUb1EtC6EQGXjiEwlLq9DSAhQMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NbIG2FDSqQQltjMT80C3mAvHEiZLiM5q+kfnA5OMsx8=; b=ICcbzu8N+H8AWr0daTK/uAl3vRwiMdxAqyGwJwhV3Wf+r4mmY0XH5iqQtvPrQWEhxu+dr/1xulS9YaK8a0wIGWDNmEeAoTDo4cy7KEgXE38AuC0Ae9s3UpNnewCvvEFpAbOkDU09dJ//cLgdf3+FDdSLNbDuplttfm6n40/CRoO2uucgIgPm39fHLaNXrGh8lRRJlQUIXuBIFio3WH+VKN9lVXi+vk8byfhCd2cpy0QGMFGBrRvrJRw9SQ5MXNtifQDxxBTkYQeFlco7UCAk9gITkHYLLJDjJqkEnofs7VFZvpPbIULOXGbx22CIVEaa8QxSul4M+JYvrrxjnh2pLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NbIG2FDSqQQltjMT80C3mAvHEiZLiM5q+kfnA5OMsx8=; b=S9psN0J2esji4FTbxR20sX3/LmQwI7ZacrH9sfvL7g9SsI8vd3tIq6BWufQ0PNsOMTJfvi/F67+zyl7kjReQ0o13BbrKW2uRcG0newxmA+nj4hjYeBAHlfc5uQNN1r4rTBBa1HpeuKzD1jutBfzcTZknSTybh0KtiHQuZXRNK4Y= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5318.namprd10.prod.outlook.com (2603:10b6:408:126::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 22:00:22 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:22 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 52/86] sched: remove CONFIG_PREEMPTION from *_needbreak() Date: Tue, 7 Nov 2023 13:57:38 -0800 Message-Id: <20231107215742.363031-53-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0240.namprd04.prod.outlook.com (2603:10b6:303:87::35) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5318:EE_ X-MS-Office365-Filtering-Correlation-Id: 4974a968-bfbd-49a4-968c-08dbdfdcf055 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mzgB4nH0iWb1s6QN47JLynQ7vleQBxDwGKRE7IeJNBppH+UJbaih1nOMnYTETkasv+CUOw69383QD7MqD9iIS5FFcWgWn0gcoataeOwL3F8uif/6nVngC2FNu5zPkIh3p0+b3irhItUmRWsM3AbydHHjCXdkqB2unUQWlEsu/U8drPbhZRHgPIlKePOluSVJVPw5t4q02lBBK6WrgXXNOf5mabBXMJjcMrT7Gq6KCTOsQ/fe8bhE7ggdqLdENw07X4KTwjCunjBoFOCbQGLMOe1WjeoCxypagUey0k/qJEbRpKQDzxLzGadyFdXADS/AyC/r9ys8tJJnJKabra6zo7nj2/cx0BLpMHp1RoRMUoyuxtazjrE9iryRW6FlPy9tnUy3JBO+7x2pkE93IJpiFwXk8HAmWJ9pop2c/NRo9SeGMH7y7t8VDfzm6DA8iAcNdQmTvrYFMN38chxP3gvxDoqNUpePmZ1baS74zqXbuPvHQRXV/VRsT9/tdhHj19viuGG6cPMVTmE3lVlUm7kik0CKxAXELbAZTtzWxYUaf8oU8SjtldP/p3mdvLs95Ko3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(39860400002)(346002)(396003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(1076003)(26005)(38100700002)(83380400001)(5660300002)(107886003)(2616005)(6486002)(6506007)(478600001)(6666004)(6512007)(36756003)(316002)(6916009)(66946007)(66556008)(66476007)(8676002)(8936002)(4326008)(7416002)(86362001)(7406005)(2906002)(103116003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RFycjcMrMVMxy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FbgPc5tTnxYtqeA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4974a968-bfbd-49a4-968c-08dbdfdcf055 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:22.2710 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1qBAAwMYT1BORwdD6D7sjQwS6eSvr25TGAhMD+YBfoSSuyXptVwfnxZuOEXE2vLQmgRqNtQu9OV+tpgdMz2bObt6q9a04MITevUWGPVGXP8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5318 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: ds60vZVvfcv1MgKZCwKyfE2fnKfnZbJ- X-Proofpoint-GUID: ds60vZVvfcv1MgKZCwKyfE2fnKfnZbJ- X-Rspam-User: X-Stat-Signature: fwsbzux1px93kt16qqfzo7dkfkikqa3s X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 912E54002B X-HE-Tag: 1699394449-690715 X-HE-Meta: U2FsdGVkX18AI2DXHVE6ZvPxNfBpb9/R14WvdOUpZ13woYVPSJwfProzMYsmhV39vjjQLD25wj6Hxpx86H/U3DuDRwQmP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8UhutmVS7LpxjorylL5nVZrJI6A6ZQpDvL/OAUjW5JqeTv88Cwps7NihFOPRDhtXHbY8ta6fm6AFAgIizehFzYpyiTAa+vSJ+mRlt2RMQbWnQW2SdzQaHw+HKcHWF0vJktZ/0zYNcs7ekNBhvDYCySCUj9YUV0zJK4AZ1iEXNJgDbdmNr/QpUa2dZZr/xTmv6MfC+VBdpY2bCM7ifLBKNNSL1KDkvXxqSnemcbqxJVU2DQi6dF17DvBU0dv42Z/5tQg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Since CONFIG_PREEMPTION is always enabled we can remove the clutter. Signed-off-by: Ankur Arora --- include/linux/sched.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 4dabd9530f98..6ba4371761c4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2146,16 +2146,13 @@ static inline void cond_resched_rcu(void) /* * Does a critical section need to be broken due to another - * task waiting?: (technically does not depend on CONFIG_PREEMPTION, - * but a general need for low latency) + * task waiting?: this should really depend on whether we have + * sched_feat(FORCE_PREEMPT) or not but that is not visible + * outside the scheduler. */ static inline int spin_needbreak(spinlock_t *lock) { -#ifdef CONFIG_PREEMPTION return spin_is_contended(lock); -#else - return 0; -#endif } /* @@ -2163,16 +2160,10 @@ static inline int spin_needbreak(spinlock_t *lock) * Returns non-zero if there is another task waiting on the rwlock. * Returns zero if the lock is not contended or the system / underlying * rwlock implementation does not support contention detection. - * Technically does not depend on CONFIG_PREEMPTION, but a general need - * for low latency. */ static inline int rwlock_needbreak(rwlock_t *lock) { -#ifdef CONFIG_PREEMPTION return rwlock_is_contended(lock); -#else - return 0; -#endif } static __always_inline bool need_resched(void) From patchwork Tue Nov 7 21:57:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86E27C4167D for ; Tue, 7 Nov 2023 22:00:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B68C8D007C; Tue, 7 Nov 2023 17:00:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 96E368D0089; Tue, 7 Nov 2023 17:00:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5147F8D007C; Tue, 7 Nov 2023 17:00:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3690D8D0089 for ; Tue, 7 Nov 2023 17:00:52 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 1221AC0908 for ; Tue, 7 Nov 2023 22:00:52 +0000 (UTC) X-FDA: 81432528744.13.276A05D Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf30.hostedemail.com (Postfix) with ESMTP id BBE1A80008 for ; Tue, 7 Nov 2023 22:00:48 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=SLNLHEIe; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=woy7ZwAi; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf30.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394448; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CaXGc/Oz6KRDRsIiJc13vxsw+xsuSELjGpa2xXje9IA=; b=vdQuVN/kcZqdCTv3rSb4T84IsUD2Outpt67x/MbQPtjQiRDDoUs6+ArCtGKGuOP6oYKAwj EOooOrTXnIKeXgzNXXEZsXe3tg3PjGgj+R2h2A73EkG42ImcDqWLnl4C9oTLvyJymizfNt nnhaiiNvecwsYP1m9u97xO1KRlCEC1w= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=SLNLHEIe; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=woy7ZwAi; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf30.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394448; a=rsa-sha256; cv=pass; b=FtjUtaDTVthaWkkXeiWQw/HPTejFowy9uF7u/xSIbb8JcdaQqGnvqceGFhvtseW+E18g7v ZGpSaslu9NIZnANEJcV9oenGYuyKnxNC2M8am0EPsZ2Q4muKUn7NYSE56QAD7hkFdNU1gI B9S70mzeig9Pko27kgvcBzyFG1MX3QA= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpqo020714; Tue, 7 Nov 2023 22:00:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=CaXGc/Oz6KRDRsIiJc13vxsw+xsuSELjGpa2xXje9IA=; b=SLNLHEIetUP4ICWVrxL4sP2vkzRxHamHGR7gbgPZVFbuF3Jb+Tu0ONlnzvYKPNoChabH b9mqgd/7FudcN5XKdMFFDTZ7J0o82GBB5Yx0El4EEDcq4CxDWN2WPQoHWn7FHO9pWoAY yuKKVIleEoSfPHT89ct2+T52/1Jo2Z/puC/CTekTjvGu0ZQUOnJFa0H4RZl54XeyDImQ CKhZ9mcdvt8SwZMqWO1sqawXIqn+LG4uQkrvwx7hMf3CBSKZsAismXGPiuIwW7ZuDzvl SjPrnuXLv7mYNrBFyVntLQ+Fxz0srnZdDBp3Anf+VTCSIZqfE3/kkGqq3EAtz9jkbEc9 qQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2202uc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:28 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIhBG011123; Tue, 7 Nov 2023 22:00:27 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsm6c-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VVuub7GZxWUpE3P2czO6UHSuweXQrb02Wlz7wgeGOGaMDzxVy/1zS0UEVji+72Pc/lqH2VOniFok9rlscG/+K5mOB5PtqSXm2B542QoKOh3t5kOe/dJimxQqQi1uCk5ahv4UzkVBenEc0YbcVCegp1s2cZu2EPWl8XN3K+F/h8tjuBgGfog1EsZvidGH8yPI1oJopp5gVqh9JlgLBpterEpmLNOBLjE7zWNnrW0C3vwXlbDC5DoB/VbXyIClArlUW+GijmMgYEqKN6VX+HfWl5msjES2O0+kzvV71j5QUcG4GgxrIqdvWjScWnvunQ93Fo4Qi8DJ/tRbmCFCorY5kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=CaXGc/Oz6KRDRsIiJc13vxsw+xsuSELjGpa2xXje9IA=; b=B4KjNQGETrPgNVfSNDbxJ+7mZoySCZlIm9jJuySlsK3dbnsgsSEuXXHXa4l59DjniR7n0KZYc47zT2YZVeXPu3qyiCV7JCrlK6SJgYu1/FqKYU5UiJrYiHvD8PUmiqqWdIlrSHj5+bgzzROZXbRj6YJ6UmVwizhfk0T3bxz7y8redr6c9J+PEM9ePeML6XmpS8h0cyezhPd1vPTq1g6eBpREo+ILwRSje34CBTcHMMgxfg4zSXhMzVSli2YVIY4zo0C7QAnwMnwGVsLqOaCLE5PmwfyPje0GNv0fY5zZOgBqfsh2WqxZwO/EWk8nhdKJRg70PE7n8NEkSicZfODHVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CaXGc/Oz6KRDRsIiJc13vxsw+xsuSELjGpa2xXje9IA=; b=woy7ZwAi4rjuujtCiF6ZesVi1/Kz9bWINInVDaJTR8VmdCqXnAX+tmIgkHSaOe3H8yC1jPF9CmJ9VxbCNp6AQr5bICL0VrAE7JZ6r5VoTta2mr9Y3RatthKr1sT9ht7Fylk+VkKyMcuH1GG9xRR/3cygzIpApsi033ckiZVQ9UI= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5318.namprd10.prod.outlook.com (2603:10b6:408:126::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 22:00:24 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:24 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 53/86] sched: fixup __cond_resched_*() Date: Tue, 7 Nov 2023 13:57:39 -0800 Message-Id: <20231107215742.363031-54-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0221.namprd04.prod.outlook.com (2603:10b6:303:87::16) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5318:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f17e49e-2f74-4ea2-c9e1-08dbdfdcf167 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /eINutye8vuGw+fverb31mbXI+MGgroNkg5XJreKba7LlfAhefhv55ZCgLIubzGp8fW8XRvkNDe8Oa3lTOUUg6gYFt1KCBTvsXXAOTru42wuy//4lHu3S7GFs8GOD/8P5PKD1zsyeCC1wDj1/fbb5RChzx2a6robp3F4Wk7anfQyGqLIJq07Hv6MFfO1O5A4vw1C4PcI9EY5+HXQivJJYvICLsrRij+Psdxc5eM6AjP66wxMb4kYn5dC7YzAEGv6d39TQz1hKb4eifyk0Uq4dxI3vc+vVe6GdYceDxJbpOEARfRdpgFJf8nJjtbjyJeZgjDlcubGwy3aMyuV/ziWKs3v3uq/s9XK0BdHJg5IFNaYMLbIcvomt5RnnHN18CK7R6qXNGTpRYO6CaZjijxFQ5tFhatKXHEW3NaHpJX91jY6jSYwrAaynK4zAlOngeAC0jyfjtr3MFCGGmnX+VnkSfGhP73ZVyQ61xj7uPolkmoy7dZ0RFNDeJTHkG+VuIe/2QNV9miUOjliXGzHjsqjTvK+oNIuNBGpxN6uDiBjo012xuiOHge+tAGP6bZXtNdt X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(39860400002)(346002)(396003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(1076003)(26005)(38100700002)(83380400001)(5660300002)(107886003)(2616005)(6486002)(6506007)(478600001)(6666004)(6512007)(36756003)(316002)(6916009)(66946007)(66556008)(66476007)(8676002)(8936002)(4326008)(7416002)(86362001)(7406005)(2906002)(103116003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QsT1esiuXl92BhmwdkVdF0oqxQcRY8wG8FN7s4uhJcpW7pykwx2cYerIsC6EIbQlVvLTeNv6mKIZ15FKuRc7GEI4oq34WkbPQBzGqWCeMdCpxWUrvxdWlLED0iKbkPnK2pOYwmNYp1j0APq1H8KsqHMxVaTxGZ5VcCqsJ/QR3B4/yb+8oQpji1CpeNHH5k4hyhkzG0EGOMC4JVerHoyVBtnzf1pyNDhXQ8xIUG2TDUjss2cSGud5YWp1WmBKcLz/OKdPBzqlE8tIks5VCwpbg8jD6x61RqQykytPXkQeLYsnMUkYoDPzALdh4LunaP7iuku1p7MR9OLCPmFlEl/RWCWGux2vQuPOpMjY6ARhOj4ZjwPaKMmMXk3448aLfqB3d5F6TCBOdhw2KEDwxo5oI1jMXqtESe8S0X4BN5Bea9f+MVal9gAQd+l2XkM+VXiWWcEB8ljbCGLP/PXdWreyYQzDIeEPLJJscwFkN4IqKhCo3PD0/4jOKKTURbNpAKZ5zS18t/eK/lOsrgKgnn0IeQYjqzn508ljlhfaq/iQTrLXgQ+ELKTliszB8amr+xNBf/Ryi6weca2msBZ3jFdEAolQAHMBwcvNTaei3kOVe7aOsA1BL/vmmswO4ahS9/o/RbDNakIDKF8BKOCmEzceNwEo7Q3VCpTbUqrHCkZLxDjDdhOZ6jMQV0RxezjXz41dm/ZUcY48326oK/5tQLzBJ0vYs/wFdFugBxeDniI6KNB7ITt0ea8UUMiJHaLLZx0hj7IOcbkNqtyD1InZ8twRORSGCTL4y3KA0IjbWVMUaYzSsAXJEPURIX7yxLQDXuzcK7/843bGqhMkyTMsXpIXdVPprBaYeB+cO9bGAcFhrql+/GxfJo78U3e6/4S96/G9zOCQxCV5DO0vA8pwn3qUHCCKxLIK4FyCKRyU2S/44u1khAko5ikjlha97xPgrjVyRFbz0pwOktHTBW0iT4fBaE2w4qV70mV7THiCRemuqSf8Oxpb8/njMp49S8TspkS84+Q30bP24yyi8AAw4BYXP6ea/HSftlBWEF8lDsUvno72mddPMwo1FD0cVS0i0HSBk69QZuTVgQ4MyLNhtQqJWirlvXyTrOe0tJpFjkn0yY6iwFSOw9WXWuNniP9nlcMo7JFsJGbutXlIx+MJZLxUxKTF6yHNOILpxWN+hdJvb59LjsuCMA72lQPC4FNK07Sb8vwfN/tH21PZOA8Es0id3PedPsAricoaJ7K4CcY3v86vPvAsG6ihGUJSvjXR1DqOPWkLtoDnrLUfKNQ80Bw8yN5B7snOHqC4EF7/pL1iODp5kU4uXOwxn4G4BhZf81s4KKz2XSNuL2Evso4bVBjEOKe2NhaQE2xzQUtaTPfbo6HyZRK6yj0n712wXuq9GMBp1zjVZ3KmUPPZXA07esy4vqshfUTWmuneMRoE5HqeD8vwjPfJHiyvYX3PAvnyqYhU1e3mFDN6CWfGdlaBK6azHf839PtVckgdOLiCJp61YuflYqJuuOVgtMMy2AVsfp9k7GhvcowbR+cWArWxH8M/gLkAay03WMmD/dQOq9HgoA0XBeBg3G7E9cHdct8SnYXgwuzQWo5PYQnE2CIs8UR7Hg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: jt/HMow/pqg3esG51IbCRneetotudD+hnOkOG5Hv2tshhfPh3wiquP3EdLHxEN0D5SOy3PTvOXMpzf9ftYXaLZJhb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ShfGFlm3/jqk/6XDL2iS6Y9jS0x6SldC3Dz+zvkwRbgCziFV08ZpRAJIi3dVNb3krcUAbXSEVt5qydbDE7MIGqU6GZfznM38IO0i2Hv7RiBGMCQly90WPdAVeL03lBO5UlEW71ANSMALQnSQ+XqaG7zowp3EUPXoXAYugdHS5kuK733tkvChY94QntOTBpWynXpTy5GZi/iS2KFld4uDyUUqH64wVuiVpNrMKt+iX4BRm3Scntg0/qHMiQ0Uq6CxISmRHOmhYIHrPz5V4jPlP/ge85OySiD3iyAebb4c6mjlxr6XyuZkJN1nGMoZPwteoaO+H1Q2lsKbxKPkXePobVqL6JFeI+U3vDD7otckgezgKMh2agJ46Q== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f17e49e-2f74-4ea2-c9e1-08dbdfdcf167 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:24.0400 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w2rLaLrl3FGZIZMN8Xs+d+E3HLKmAsHgQ+AXygwiUgjLRyN+qcqcagO2+NkcPW7TsuK4CY4QCr+CmDgNXd3kUZF3LUa3skzKu/HJLvg8EXY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5318 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=816 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: mRrjxsjl77RPY7m7nPFCIu2smu0fy_gC X-Proofpoint-ORIG-GUID: mRrjxsjl77RPY7m7nPFCIu2smu0fy_gC X-Rspamd-Queue-Id: BBE1A80008 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: qcmnkmxrpfd8qwd9k8wace1d4e157njq X-HE-Tag: 1699394448-838703 X-HE-Meta: U2FsdGVkX18s2aFtjNs20LNC2AyrkBTa+7NT0YJ+OcXa2htng225hN6j3LmjidqodtLojEl9JxnMEeBGjSzq3ppTTWI8mWbifDZ5Au5osuSoQElsTRzzKoBWcc3w5uF4EShEvaIzDMtYYDfTUVV/8HpSS8T7XxaCM0guNj+Zcg6ZM3P6cgfPv2rK/NTl0byDTLNvDne0fbP9IKr/8K6EPy7A5EIGS8uXhy9ZFdsFJUVzp/pVE0sGcyOECHpJ3qfO/Ba2P+FRn3Ao5wlv7ByL6oC71FEOPt+vlBDzzTe/XqdMEhqh0Hzm21LBqfi3obeEODVqzXKgB7sE8UZuuk2xB0RPB8Nt7vqfhTDnD9Jj8tXkM6ZUriUuDNax9nhibgRo25p3h19kaujk3j+lArIcB5RqKRnvzv9epWn7G/R0b9OKrE5w4J99DehYjEWfKGNgFigOeaq7Bd7IWgbIcYRntM2VvJ5KjkFRPauSJjaarzw+eoQXu+q7aNf/6KHLNQ2972sUQszUsyU2BTNd7r5f2+2zw1jfEu7bq2EYw7aqEoBhi7ETxO+SEzxtFFi8Ei8cLXqrhCU6GQC+1wzXSX3slGGQlE/TgaY4hEJCXOyAnjHRCcZeiyFd5PO7k8/gLIRy7IeTYNIojXUUfDtNhwCGSy1wY+1iCShtZAMjcGA3LO4/1UudCysW1B0qLP89i6XU2j5iRkk27CDDI13dAxT3m4ZQHISzjR7G905/aTa4s6Sy++vDzcsK0prOxUM+MmOz9NTpZuoNqlQ17MVTWcs393KoQipKbbUUzyV7sWPWByUMu4U8QnNivORJUN4WvS9eI57Qnd/MkQx7JIqi0SzC6z6UWiKfbe4BS9JJg1jjYl44uCcFupt8j0PzoTg0ML9cuny29uGSBRfYgjx1ltVlTews2iP0C7YR9SaK+/5SSdjH0/j3q4ZVzIoz01P8ll2DMSfoVv468o5x9khwun0 JW46l15b +NpmCiPa86mGR89nmBC6tvoEnZLTioHWuShMiVrBp6aHZx3uS+s6tZk+qX/7FYmMf0pSmhHTtzaBVfZNv00fXDpXWi9CRDbLkDydx3gYKFsJfQb5SC43E/gQMDjPfXbvHqi+RVGWwhnI4d0Z+e3bmTo15vuI1RiwI5oK59gXMTe7zQZI/2nQZlHyXkg7oGoqFAqQUNGZ+0REf38lSVYPH+JNW/TVDFaoH8g+lDFc+aZGpc1viI+w33pNxayNFOYCQGVQmIeKCbOyhrt4fvSqlPv30GVdMM0cyhfyPBGzgqXa9rHf2rVpq2QjqEaiFctAksoM1nh8LIwRMb0C6Rsv25cGkaw62vJ5vQWCtZ/6DgD/iCXm0F53nGV04AUTSIosBh1pjFeC6DOcK6BVoloCRJHuSXtIOcEiqj9PKPVeQe1bCToA8sO2mU7ryRYB7w/n8MlkIweBxfUZdGvYdQIwJvLAZZA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Remove the call to _cond_resched(). The rescheduling happens implicitly when we give up the lock. Signed-off-by: Ankur Arora --- kernel/sched/core.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 15db5fb7acc7..e1b0759ed3ab 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8595,12 +8595,8 @@ EXPORT_SYMBOL(_cond_resched); #endif /* - * __cond_resched_lock() - if a reschedule is pending, drop the given lock, - * call schedule, and on return reacquire the lock. - * - * This works OK both with and without CONFIG_PREEMPTION. We do strange low-level - * operations here to prevent schedule() from being called twice (once via - * spin_unlock(), once by hand). + * __cond_resched_lock() - if a reschedule is pending, drop the given lock + * (implicitly calling schedule), and reacquire the lock. */ int __cond_resched_lock(spinlock_t *lock) { @@ -8611,7 +8607,7 @@ int __cond_resched_lock(spinlock_t *lock) if (spin_needbreak(lock) || resched) { spin_unlock(lock); - if (!_cond_resched()) + if (!resched) cpu_relax(); ret = 1; spin_lock(lock); @@ -8629,7 +8625,7 @@ int __cond_resched_rwlock_read(rwlock_t *lock) if (rwlock_needbreak(lock) || resched) { read_unlock(lock); - if (!_cond_resched()) + if (!resched) cpu_relax(); ret = 1; read_lock(lock); @@ -8647,7 +8643,7 @@ int __cond_resched_rwlock_write(rwlock_t *lock) if (rwlock_needbreak(lock) || resched) { write_unlock(lock); - if (!_cond_resched()) + if (!resched) cpu_relax(); ret = 1; write_lock(lock); From patchwork Tue Nov 7 21:57:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D82EFC4332F for ; Tue, 7 Nov 2023 22:01:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E1068D008F; Tue, 7 Nov 2023 17:00:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 965398D008C; Tue, 7 Nov 2023 17:00:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F3DD8D008F; Tue, 7 Nov 2023 17:00:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5F6518D008C for ; Tue, 7 Nov 2023 17:00:59 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 33EAEC0BAA for ; Tue, 7 Nov 2023 22:00:59 +0000 (UTC) X-FDA: 81432529038.28.B63003F Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf01.hostedemail.com (Postfix) with ESMTP id 9C2BD4001D for ; Tue, 7 Nov 2023 22:00:55 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=yqIc8sta; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lr7II9E1; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf01.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394455; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Fh2jfFMWi/Wx6T4nUc+e9YCPx7n8xiF5wQKPn3yuv+o=; b=uC0EX4pOOkptJO3KV5NTfLm1l8seSr3hviC1m8Z15DL1/+B4rbckaxM9UWYTEjrnjndekf rghz7T+18zPkXtDtlPb1BOiWN8uOXmLP9fHz84Soa7DvMVXAQSY5sIsYPRFOVW28Rgj2Xr wx5ULn8zzM/nA0JrTCDPk/oswUW1Z9w= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=yqIc8sta; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lr7II9E1; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf01.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394455; a=rsa-sha256; cv=pass; b=cxfiwhaNWKPrRKQrEk8b7WwPHF9jtXIUsxlOsBzxPg1K00qve4zYT1Op9Ttdm/ARG5bHMh BPqfNpffXsSg0FCI8qoh8uRU4HTmyxTS1aGNlK09CC89ofjcUVeIS7fP84N3JnNe5tqmXc bvlGXXPHW2GX8xWlBCTZzj2j46SNDyA= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpwN026315; Tue, 7 Nov 2023 22:00:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Fh2jfFMWi/Wx6T4nUc+e9YCPx7n8xiF5wQKPn3yuv+o=; b=yqIc8staFCyKtM9TCU6GFSk/XyEYQHDQPGERku4U5eWDVEPgNXIE/y9uiiKIkk+nFNK0 7haQYkKLXfNM+vDAgiU/nWtJ3hrD963/mcCszMQtPiLwfduRjpaApi/687KbPerBl5zz cZmKwopAaWH9fPW5BzsU/xZ6cdLsUM6nr6B0bC2eg8uxrYD4G0HYM7DvThmRXGlVMCp6 mGTgvibLY0vyBr6bIxvvY6gj479p64OTA3BewIQDZDJX9dZ8MJtpYLXat2qNltK1EQLC fCWARl9622z42Y8kFIgnzSbZTnK8a5T0fTnhgUeRDi3Wkvt3Z3SAOXp0FDLyuE48pnVH cA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2102s0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:33 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgSn011082; Tue, 7 Nov 2023 22:00:32 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsmhh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VQEtGTqYsZ2v0uORArpLZA0Giiy9SZPOIecS8JIYHA4cqF04RdmIKAq5M54H4jOf9T0vIbBzn6kwyWbaLW3TYbH3LzI0Pv0uz9xxEBdJePANRlYDvWRBp0U1n2cgTgq2xPi6Kwb9UVJRXzSStuIYA7yET8U2FT2dyGZhe/4rAaZPA94N3TqhoQhtEi1cj58YYt8a8GI6ZWY6vADOqQmAIlQjumXx0agZ5k6oiYuAWSkLxsURsZ2nkLTXntK+qnTgXbUYxDOVpLnFcKZZCYxVUwpL1iRbIfrdQge23J4dQZhP+8U+LskZLTS3jNbTJTyNmMX+YBQETiCuVnLJzgPc4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Fh2jfFMWi/Wx6T4nUc+e9YCPx7n8xiF5wQKPn3yuv+o=; b=KRs6s66jD7OEccyL2OlLhFNyPkdHkHOnRlnUZREO60uMYH6EDYLgS7ill3//W4QkCG+/8Mn8dsEX0qjcKhNII+2uoXU4N5cI/kRmVbim8RtJPqhpJJk/wu4o/KqtE/xCPZ0UHvKTFcv1bF5RzbWAtNvoppSoKu3ns1D1xqN5v924JFlEgR3RufougL0ObNeqYqSuylrVm1RF38rk72a1jWBPTjilEGQpDbUI7T2eiYHcn9EP0Sq+9FH1aGhQOYqyi8a0+z/8+Ij0nw7uQ6OdKDb0md2wz1JkQv/KcHhBF8LzDTnkbLIk9P5yqDkQ5ch44S6lmd2HdzFj1286najADw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fh2jfFMWi/Wx6T4nUc+e9YCPx7n8xiF5wQKPn3yuv+o=; b=lr7II9E17eTjnYxaQTRgFplTkHs8Iz/XASzRsBW9EjgAugpAlyvnGFkXk6o08VjHvtR3kJukpeK6bzDUsr/4EavSHWEotbu61dTo5cMhfQFTbuRc1lVe7ZB7jOxBcNTjHQCeYP7xlg1JjpUDQeBB4aH8gVQ2LbvhVhPg/mwS4NY= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5318.namprd10.prod.outlook.com (2603:10b6:408:126::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 22:00:29 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:29 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 54/86] sched: add cond_resched_stall() Date: Tue, 7 Nov 2023 13:57:40 -0800 Message-Id: <20231107215742.363031-55-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR06CA0007.namprd06.prod.outlook.com (2603:10b6:303:2a::12) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5318:EE_ X-MS-Office365-Filtering-Correlation-Id: 57445321-6835-46a5-6834-08dbdfdcf460 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5/h1Z5xkCX6+hOYGEmNasiVqhRCqzjMlr3wkxRj5Db5HP9Pnyf92lK/vaCpQK3+r/NXagTM9w9Pkl4CcDu/hQr5AQeVkxLGa0Wah/Zcg8BF6tyAlhmjJ7vLdV8NbaA42gnZqsTQdbor5nCZiw7HFnhPD2tp4p1QaAm/2ViokimM7SwF+yGVBrFZylWTSEO/gNKWpEpU2DzE082vRuhZqvCcgxtDdasxJMreSGSaY6ms2f33fTUDnytHFDHScRG16wphCaXEqtP17n4WJT5Bq72c0gdogBQ3XhjHGNNEEz3C+koXXmxg0niL+DYnnazJXSj/BbbrzkEyF9RzIu+wwKDLZDHlqbDG0K+880InAhe7Fqx/oogmvWz7HrjrzTVBgca/ZRaP9LpNKrMk8W1dsbGT/2V6xp23b1Go0w4A3eMna0OTgCSZTs3B5Ke0RnXV9IU603wJqrVZkYPkEOULwg4SHTr3Pc9Yp/rQtXumPq0kcRs+jy+ewPH/ob8rZAGms8QWYtX6hyYqWZIJp8jXCath0MekuwOMb1woG1RPmYWsTfFzJj0vIL/+WmV6MJE24 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(39860400002)(346002)(396003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(1076003)(26005)(38100700002)(83380400001)(5660300002)(107886003)(2616005)(6486002)(6506007)(478600001)(6666004)(6512007)(36756003)(316002)(6916009)(66946007)(66556008)(66476007)(8676002)(8936002)(4326008)(7416002)(86362001)(7406005)(2906002)(103116003)(66899024)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3yagmEpr65ITCT32mGr5Sy/xxdHr0z7gKNJn/uIfUla2c3PAxWia/wd9StnO03JfuLjsiDlsJ+CVXqo+P5ULiXJ251KVqGRM7rKsbquZ2pHl8KS5tmBj9HFRTUm8sfmrsEEI5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AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:29.0094 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VYEpH6o2/o/Lyzpbojw6LUxGrV0MuTapbCgyuq5pmFcrw+O/z4MOI2OLolnFI6ZRM0r40VKBwS7IX/1+/Jy63GcnlHZRCXP+j9WkkX5gKzc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5318 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: 8YFjFnmcZbV_ncv7lKz74gkw1th9o_UZ X-Proofpoint-ORIG-GUID: 8YFjFnmcZbV_ncv7lKz74gkw1th9o_UZ X-Rspam-User: X-Stat-Signature: pzqxnrq8f1ijcg544i5mq53q356664ub X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 9C2BD4001D X-HE-Tag: 1699394455-786237 X-HE-Meta: U2FsdGVkX1+c1dyeLXfSFrxUlzQoOO88UsVRckifJDEHMTLabiedKAkNchGfS525wuPrkKc4hAMYqlxUpsBuEAAB2p6YubyJ8jZ9xwCn+uXgxo9nkpv4dexFB7Va90/vHl0NDsk13rCD3wozb+J6VRDka/72VA4iwlMY/5fAxDT/tK39P+V/6KykCX+NL4C6DYkiluaxt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tsC5tZuWyoC7yhFlnvnfF3jcu9uGY6BOwQeywCs8RZ/HxzRb7d+8anlbRQWXh+6xWrb862oMi4uBmZMr3Gjxj+Hm917XcDygGFQwlAirvfGH0M46l+5cke+03DBR0hOmxR0YqFFkDayBqT6DAIezUlFWJN5XDoRM/Xev9RFY2Fn+KeaxQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The kernel has a lot of intances of cond_resched() where it is used as an alternative to spinning in a tight-loop while waiting to retry an operation, or while waiting for a device state to change. Unfortunately, because the scheduler is unlikely to have an interminable supply of runnable tasks on the runqueue, this just amounts to spinning in a tight-loop with a cond_resched(). (When running in a fully preemptible kernel, cond_resched() calls are stubbed out so it amounts to even less.) In sum, cond_resched() in error handling/retry contexts might be useful in avoiding softlockup splats, but not very good at error handling. Ideally, these should be replaced with some kind of timed or event wait. For now add cond_resched_stall(), which tries to schedule if possible, and failing that executes a cpu_relax(). Signed-off-by: Ankur Arora --- include/linux/sched.h | 6 ++++++ kernel/sched/core.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index 6ba4371761c4..199f8f7211f2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2100,6 +2100,7 @@ static inline int _cond_resched(void) { return 0; } extern int __cond_resched_lock(spinlock_t *lock); extern int __cond_resched_rwlock_read(rwlock_t *lock); extern int __cond_resched_rwlock_write(rwlock_t *lock); +extern int __cond_resched_stall(void); #define MIGHT_RESCHED_RCU_SHIFT 8 #define MIGHT_RESCHED_PREEMPT_MASK ((1U << MIGHT_RESCHED_RCU_SHIFT) - 1) @@ -2135,6 +2136,11 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock); __cond_resched_rwlock_write(lock); \ }) +#define cond_resched_stall() ({ \ + __might_resched(__FILE__, __LINE__, 0); \ + __cond_resched_stall(); \ +}) + static inline void cond_resched_rcu(void) { #if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e1b0759ed3ab..ea00e8489ebb 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8652,6 +8652,18 @@ int __cond_resched_rwlock_write(rwlock_t *lock) } EXPORT_SYMBOL(__cond_resched_rwlock_write); +int __cond_resched_stall(void) +{ + if (tif_need_resched(RESCHED_eager)) { + __preempt_schedule(); + return 1; + } else { + cpu_relax(); + return 0; + } +} +EXPORT_SYMBOL(__cond_resched_stall); + /** * yield - yield the current processor to other threads. * From patchwork Tue Nov 7 21:57:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 474C2C4167B for ; Tue, 7 Nov 2023 22:01:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 019738D008E; Tue, 7 Nov 2023 17:00:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EE61B8D008C; Tue, 7 Nov 2023 17:00:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC32B8D008E; Tue, 7 Nov 2023 17:00:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B2F3C8D008C for ; Tue, 7 Nov 2023 17:00:58 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 85D30120B47 for ; Tue, 7 Nov 2023 22:00:58 +0000 (UTC) X-FDA: 81432528996.08.1348E0A Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf12.hostedemail.com (Postfix) with ESMTP id 017A540008 for ; Tue, 7 Nov 2023 22:00:54 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=lskhLGUf; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="B/5uxxSe"; spf=pass (imf12.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394455; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0hUBRwRW2iGU3GXAGJqaK60bN8ITrJKzrcDmJVHmBag=; b=uJ53TZ6u5qDBsdHXy2lA9dTBxCAOxB41Fd8tHKC7Gc7zL4eppr3SJ50aS0s4MYdqbkMRXp bZ4xMMK9rvasLRUceJZCInh9I4jAw71e0H4yv7jfsW/gdZdErRUFkrfuOR3wwSd4w3RlxE Ui4Q/ybs86/qwKw502XULXLXBW+fHs8= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=lskhLGUf; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="B/5uxxSe"; spf=pass (imf12.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394455; a=rsa-sha256; cv=pass; b=ePVLG+1eC+ZE+cMQqP49cguXONGfSvvIyUPYU77+LGg6qBU/txuGFCX4LJbfz5MliNWlX2 lo2GT9RsYtrKtwE/x7UO2tanDia5aUGciHWWzxDW1DXkb4htgXsdpc0YIri6sada693i2d L78LyvHfc/ftpWbFdj0VLcKqAfO3lCg= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJQ9J014468; Tue, 7 Nov 2023 22:00:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=0hUBRwRW2iGU3GXAGJqaK60bN8ITrJKzrcDmJVHmBag=; b=lskhLGUffWpfgK1lx21kL1sxLfeOhBEyURzxBK6+qKMBkFZ7uRKkRZ3yQHFmz60yitq5 uG1wU8O1zHOqd1lLMNlrnxaL3rYWe9h8IEBiHHv/Ju2OkDU0ZHWaJb7Mgz/YHBpWofpt lXpT9QcUnaFdaLDVMd9KzGYpLpAxUruKKOk2eSWIV8VDg3dhmtudTLQxtuELDOXDdXBB pLXBS0uUVhZ8ogQlUft2GNKDBvstPJU0wLZTkkrSG8k0QaxFwGb+rVINvaqn9zGAsFjl Oqdb11gXDQNT27HPv/R86mUk4CbQmNxC9dpW5FnNT6ftYRjS3hexkR9EDrtGZtNKWTS8 zA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r2fx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:36 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LIgB9011048; Tue, 7 Nov 2023 22:00:35 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tsmn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=luy5NM+gB9htA2S51dLXsSyOxxUWRY5ZdEfNDbusTiYQWspMjwSfOJApUZ95om2AiZETrRI4Gu0TJQB59Ny1kGodoo5bzphB0b01YggubBaCvWijB65c6eLHCatghM8CjtPQM+9q2srT72JyxKbpN/Yblta7wLRAhQd1wMl+3auVYx9YQHv6flzvrB7k9/M3HEWWvlKi0Bgr96krKyVj/aoB4krS8c4dyd0uitOwW9BubY1I1qDMU2Cp3T3zMgSedjQdSaRq747oBkSIZXopLAofAvvwvGCtRc3p7UuxAuzTrjKwsY0e0sI3fQewhwzBVoER7mzbABqCLwftgMFecw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=0hUBRwRW2iGU3GXAGJqaK60bN8ITrJKzrcDmJVHmBag=; b=kw1jTD7WceO/x4/Nf6uHeUYXtvrT6gsalNr2Qade/ThRoC6MkzIQDGwCqYxGz0miL4zG2Petc1OKuyszEHgrwflEszbsFsmNtw0mbDhDZTYyKWOLYUvgd44KvilIlBVIdZ/a69eiJ5QCiCKQ5L/Qceoxb/oZV5SoCZ/VgtwtjyISD1mrXwoXwR7m96qUIQaJWtmOdXWwdkeHGQRW+eOUI3ouHIfCwkWjCVixmKix1U+jNFFrw42N8AsbtD6F21jVZpUwQm6yVQ90Pdmwq1LYsrPNZgpN2Ky3LywONqt2mEDxL2qk09ts6uNKvOWaFAI0E5oYaf/eD9wfyvAzOj0l/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0hUBRwRW2iGU3GXAGJqaK60bN8ITrJKzrcDmJVHmBag=; b=B/5uxxSeefrsdnNIrPm9b0CJpepWUvxBcMCHZsf4tHNOl8jbrnUin4cT5BfxpHoH9hHqzikUxQUHLu+yBx2nb195O8UgHcacQozmqP+s/g8SwFU4j4orGtfQj74pZs4cLZ4M0Ueu7qHn7iyfFLTiqpGQilDNAiVQ+hmkYRg6UNI= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5318.namprd10.prod.outlook.com (2603:10b6:408:126::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 22:00:31 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:31 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 55/86] xarray: add cond_resched_xas_rcu() and cond_resched_xas_lock_irq() Date: Tue, 7 Nov 2023 13:57:41 -0800 Message-Id: <20231107215742.363031-56-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0215.namprd04.prod.outlook.com (2603:10b6:303:87::10) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5318:EE_ X-MS-Office365-Filtering-Correlation-Id: 53d657a6-dc4e-47df-e6dc-08dbdfdcf59f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8rrj5u4u/rvceF3TXWpQV311c6GzQug7CuQc3kCuB+3uaUDvUEomtGM5p0GJvc8NGZ6UjjmgVPk6DSW6FFlelDJyqf8Hvk9+ggRmtd/pzjwa6cuD75CVlDoWp2rkdFHw5B6VUE9cjhXkFdFKG2y2kEiG9RjskxVvEcS6k4Pg5xvv3ryixYHY8uMXkJsNw+8EUfyz7LClJrbm5iBb1cYK1S+WBatIbprhohQQQBfEjgT7hwR8H5cYbvqGQn67MlOhdaD1OvhHoj0bcYzYT3LbEkcd58klV6GUVrEH+BSO6WcaLfcG6/EVEooEUhSQ3/V5WU2PBp9yQBJqMiOGpZ34liGkrV8YId3fNmWov8jQrfHkT8gsmC7sYw8eupygE3DjfGzv7luQWW+27Y6gNz7ajR1zPn8l7kTjs9VoiqmAf/SWO4pyZgy3IN9Miv9IjUJjrc/2OrsTfoPCCjhud4ilxktorYznj71M1AMDixEZekdshNbl7gnJq7JIvVDToqGLO8gLWuA83e7Lj+sd2gydyqcFhaufo0+qUyKMCh0c/p9pMiPwIPgfn5maT7c+uHOG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(39860400002)(346002)(396003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(1076003)(26005)(38100700002)(83380400001)(5660300002)(107886003)(2616005)(6486002)(6506007)(478600001)(6666004)(6512007)(36756003)(316002)(6916009)(66946007)(66556008)(66476007)(8676002)(8936002)(4326008)(7416002)(86362001)(7406005)(2906002)(103116003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YivaP7HeGSVQ4muUSS20d8fnljFdshr9WQhHIUfWRLT/Wbapn49BPn3JQ1825/nKER5oKrugjARhJd1YC043xp4aDluOlHO7s8ntCyL1IF9YpOIgOMwbS3IDpQ637l6VttwiswfUSynEUlcJyAC25l/GMkMX9cHgncR+/Q7eVE2xck04/znMTO5br/eqGiSGkIUSNAXfhkokXZwHhHg+sd+y82cITN+yr+Zvxci2aFE8e6ZhZrzYbD4kY3szSeiHfgj73L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iL+8+NivVOOq/LZKclLhl4VcgBXjl5/9oTnQGmTcoMwE1Exf5JdYmMuy3EBfaLwkrxfOLZHUyWkK4Ih3IiW43VxTiyWY9moL9t9avixzJRam0eL5XyDPm88QXDtZZJwjuEhwdtLObzz96fLVt1LiJ9ImNNDMR07YBp7ACnegbUKDXu145fzSJ/8oOIUlfbIyaS+KR0PsX1Na/9qKfkZekcyvNiLG0Fsc16k+Zkb7/fK1f5DE3cykK9wy+WP/DYzZgZew6KmFQYZUXHay6AePLbAsx5WFC/ar4F0MOLs/vMKG+sOzTCr/zwNqmWi2E6oG7dI3fMBwtqqb6tdmACA5FCpQCZuiwulo3m589F6+g6MwAlUvs8DERQOG1Hh19dcSVOIWS9k9h6UmTmP6S6iii/RwBqTdFisCOUXiGwVP4k7sEZ/uq36So+m7i9674sriPFTpHfHkVpC70JwxCeNrnQ+hdPZWAZoBTvd4INgKJ09WNrBqgxJTDC2ABZeYgiGfBF9jDfIi+OEPyP8fhXjLAtPrtd3XNmokc3fYsjVyfppjFzM6CLgQ1WwiLvYAMW4d6M1EcBYc+KPAYtvux/O/0/yGg37PAdnqRJM13PYjBSV2YIyzzfNPeDApSJYa422+jghoo0106ZfN5itrQPy8wivR0skf7sEE1J9Wat80YZhqAeVhYVwXccBeNZ6TA8nD3BmQKgQSkHQR99gJhWYLxUp/u19GyQKK3cnbhwpZJ1Rlj3aucEicNvl2/F2RuOWFOqsO9C6SbYH2tOu/HGfTxx0XvpX7NZHFzPnR+URlPImVlfNuzyqHoqbar3rg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53d657a6-dc4e-47df-e6dc-08dbdfdcf59f X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:31.1520 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nIfvH/0+LFB591xhEdpfMCALNE8/oNj6kl3Xy8MjC7DvPuben1k3rn+vIG6dxZAbcFGZpTEdUDtb/nmj5ruBt9pS4CxFiXf2xqNutMgolfQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5318 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=956 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-GUID: pkkAQ8TpHc89A5zkhfNzngKdZPF-XpGk X-Proofpoint-ORIG-GUID: pkkAQ8TpHc89A5zkhfNzngKdZPF-XpGk X-Rspamd-Queue-Id: 017A540008 X-Rspam-User: X-Stat-Signature: xq56zskysfs3kx3qytswturxwktfjqsc X-Rspamd-Server: rspam01 X-HE-Tag: 1699394454-86331 X-HE-Meta: U2FsdGVkX18loLFXQVXIK0k117kD1PE2YpYHt1UWws/IwDQ3WxrJ7bjNoY0xHtQ8oEwCLb0J6UQ/6NLO2XaAihv1fL42UqVVZBkhaU4Bfq244TxvY9bD5C8lrdSwbXhj6dzU7b/g7S+aO5A4zql5Ps0obaEmk8cFoOCjDhUMxi63JoBEj4QrnE5z6cgfPzQ5oGfBtwHqHn3xR3SH9GOsOCM5kVu54mYivg5JrvRoF5bAyk8+Up6+Q4S+VEKw6x3u4fJvVO4+reM7oqlScWXudDmGcMyYN/UK9Hd1iDJ5b+yXvu871RZNXyMihq9f+kVspUeNVZu5nOR1MQszImBp2oGalxiJYKMWjIo2SaAR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fV6hi9H4yoJVg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: xarray code has a common open-coded pattern where we do a flush, release a lock and/or irq (allowing rescheduling to happen) and reacquire the resource. Add helpers to do that. Also remove the cond_resched() call which, with always-on CONFIG_PREEMPTION, is not needed anymore. Signed-off-by: Ankur Arora --- include/linux/xarray.h | 14 ++++++++++++++ kernel/sched/core.c | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/include/linux/xarray.h b/include/linux/xarray.h index cb571dfcf4b1..30b1181219a3 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -1883,4 +1883,18 @@ static inline void *xas_next(struct xa_state *xas) return xa_entry(xas->xa, node, xas->xa_offset); } +/** + * xas_cond_resched_rcu - if a reschedule is needed, allow RCU to + * end this read-side critical section, potentially rescheduling, + * and begin another. + */ +static inline void cond_resched_xas_rcu(struct xa_state *xas) +{ + if (need_resched()) { + xas_pause(xas); + cond_resched_rcu(); + } +} +extern void cond_resched_xas_lock_irq(struct xa_state *xas); + #endif /* _LINUX_XARRAY_H */ diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ea00e8489ebb..3467a3a7d4bf 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8664,6 +8664,23 @@ int __cond_resched_stall(void) } EXPORT_SYMBOL(__cond_resched_stall); +/** + * xas_cond_resched_lock_irq - safely drop the xarray lock, enable IRQs + * (which might cause a reschedule), and reacquire the lock. + */ +void cond_resched_xas_lock_irq(struct xa_state *xas) +{ + lockdep_assert_irqs_disabled(); + + xas_pause(xas); + xas_unlock_irq(xas); + + __might_resched(__FILE__, __LINE__, 0); + + xas_lock_irq(xas); +} +EXPORT_SYMBOL(cond_resched_xas_lock_irq); + /** * yield - yield the current processor to other threads. * From patchwork Tue Nov 7 21:57:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BD6CC4167B for ; Tue, 7 Nov 2023 22:01:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD5788D0090; Tue, 7 Nov 2023 17:01:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D603C8D008C; Tue, 7 Nov 2023 17:01:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3A828D0090; Tue, 7 Nov 2023 17:01:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9AAB08D008C for ; Tue, 7 Nov 2023 17:01:05 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 76F15140BD4 for ; Tue, 7 Nov 2023 22:01:05 +0000 (UTC) X-FDA: 81432529290.20.DBAE859 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf18.hostedemail.com (Postfix) with ESMTP id 610241C000C for ; Tue, 7 Nov 2023 22:01:01 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=O09riWk4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JaBAuW7g; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699394461; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2NHODiUOiVcJ6jaf39wzOHNWkO2SbftqtZ8Ea9mPM74=; b=KPgGM/6opooTJBv0KrkrmtaBvUoaxkggkxHsZUEgHu7lrkHkxokZfDrdCWHjFilrCxX+Gr eMgRU3FKcV0ENKx2yB4Wczc1N9TOaspFna08RQO2cQiQ2sS97QRidNlD31NSIZFTEHRk/i dlCf+3NG8t/7AL5TYsJ7nBxjVHz7Mqo= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=O09riWk4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JaBAuW7g; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699394461; a=rsa-sha256; cv=pass; b=Xyrm1jU4kd36Z7iYWBKb7nhecUKU97etrbwJXRwTj2oaX80J9mpIlu2NXmZVcsrW3tCH8U gO6CbMlX5R4aplT5ZU8ENXN5JLfZmZo+l4itvJ7y4qPK2gFAF8xOapRXARjWYjJ570tsaH mg3z6NXmzDQ9bYtV7WNn3/MBGXFeARw= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJODL032058; Tue, 7 Nov 2023 22:00:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=2NHODiUOiVcJ6jaf39wzOHNWkO2SbftqtZ8Ea9mPM74=; b=O09riWk4lGjWRPTY5sh/UcobntvG70Nx7X14C9zmYH0Kibw68zOm9ScV3yHnr28BLOQJ zPDXtrzQS14bYQqfN/eNy61Y44RmVP5bbgULNH16SJePia2RVaV/2sjl7Y9IXqi8lFSI zZxyFmSapFLHU/z9POOhZ5FoS31Ng79zl46l//nUrmb2+R6NqSH5HKZtcW4wp5t2V3qT EEBvzfOvxjG+6zL3YEXYbsWrSXUZuGmGCP/UXynA/bF4GRbG47UY7so1Z9rqOyNYPOGN 8j3Rn6jQi7WuvGnM3K1z3nIvPmnXTnYELnGdcrH8zeVGjQFeXCZVQKSAP7SEiKrcCBgG lA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g2ed-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:40 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJBcY031969; Tue, 7 Nov 2023 22:00:38 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w221k5v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 22:00:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Guy0TZvryUNgCRry2yDGl43hsTAc0OYQdZHY3qU731OgJOZ/N8jnhjGrBNPB0HMY99g8vtzrmbqmuosT3C/bMHvUUj4NNb/6WSXGTAY9aBJwRK44sCQ3pcoeCqPiWBD/XSN4RO1+8uIv2uckJVv/ujmApkm0W+F/+07n1qJdr6dTETymG/PAVyOqZ+IpNFQ3iBBeF+CgHj03BCkTafBc+BVQxSQ62IwIWkSaSKvCiU5/BUK0lVATzl/vThJcat0kwAGyDHtl8C1WaNMBZKM11yC/NOyAim6thACZ1YtQ2cJEoAKjSrEX6M6ORP9b29sEC1gFWq6ZFcP5r8Ue0SqznA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2NHODiUOiVcJ6jaf39wzOHNWkO2SbftqtZ8Ea9mPM74=; b=GrxVNkvbgHnSCnp7DB+kmgdasEcY2NXTmH4szPiIVOFesefb6I8CFcl4lo8Cw8qsqMVhE/lk4P86vA2vypXpSdk+gB+8V+WxBH2s5sEJwv05/+FD7UN3dZYpbjSIzXWo9mesi067wuj7V5dxM489JgUeA0JGj7+9h1qy9MnbiL1oDSxgNsnA9jYOaVcRQ99FLbYBm+BVOmTXkitmZK11H6J1ZCkZs9qlzoBXRduPU12uaUmWvtHpXB3iefXdP5TYoRVd863FI1Z3CEQhTufuE9bvgmEtWdfB1ioxiAiXeP1JvbcwSHbLVBjkAtWm6D5AYMojChCScNg8sptekcSohQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2NHODiUOiVcJ6jaf39wzOHNWkO2SbftqtZ8Ea9mPM74=; b=JaBAuW7gLbKiOGG+s92sNE9Syawlo+hU7l9iipkPoH7sx4axArXUahZ7gVU0dc9EXXjxu5hyreUaGJeucr0tjCu/vDU31ZitZ9ZxMbGQncuR8s1QQWW/c6h7pSRGnr/N9zd/ksSnlfAIxGE40x1WmvbmC6y+/LaMQYiq12twzA0= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5318.namprd10.prod.outlook.com (2603:10b6:408:126::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 22:00:33 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::1ce3:4a8c:4c99:acea%7]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 22:00:33 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 56/86] xarray: use cond_resched_xas*() Date: Tue, 7 Nov 2023 13:57:42 -0800 Message-Id: <20231107215742.363031-57-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P223CA0001.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::6) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5318:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ba5a61e-6ac2-48d7-3fe7-08dbdfdcf6f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e5w/tHIwmKV7+iAmFIBOsPCEC3SzRJZNAb6iHr5/XP/MHYXn/hO0973zTssW6b/FmiruTX9vtp1EFIDYboPYdyCPfvIeWRzDHS1Ai6LHaVJZzNGN3jZX3Fdu/GU8W4/DUGQWus6nAhFdfS+wGSfQHqJgO8acI4fExcUSuC05KjboDJluwUO7wbK+YXkmfUBg3SL1gpDbdefhgA5ttd7VitYuPBJdEUZ84j08AwFo7mLcl90gO4RpAFLJQVk9hdvutm+685vxqPHbVWaD7B2WDws8WMoDn5XS4ow+iYj2PKhwyqu0BJXX1mluyFLfuVCI6dXq30Va7IYL0KE/pBIisq6i8vSRY0XbuOu5YoY/0oO5/K7e3zD1ahcKn+uCn626g2B6cxaIhrYqGHVnlXivP024PzYnZtSGb1fOva/XH3DqUn8oTIoyJ8qp8oMOUaM/cczgs2dRtF1OJK95+ZPpNqu3aAVyUdx0IxZLm7pk4DcE7TFHOgMy2MBDOLI9S6y9nxIJymQT2Eeb2Sr50teFhB8ZXSoAYi6R6TkOg88PAtdpnyCaXemZsbKth+mwK6p5 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(39860400002)(346002)(396003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(1076003)(26005)(38100700002)(83380400001)(5660300002)(107886003)(2616005)(6486002)(6506007)(478600001)(6666004)(6512007)(36756003)(316002)(6916009)(66946007)(66556008)(66476007)(8676002)(8936002)(4326008)(7416002)(86362001)(7406005)(2906002)(103116003)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: q54zyQ+KLI0EK/PfzOy20YbeFiIbJKAJWprQDiW/VJDPWwcVNiYqMJZj99xJfDb4ax2eP/8AHdZVPYe3BrYq2XK1Ih6KJkB3NPQkMwe8HSTQBVc74/bFv4vA3moWFkvsBjS6zSWiR2pOfPQkKIJB0NjKqHpl9xmudnPO6pdXrpt+UYcDEKnUdTylcBcQ/FbEDAxvQLBCGfXVq02o6soN/8BUx6OQpMOfhWCy8xqpQaYxReaUSRU2wlYHZ8hC6vd3Ahc9KVc7Fo5dOGLh2mu+uhectwPhLXshFJNb3TejRvpsUaBz5aRJy+a5fhKcyu54uae+CHpvfaOcaagwnF8N0zMQNZ2S7v1QRH95s1lJjN2PdL1rexrK36RgZm36asiJ9DtNvXJApHdACWWHZMeKfos9zztbVpZ1nfOVseLm9O8hVaYapA831ltS6AexT+PFycs0WmDy969XwQwdXVm2z9ufU2hLthakrS9qDSgqoMpRU48KG+1wJQ7j8I862udJHTI2gsWFa03c6a421CADO+CoWjvUNd12KMzMdxeZj81Kqq/Yg5JtaUuW/LltALamcylxMSims1de06zy6HdbVtwccYIE9PF7Aq0mtTJTXtZbO67qeE1bKY6jc0K7sSMZiEloYwKVk0Igs65xzTHtBfShBPTxfb/TNZbwhH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RFBzrO0WpSfuJaoWFSa3/5QH7X9LdKjz/405FemYpRLY80On8oOTxGZSc12q7NSlbBrOxTmNcfn22rMqSULhY+/+hVnu6EUTnGShNtwk+oNWFjfDhkw901GBj1jl+e5ngfaahueq7o7KHU4UOq+2vAzqSFwnDHwsO/mHuE7pvRHmvU3VRkILEkXu2spEsluLlmorE/PlMX/g89WCIcmae35qkVgQLMUSmXZRTdTeV3L+eWcPppAeOXyxV83kBetzhpfW6LiAg+UhH0bfhUNpvp+cbQbXzF2PCeLJHc9gOaXbkLmLZHWTZ0EZV7KAQjxaUSgI0JskCfbQL2G1HES4RiOXBdYVmybreUvdEkWHtlYQ7nX2hkbp2/UZ4SY7AzlHKR6xhLkMOnacQjrFpIVFO9vA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ba5a61e-6ac2-48d7-3fe7-08dbdfdcf6f7 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 22:00:33.3604 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q4+JM818C1aYjYhflzhOSs1sknX4VD1NAvPBFkzT2dsGQ/8oSdXTK9ZaiP6yeGkuhZR0I9/xI8JkeBAggoyCTsuPxzz4ilyaFzAunMZMzls= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5318 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070182 X-Proofpoint-ORIG-GUID: 5Dvpu7IyVWpuSchGrAV4AjznlXTmpEyt X-Proofpoint-GUID: 5Dvpu7IyVWpuSchGrAV4AjznlXTmpEyt X-Rspamd-Queue-Id: 610241C000C X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: m1ie7k444hu51fie6rj696xp75fz9o8y X-HE-Tag: 1699394461-88255 X-HE-Meta: U2FsdGVkX19607GW+wX2FiGbHk5xYKi2h3X2euVujUQFBb5Xghi4odbxc1IIhAWMUKXN4KvZ94it/2gxkoptCHZfNXpiLflIaIEmOS9CjJEaFroiJIHiOK1VyMLnSugDOXXbxQVeqPFZx5uwlzYpAZkT/NRD807vyCXJC2bwLGeEkQHPtKhpj4J6k35RfkgTfPuE/kYio1xiD5VjQ92E/qcZRkdAYTvL+1lCnMoYgt1Xu2C5bSj0RkMMZ/Hp9jVpceioZH6a/1cvtHdxtFnBaOMuVpX5r9016Ko+8MnRXTV5f+aKTqA7k+R7uAC00OwHAU2mrbpEnUWUj0kZ5koQ9TL9HzRPc7z83ODu3M9jFl5wg7GJyGHj6e5oz0scx/oHzZcZx5OOfrqvOh+zS/ZMe72GM4i7kKlgZC2DonUkE95OixoArRLP2tpFfD4KIkOA1DYWUDXm8K15RU4wpH3X3B4sdYWtD+Vd8ySC/7d/ceqIzN//aRzrINCZhQZtIgdO8cT3Ly5fbGc069c0acQp8pW1gsoTAXfJQ4PY2p8+AXPcqMJpcV6WBfE+CwSdFT7wfaXpAiSwsnM1sNnEabJ2WBRGVN+yk9NLTT54oPIOGcRbHvA5DDhR+zJc5UdBRM+5dQ33rvTP0kOl57cgDDfMGXWZUYEJ77cfqEIlNritxmuCgPtCnDCnAqDUfMGiA3N4TtlsH4n6cmXgxRZ4GCloEROlSBZoJZFTlWUS4fOg33O69fmqKVO5DhdTFg2IbfK1MxjejpnS9Efo9r9b5cwIotgvg8WDfP+FPF+61bsLCURMAgBgzulD8lK/BA8TIcjiugGkhxWVQUBW9oyfkE+7sIaiu1KmVsQKW2nec2Al8mb5P2skBzznI0q3n0ouHksY/fDltHGZxs9dAjafFvYbbArftNw8LqfarDeTXag2H7ykaDGsqZHRxaKyTB/U5iuELY3uvKdhlnRfXJ5L1vo q2L5kwWF L/O24yz5ntUDPVA+sFym3bi+Jv3MUbebMZOZSpVlpxp5uTw84bQHcK1bdAjWFHJaL4eqpYTkPpzmx+grbOeNtVZm1lUMyuZekJU3o/tQcClyu+wUJ27tKHYUvv/VsqtcYz3TzXZsQCyb7/BxyJ2mRM1od9zTzhdHOYVu1YV5rQIlu0DPNDj8y/SMfSVceBfqd5DtuX5tlIVM1A4kGiO/fmH7arKZnl7AhiPx1cbF136Pf9OEPI+Q9tBHngybQ5EbpIDLRttkEkMudFz4efMQ29zKYCSfzuSN6KrIPKIlbaDDX06CK98BCFpDSJXJbhjVbxp8+0KkHBWnp0quqmrhQYIKiht6NQFwQJcPaCdWOrvmNIIyaBAdUc0paQ76Eq37Bgcj+Rg6bX36NQ/nDE8qgZJlrrRZRTbWOe3VZiaRGUEl0X2lEnWwWUEWp6xXYH2ccXoQ5dt3AW9kwE0WlqsSn3UrYLRv2nRKUntIEvquRwFFBWZotu1/WqeI+s1OERc2iJw1T X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Replace the open coded xarray pattern, flush, release resource, allowing rescheduling to happen, reacquire by the appropriate helper. Signed-off-by: Ankur Arora --- fs/dax.c | 15 +++------------ mm/filemap.c | 5 +---- mm/khugepaged.c | 5 +---- mm/memfd.c | 10 ++-------- mm/page-writeback.c | 5 +---- mm/shmem.c | 10 ++-------- 6 files changed, 10 insertions(+), 40 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 8fafecbe42b1..93cf6e8d8990 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -726,10 +726,7 @@ struct page *dax_layout_busy_page_range(struct address_space *mapping, if (++scanned % XA_CHECK_SCHED) continue; - xas_pause(&xas); - xas_unlock_irq(&xas); - cond_resched(); - xas_lock_irq(&xas); + cond_resched_xas_lock_irq(&xas); } xas_unlock_irq(&xas); return page; @@ -784,10 +781,7 @@ static int __dax_clear_dirty_range(struct address_space *mapping, if (++scanned % XA_CHECK_SCHED) continue; - xas_pause(&xas); - xas_unlock_irq(&xas); - cond_resched(); - xas_lock_irq(&xas); + cond_resched_xas_lock_irq(&xas); } xas_unlock_irq(&xas); @@ -1052,10 +1046,7 @@ int dax_writeback_mapping_range(struct address_space *mapping, if (++scanned % XA_CHECK_SCHED) continue; - xas_pause(&xas); - xas_unlock_irq(&xas); - cond_resched(); - xas_lock_irq(&xas); + cond_resched_xas_lock_irq(&xas); } xas_unlock_irq(&xas); trace_dax_writeback_range_done(inode, xas.xa_index, end_index); diff --git a/mm/filemap.c b/mm/filemap.c index f0a15ce1bd1b..dc4dcc5eaf5e 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -4210,10 +4210,7 @@ static void filemap_cachestat(struct address_space *mapping, cs->nr_writeback += nr_pages; resched: - if (need_resched()) { - xas_pause(&xas); - cond_resched_rcu(); - } + cond_resched_xas_rcu(&xas); } rcu_read_unlock(); } diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 88433cc25d8a..4025225ef434 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -2290,10 +2290,7 @@ static int hpage_collapse_scan_file(struct mm_struct *mm, unsigned long addr, present++; - if (need_resched()) { - xas_pause(&xas); - cond_resched_rcu(); - } + cond_resched_xas_rcu(&xas); } rcu_read_unlock(); diff --git a/mm/memfd.c b/mm/memfd.c index 2dba2cb6f0d0..5c92f7317dbe 100644 --- a/mm/memfd.c +++ b/mm/memfd.c @@ -55,10 +55,7 @@ static void memfd_tag_pins(struct xa_state *xas) continue; latency = 0; - xas_pause(xas); - xas_unlock_irq(xas); - cond_resched(); - xas_lock_irq(xas); + cond_resched_xas_lock_irq(xas); } xas_unlock_irq(xas); } @@ -123,10 +120,7 @@ static int memfd_wait_for_pins(struct address_space *mapping) continue; latency = 0; - xas_pause(&xas); - xas_unlock_irq(&xas); - cond_resched(); - xas_lock_irq(&xas); + cond_resched_xas_lock_irq(&xas); } xas_unlock_irq(&xas); } diff --git a/mm/page-writeback.c b/mm/page-writeback.c index b8d3d7040a50..61a190b9d83c 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2351,10 +2351,7 @@ void tag_pages_for_writeback(struct address_space *mapping, if (++tagged % XA_CHECK_SCHED) continue; - xas_pause(&xas); - xas_unlock_irq(&xas); - cond_resched(); - xas_lock_irq(&xas); + cond_resched_xas_lock_irq(&xas); } xas_unlock_irq(&xas); } diff --git a/mm/shmem.c b/mm/shmem.c index 69595d341882..112172031b2c 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -882,10 +882,7 @@ unsigned long shmem_partial_swap_usage(struct address_space *mapping, swapped++; if (xas.xa_index == max) break; - if (need_resched()) { - xas_pause(&xas); - cond_resched_rcu(); - } + cond_resched_xas_rcu(&xas); } rcu_read_unlock(); @@ -1299,10 +1296,7 @@ static int shmem_find_swap_entries(struct address_space *mapping, if (!folio_batch_add(fbatch, folio)) break; - if (need_resched()) { - xas_pause(&xas); - cond_resched_rcu(); - } + cond_resched_xas_rcu(&xas); } rcu_read_unlock(); From patchwork Tue Nov 7 23:07:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449424 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31A51C4167B for ; Tue, 7 Nov 2023 23:09:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E0D5280007; Tue, 7 Nov 2023 18:09:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 269F0280005; Tue, 7 Nov 2023 18:09:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EED34280007; Tue, 7 Nov 2023 18:08:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D23D3280005 for ; Tue, 7 Nov 2023 18:08:59 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A0D1E1A08E5 for ; Tue, 7 Nov 2023 23:08:59 +0000 (UTC) X-FDA: 81432700398.21.5746D44 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf18.hostedemail.com (Postfix) with ESMTP id 602D61C0005 for ; Tue, 7 Nov 2023 23:08:56 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=NKEQwCiA; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=x4HdgYbC; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398536; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zK8SFzx6JjVEKci+tBZyL2d70uL/RG8LSxDqG81d3JA=; b=8QPF1YmsjQiOCMLwnXvsVYkooFiZbgzjkWOsiXzPPE89Rt5pOGZNB2P/JL5oZsbefRNS0Q ETVvZ8RNfoPew2UazthXb/bPt+PTBoYJ4iWXO+dWzh11UKQcnNPhWLd8UzQ3F+H8ccZ7K+ 445Q8bmokJvZw3v4nm3I573uvOku4cg= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398536; a=rsa-sha256; cv=pass; b=xMdA6KwVsUFmxDx3qucOBsugaZ1XhbffPE0VUUpl5A3FL91iFgjOk0hdaS732dVm+C6Saf 92G8w2P+aFVAI0gj8Hhza2rY4nXXVNMXQEwBXNxYLAb0q7ya03IEbu4XrMvExAcVQDbrT2 S0NVSJ9tBT9FpDTpm8hq+ur96ipyIIY= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=NKEQwCiA; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=x4HdgYbC; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK6Lq026463; Tue, 7 Nov 2023 23:08:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=zK8SFzx6JjVEKci+tBZyL2d70uL/RG8LSxDqG81d3JA=; b=NKEQwCiAfgp3pJb2anY0CClEi4FMqkQ1xDK2Qyp2wUqDnTXcpfmzpY07MsQvRNmcZjPB 1biidY3UUYH5ovl4pLYuu4ajoYonZR6z93naAV4PuD2bNeT/85i7oyBlYB6cxSdHyxHb 5rDGmVpQ1u1+4eJg0NVKwgjM5iTbIxg5Y7GkUgm4CGIsqr8V4Y4rsXCUw3KMs6NARt99 l3tg1gzeyuu/+osKh7GNhNuSkoMn8BenBjTPue1fhcHKgFMkvZWz9YtAEcwI94kxPhWz zBAfPH42SYuhAxr4/o/mQQmAqIh0PtK0IzIsv7DBXVWpGmR8bCsUkF2pImcPUxAhAZlz kQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106ut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:29 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N3tUW010979; Tue, 7 Nov 2023 23:08:28 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tv94e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O66h11kv6FJUxDYcbB5rlGAHepZGVteYkwskpd80All0VZ4dk6q6bkSISfi7DTbKPz1XqUtWCQXAjDt669WwusTtiqJhLVue0XQArWZ7mjXaXtima2Gc5mzKrGUcdyjaTtRlwjt1DEht+4k2EX7m+PfXvF5XHlUDUsYPrs417ZLPixPBND2+b7QHwOOxF5w5RuaW934xPR675EIR//c1PeDiXmBgaYnyKd1tZAOVTFzFzor+KKr8meuMYTfQxz19txEM9jGSkKdbfJDhW2gAsFMXor8vY2htY4CuYGjW6kk+mSyIHtCtCSveT2jRBRlSiOX81kuWJVtgyX0zOqI9CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zK8SFzx6JjVEKci+tBZyL2d70uL/RG8LSxDqG81d3JA=; b=LLpn22HrZjK0iPVvhQGdWab2KpjwxMDvDh6xF70d8LnlaArN4sqvdXy7+ZObYQ0YtipHWdnTkdnlaV/lmhuzmodwAYZbMNM38z6rfuvq7QearGS17l7/za094S4I7KzUIMroH3BY2OLErxCYnfaypoY/CHQLUn4/p/fCKXd7uuJGtqEQmTAo4xKOLgB3+N/u4PgGN5oJpI8szQCu9fVRPy+ZwWI/XJzFUF8ncqRNrj4Abnyrgfn4cBu8k28lxYAmgBKGyNjFVrxoufiDv8+KKGZ36aJRhMUiwYRHqQ9edBuN5zSOsumeIK6r6805skCdR09wYX/UuBen3kOudf7ITg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zK8SFzx6JjVEKci+tBZyL2d70uL/RG8LSxDqG81d3JA=; b=x4HdgYbCpPPhDE4ZRqEdm3eyzAf7E857m2UzlXYoZ/GTLJ1MhmBorSmoILpDPb/4qx4shI4KkYajRcwSjb3GIKsy9qcKq5nJnz0HahM6kCr+7Q3SS2iV62LyZTDX5eejCkQye7VIOX+DkDg4+Hn0sC6meazvYF+S2Lv8PGX3bj4= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by PH7PR10MB7010.namprd10.prod.outlook.com (2603:10b6:510:274::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Tue, 7 Nov 2023 23:08:25 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:25 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Julia Lawall , Nicolas Palix Subject: [RFC PATCH 57/86] coccinelle: script to remove cond_resched() Date: Tue, 7 Nov 2023 15:07:53 -0800 Message-Id: <20231107230822.371443-1-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107215742.363031-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0331.namprd04.prod.outlook.com (2603:10b6:303:8a::6) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|PH7PR10MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: cfc9d6cb-b1ab-4b0f-996f-08dbdfe671c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x5XANYS1fInMB+l7L72Xsq+KLEtLLwu6NcMM1VyhblfvZjMELnaqv7VLVvMj4OaaacN5UmSIUV4ly9wzVR5lIXCqXnEvY1ZHU38TOm2ZNwYoLRGuV/dBltjIFmlH41Ql4YUtGziVBuBBV8s3FvEtEOxjIBt+saOiWEzucDN8gEvOr5TtX54oDvkL0hBQshQcyOtqWfOVAVox3e47q8wbzGWP3nQkyVxAAaYKWO9euhCk2wwaTvhXNPugWgX68C/BPySi0jKI/hBxtZ87WRazx3BptaxBPj9uubiaKN1d3aHOWQn2KRvKroH5dAEQ06Rg5F5cCLY4GSyNwFoUCb2vXjStI6BvsnV0263pRzSvAnYA0yJIrc3vDNyN/NGEnUTgVXzP2b+18/eakHNOiFPQRHSlXJNT6G+DGmv+/eUQ3v6g9lOkcBb8HC5YInYuHZirSuhJ2vcweoagTUaIa9PpLujZTdnu2LZkpCwlCEMULos5j6wre0r+lBZc20RaigUSgrwkpYz1chNs9Gx1huiXe9ba7IB8y7C+HJzXle2Uzr20dMSjPf7Cr+UmSbKLOD4i X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2906002)(7416002)(7406005)(6486002)(478600001)(6666004)(54906003)(8676002)(316002)(66556008)(6916009)(66946007)(5660300002)(66476007)(4326008)(8936002)(6506007)(2616005)(41300700001)(1076003)(26005)(83380400001)(6512007)(38100700002)(103116003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G6rJbBB/nG5+yQw8C75xwNEb0oTLrR2vHz5hM7R0lrROez2FUOnMjx7iGIGYJOJi2dZph8PMoMK6zahixJdcNkS8ug7+liGDS5DAMe0sP77o1U1a23Qi56ca1nqDS2u1FAZE3hKATM4vibHaemc6MjngDczXzxqmked/XC8jK3y9MCBYni0Dag/na/Gui8AhnNFQ2+6RS+oej5CzFb3g4kg1sMjg8JlONpWj2J6x45cJwAJIHquozJga/pENywYikP5tdaD9tWYN4/wm7cLIbyE8Ibr8fIbO7XVcKRBOCOC3BfqHkqpr3Fle/MqGKVU8Xk+RlKBP45c3aOJ9Ehb32TKi1GggSeYVdI23O2klkcq8xwgbD+xruc5mboEfH7ZDZQuyQXY4IHAfWTU8qPoNLUMAePAtqmlY5fbhOUqoLwRARWokuDDht/1qBISO/EKnunuK6DfOoH8IBXB+I/DgshY5G7b2pDtc98fnWn1HKmlxRZOQgGcIGj517uCoK40hJlbgDWpC9zmlj1NfBhdrUYm4qc7e+ed+u4ZVaMdOooZj9G8cDy46q13v442T7KL5ZbecogfZlCcv/Ti87c/tcuEcl6nWy3U4Vd3Vd//vfwuUwZ6PE69iMSFBKwy0+8KoeZZlxVStTNoKR2UbnXZyHh5VZ6Jco62d+/gjX9vXwgsJrNWZ8jkiYGQCWrHL/K4Qpc2hD65KLP+kgoDJ8+CljPaTh6Mmgw9VkbypwS5/DZg/0bCWQatlmDyUkgKLWMLz/HDdTSPrOclLT2tKm6Jh/e8bI2UDzMV0R3EuxJNJsDVHtxvjEzwsqfqHaxhovjnlu/WaLh9bofdQS1vU6VuLURIqQQePsx1bJ4oNqKDz+ckGop+DbjD3rpQ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PYBEdLE87eMGd7/R28rXB/9gdSkHJx6eKKBqICqCM/OTUqSAqHC5oAGXgsFZyjcq+WyZ08CUBGkGcEnTgWg4ux8Pr5yLtFF//frhxVzd+bEFV8vU5hr4/9k+h9fV8vJn7fFDWaU0jOTaxtFSeLYAiDXi6aZxlXO16kNLoqFwbhHRNnaDmCe4T6qBznEl57/hlBHgxHh8pVdtY9RTbHoYBFYMMRS9v2ZOwxyvWPAIGtoxms0hTdHfBiIF9DmDtl29oJmk1yP8SHoQ1J X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfc9d6cb-b1ab-4b0f-996f-08dbdfe671c7 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:24.9816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Y8dd89tuqjYCRo/zdixBlJ5x3zaCTKKY0bW59zaMq39PL84wJTjjaG+CNryW11PjCujlld9cq8myk7PU1YAIuxGq30l+WoPKpQ+VQwIylmU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: xYDt_49QsbCv8Qq5k0yBXTMpnqtVplvY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iXeOnUUvQXo9JTQPvGyuDSAWRd7hJg4lHPKdVufwELg4G/3f2Xeds4XR3aPJSHAilecgfT6N ++OS1U5K mquDwgGrMl9HyIFrSY6wM5mAB0eelhYE2G2Z0Jr0v58zyU4VTVfG5xBffJJh6wQk4aCaWL1YYnC5yBcmcrpjHOelWmW6D+ws5ytIemMoyHTm1fEk78POTvAblaQkFi44OTnVBo/TFSGXbwHmmhwC7OBEb7H9EI/fiQeaswHwqmqMca07uq5V7QyRPu3vKTrqok+oqkMMK5am1x2KKN0kX5GvYXOyQjgjr270/lOPrAzgsTZaoARbLmvHLHnTCYr7qvIfaxEBNlw3FaSYj2C0XY4joJavEgCSFsuvHTtwoxgrgVtxFOKNepXu9NCGi29n00bOEjV6dxujSHAdcFmE6UTYaRKCZpR2vjKNpCqW3URPpws4d3g/s6SdaBkGsRMvt5owzJdS8/cSGp91qfM/CSTMgYmWLlxDm8H0B6+K8+lez7mG6Zem7VSIu6tTQM2xE0X8nUKBNg8zcPJvoTMMIwHB8QQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Rudimentary script to remove the straight-forward subset of cond_resched() and allies: 1) if (need_resched()) cond_resched() 2) expression*; cond_resched(); /* or in the reverse order */ 3) if (expression) statement cond_resched(); /* or in the reverse order */ The last two patterns depend on the control flow level to ensure that the complex cond_resched() patterns (ex. conditioned ones) are left alone and we only pick up ones which are only minimally related the neighbouring code. Cc: Julia Lawall Cc: Nicolas Palix Signed-off-by: Ankur Arora --- scripts/coccinelle/api/cond_resched.cocci | 53 +++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 scripts/coccinelle/api/cond_resched.cocci diff --git a/scripts/coccinelle/api/cond_resched.cocci b/scripts/coccinelle/api/cond_resched.cocci new file mode 100644 index 000000000000..bf43768a8f8c --- /dev/null +++ b/scripts/coccinelle/api/cond_resched.cocci @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0-only +/// Remove naked cond_resched() statements +/// +//# Remove cond_resched() statements when: +//# - executing at the same control flow level as the previous or the +//# next statement (this lets us avoid complicated conditionals in +//# the neighbourhood.) +//# - they are of the form "if (need_resched()) cond_resched()" which +//# is always safe. +//# +//# Coccinelle generally takes care of comments in the immediate neighbourhood +//# but might need to handle other comments alluding to rescheduling. +//# +virtual patch +virtual context + +@ r1 @ +identifier r; +@@ + +( + r = cond_resched(); +| +-if (need_resched()) +- cond_resched(); +) + +@ r2 @ +expression E; +statement S,T; +@@ +( + E; +| + if (E) S +| + if (E) S else T +| +) +-cond_resched(); + +@ r3 @ +expression E; +statement S,T; +@@ +-cond_resched(); +( + E; +| + if (E) S +| + if (E) S else T +) From patchwork Tue Nov 7 23:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 644F5C4332F for ; Tue, 7 Nov 2023 23:09:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCC51280005; Tue, 7 Nov 2023 18:09:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C2CF9280008; Tue, 7 Nov 2023 18:09:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 884D6280005; Tue, 7 Nov 2023 18:09:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 3E4C4280008 for ; Tue, 7 Nov 2023 18:09:00 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 092F340B72 for ; Tue, 7 Nov 2023 23:09:00 +0000 (UTC) X-FDA: 81432700440.16.0E707A3 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf26.hostedemail.com (Postfix) with ESMTP id A81B714001C for ; Tue, 7 Nov 2023 23:08:56 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MM7cLY0q; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=olzok2fs; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf26.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398536; a=rsa-sha256; cv=pass; b=AxZtGyOV8vsfAwTdlARj/P6pRO/otQtjSNlCtwjcj7uI6q4kqzuzBTOBFpnw1M9i63Nreo YCjn4mxDwO0YE/k9rDIPnsZb2QNFElT4cyWWZsla1UG+cXNF25qttuW6RTfGDSw42v+iIo hQVsYzmu7i5V/F48cqTLB1UavHzazoM= ARC-Authentication-Results: i=2; imf26.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MM7cLY0q; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=olzok2fs; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf26.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398536; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=JUrxjybBgVU12dE8uJy/up8iheg95TfqyZBHE6tuEvo=; b=eK3PToKQZcuUSkKOney9IbY9o5pZpTvhacXIDqO7vIHgOoaQFA38aP6bxL4UeRTE+/zApk dzKTScSJu6spAnB4Y1xpMX7KS/5iUk9M1oJuLl0BCWDGH7ggaimwi6YhaY3F+4bNterW23 vh8AhXOJ/C2Dl4phGRNT4f5+Nlh3biQ= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJmDe004891; Tue, 7 Nov 2023 23:08:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=JUrxjybBgVU12dE8uJy/up8iheg95TfqyZBHE6tuEvo=; b=MM7cLY0qXudXyX+iaSnYjEt8EbZXxiJ3Ij/7LmOMhxfrnxZQM/pvXfuTZ7HiqDoG3e9N 2ATOUNmga8sRhLbGAuvyZp3tf6+ONkpY9migG2qtEQ12hzBiM26s+/R80TQhDWmp74/0 osWxqJovZYoc6NqIPTZnccKNqiENJozWU10fPa5Kmv0cpPhyeFDFb/ulnJXGbaETCmQH /O9kp/wHuPw+PUFor9ITUKn29VPOh4j3MK5iyj/7ORxEzRnZJ8rhDWO1zHDjCRYNVmRL cZQMXBwEsxN/PYmv0xe65nPFaS2PfagRjge8Cnw8vtZx/LTlE8uJgF3t2pgpMo+gpw+S YQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6a5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:31 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N1WLX003884; Tue, 7 Nov 2023 23:08:30 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vvb3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfVIZu1ZxRqPPmJka8JPu+PjaATX+nzvW5ufNGx37s8UM8480BbEXyTuklCHdM4QIAKFHM1IQ7GmqLT+M0Ioxg5L9rl4gxWVQoBZK7IUJhQoB5oIpRtPMP3x6rqJxxkmfzSkGRtG95mcrrVCEYRtLQoEB8vAqoS0NSg+aj2ZT30Xwo5PIDh/R4TDTVP3YhNJub5vQMtFxPYqPtftLUtVRJ43xZQxfT+tVcj+mR93K6YxC5kdddMns5pLIxt2R4EG6y8aKC4My0bH8/cyfyd3rgKgh40ZzZoRf+giVu2VpnF+N/IeS4lcu0pI8rPUDayVD7Sys5W6E+R7yF9bHWJP8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JUrxjybBgVU12dE8uJy/up8iheg95TfqyZBHE6tuEvo=; b=NO/F+dMC0YXEnHGlaWA/CmF+gFF7sGfc3rkqQ5Nx5xCRWgpWCFEOO6YwT1EhA5sChj00O3NIPkXQQOZ8vus5lzOP6gpDqyTP8gee3CODaKBtUQDBdVE4y9CKDXysaHiUAnqaqYIUxFUP23jYfyE3m80cjGY7E4hfjfVuW5sjbuNglolIhNzILenQUfVvwSoFIEhQUUYd4u0kgezX7cUPi1Lg1vx4prTpnO2NQ+w9TbgAqe+zNRUgRtJrrosXHQ2il/Hhq9IPxxhsZ/NJQoXOHksqTzGSRjpAFgbBJlSdsseGdxdAP36IqNCvMvaZZQsDGhEJm5v7vTot3f/j4kHEZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JUrxjybBgVU12dE8uJy/up8iheg95TfqyZBHE6tuEvo=; b=olzok2fs1wdZso4IzzSR0NachFT2pnIiEBt8jpihj6wjd7VvB5JL7+fMndfic/0aFW6qXGkd7P/k/MqAHHbXadY9puyaPOqd0KkEDNfb2FsJ/jumoUGLKBzQLVbX6G1KqQ8jCe5a6Ddb3HZsDhrkqEtnC7QFoqQNWEZ3JoxjjeM= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by PH7PR10MB7010.namprd10.prod.outlook.com (2603:10b6:510:274::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Tue, 7 Nov 2023 23:08:27 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:27 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Sean Christopherson , Paolo Bonzini , "David S. Miller" , David Ahern Subject: [RFC PATCH 58/86] treewide: x86: remove cond_resched() Date: Tue, 7 Nov 2023 15:07:54 -0800 Message-Id: <20231107230822.371443-2-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0345.namprd04.prod.outlook.com (2603:10b6:303:8a::20) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|PH7PR10MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: bd85f3ef-a060-4da4-9874-08dbdfe6732f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dVE+GIgtabS/e6YXdcMc0EUqNuYhpI/ogVyWEe3oziqVnASDECKwJ/KbTrDDrh3FZ6qnZEBzgBgo5OsffvHKFggmzlHLMR8xHW1Mc5n6ysoSVHQukR65+M7y4O7eW0xoDOFPqkCosbvlXl2JeRm2cKave0gBr4uwDziBFz/7ioJfjG077yuBIQSBQBm79QJqrrsjdq3KcqWfX8rjr2DYn8u/m6T1Ro6y6SpXg0MuzpRLEIFIXO1qbSk5n25Q0lRO5I+2e04wdgbNeEDYLc18itCdiaSkqNvtPg1xLSBxe381ESb2kKww0SC3xUkpgFBTbIFQhpJKhjQEMd4J31NT4omxcHSLdvq+2wJLYqMMaKa4ggzFpY7ASY+eioEY+5HAmPFJGcmPV7M6K1oxMWcKdWnyoAd9JMcH4n3e42jNi0u46f1P5YKOvFIVCaOy5ZR7VfZ2ppj4raHovY9lL/CjJp2waJ2pVrgHQzdeDsnpKSgwVJYhygxMJZETFxD8YvPsy1Ht4TjiYnRtUlhq5+w0RzgJ5gIYeuU6XjvEI9hdfBQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2906002)(7416002)(966005)(7406005)(6486002)(478600001)(6666004)(54906003)(8676002)(316002)(66556008)(6916009)(66946007)(5660300002)(66476007)(4326008)(8936002)(6506007)(66899024)(2616005)(41300700001)(1076003)(26005)(83380400001)(6512007)(38100700002)(103116003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1nhgl7DRdVbL/2M5+fRv5J87ly9CD21OEeirqnBC5RN6InVNh4ioWdUcXpPh10Js7lZy00/kvkp4FrhSJ+vbrOHT+SOV0ANG5AnQqJIVIO/GbFaS6uiR3c2mW0LqNdSTml7832mKUp/tOdr+yGs66/6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-Message-Id: bd85f3ef-a060-4da4-9874-08dbdfe6732f X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:27.3006 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ICN7qkWBnYK75rBCsGktgNqf5nLM87nqhT5MCe83jFQehohiOMFfWAZdz8n30OIUcNPguYyujwCM48j05z4ulqSeSnrp91Q25vRoIfMbhV8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: CqRb7WlE4XBNB7B3No97MJCXCVInoxjb X-Proofpoint-GUID: CqRb7WlE4XBNB7B3No97MJCXCVInoxjb X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A81B714001C X-Stat-Signature: yqcrgaegxzyq8gjzi5mr4931c4pdgn41 X-HE-Tag: 1699398536-333769 X-HE-Meta: U2FsdGVkX1+mcuDriJzo40zIl8AQY3YkraQzdM7hRJT6+Kq7wpZaqTdBpOx43jX0TRPat8seh0/YRjPsw38pvIG/+l75rm08Rei3BYsM9eHTJ449X1qL8BM6WROCILAeCCpCdSCweiJkZwRXaDYbZJtWQ89HcU69P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wZuCoBUEJlc9ivjrKtHsNIFH6HsXVvOzwVcZlEKmkLHX6ICR881F7CKvJ3tNSezpnhufOt3yTJ8Ig3d4jXpcuxZ3DdEgrAHQ3E1dHybxdRPl1gOExzUvFX4AS9d84QNf6A02UT/3GPAXgJh2tCYNeavFMzso1Ef/LsiWLIAis6GI7WyKKa2dQx1jAQu/p4RiVLpXP+rd0cFHIgvtWzuJ+YnHwInjzwlzkwVR4D3WBk32T+9wYLSDwtOyesD8snnFxfLifTZyOUi9f8AJYH7lrFcP9EKYMa4nCH6F13xpVDNi8Y+Ei3EgjvzcVWCvbjBGQN/GRzuNlHZmaMxU/W3lytoKaybaSpEh7gl9FieK5zhZ0mvnJd8kueipmrAfrKMNGm4fWtH2fINcOk+3iPVmWfFuLaCMwfTYtx5ZrZVkuRQDY11IRh20aKwdUFKV5lzbaXDgPD7CpDRKCqflJKRpW0z4UBIweNPfo3vqqzCbpWjWvspHw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the instances of cond_resched() here are from set-1 or set-2. Remove them. There's one set-3 case where kvm_recalculate_apic_map() sees an unexpected APIC-id, where we now use cond_resched_stall() to delay the retry. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Juergen Gross Cc: Boris Ostrovsky Cc: "David S. Miller" Cc: David Ahern Cc: x86@kernel.org Signed-off-by: Ankur Arora --- arch/x86/kernel/alternative.c | 10 ---------- arch/x86/kernel/cpu/sgx/encl.c | 14 +++++++------- arch/x86/kernel/cpu/sgx/ioctl.c | 3 --- arch/x86/kernel/cpu/sgx/main.c | 5 ----- arch/x86/kernel/cpu/sgx/virt.c | 4 ---- arch/x86/kvm/lapic.c | 6 +++++- arch/x86/kvm/mmu/mmu.c | 2 +- arch/x86/kvm/svm/sev.c | 5 +++-- arch/x86/net/bpf_jit_comp.c | 1 - arch/x86/net/bpf_jit_comp32.c | 1 - arch/x86/xen/mmu_pv.c | 1 - 11 files changed, 16 insertions(+), 36 deletions(-) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 73be3931e4f0..3d0b6a606852 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -2189,16 +2189,6 @@ static void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries */ atomic_set_release(&bp_desc.refs, 1); - /* - * Function tracing can enable thousands of places that need to be - * updated. This can take quite some time, and with full kernel debugging - * enabled, this could cause the softlockup watchdog to trigger. - * This function gets called every 256 entries added to be patched. - * Call cond_resched() here to make sure that other tasks can get scheduled - * while processing all the functions being patched. - */ - cond_resched(); - /* * Corresponding read barrier in int3 notifier for making sure the * nr_entries and handler are correctly ordered wrt. patching. diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c index 279148e72459..05afb4e2f552 100644 --- a/arch/x86/kernel/cpu/sgx/encl.c +++ b/arch/x86/kernel/cpu/sgx/encl.c @@ -549,14 +549,15 @@ int sgx_encl_may_map(struct sgx_encl *encl, unsigned long start, break; } - /* Reschedule on every XA_CHECK_SCHED iteration. */ + /* + * Drop the lock every XA_CHECK_SCHED iteration so the + * scheduler can preempt if needed. + */ if (!(++count % XA_CHECK_SCHED)) { xas_pause(&xas); xas_unlock(&xas); mutex_unlock(&encl->lock); - cond_resched(); - mutex_lock(&encl->lock); xas_lock(&xas); } @@ -723,16 +724,15 @@ void sgx_encl_release(struct kref *ref) } kfree(entry); + /* - * Invoke scheduler on every XA_CHECK_SCHED iteration - * to prevent soft lockups. + * Drop the lock every XA_CHECK_SCHED iteration so the + * scheduler can preempt if needed. */ if (!(++count % XA_CHECK_SCHED)) { xas_pause(&xas); xas_unlock(&xas); - cond_resched(); - xas_lock(&xas); } } diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c b/arch/x86/kernel/cpu/sgx/ioctl.c index 5d390df21440..2b899569bb60 100644 --- a/arch/x86/kernel/cpu/sgx/ioctl.c +++ b/arch/x86/kernel/cpu/sgx/ioctl.c @@ -439,9 +439,6 @@ static long sgx_ioc_enclave_add_pages(struct sgx_encl *encl, void __user *arg) break; } - if (need_resched()) - cond_resched(); - ret = sgx_encl_add_page(encl, add_arg.src + c, add_arg.offset + c, &secinfo, add_arg.flags); if (ret) diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c index 166692f2d501..f8bd01e56b72 100644 --- a/arch/x86/kernel/cpu/sgx/main.c +++ b/arch/x86/kernel/cpu/sgx/main.c @@ -98,8 +98,6 @@ static unsigned long __sgx_sanitize_pages(struct list_head *dirty_page_list) list_move_tail(&page->list, &dirty); left_dirty++; } - - cond_resched(); } list_splice(&dirty, dirty_page_list); @@ -413,8 +411,6 @@ static int ksgxd(void *p) if (sgx_should_reclaim(SGX_NR_HIGH_PAGES)) sgx_reclaim_pages(); - - cond_resched(); } return 0; @@ -581,7 +577,6 @@ struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim) } sgx_reclaim_pages(); - cond_resched(); } if (sgx_should_reclaim(SGX_NR_LOW_PAGES)) diff --git a/arch/x86/kernel/cpu/sgx/virt.c b/arch/x86/kernel/cpu/sgx/virt.c index 7aaa3652e31d..6ce0983c6249 100644 --- a/arch/x86/kernel/cpu/sgx/virt.c +++ b/arch/x86/kernel/cpu/sgx/virt.c @@ -175,7 +175,6 @@ static long sgx_vepc_remove_all(struct sgx_vepc *vepc) return -EBUSY; } } - cond_resched(); } /* @@ -204,7 +203,6 @@ static int sgx_vepc_release(struct inode *inode, struct file *file) continue; xa_erase(&vepc->page_array, index); - cond_resched(); } /* @@ -223,7 +221,6 @@ static int sgx_vepc_release(struct inode *inode, struct file *file) list_add_tail(&epc_page->list, &secs_pages); xa_erase(&vepc->page_array, index); - cond_resched(); } /* @@ -245,7 +242,6 @@ static int sgx_vepc_release(struct inode *inode, struct file *file) if (sgx_vepc_free_page(epc_page)) list_add_tail(&epc_page->list, &secs_pages); - cond_resched(); } if (!list_empty(&secs_pages)) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 3e977dbbf993..dd87a8214c80 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -435,7 +435,11 @@ void kvm_recalculate_apic_map(struct kvm *kvm) kvfree(new); new = NULL; if (r == -E2BIG) { - cond_resched(); + /* + * A vCPU was just added or a enabled its APIC. + * Give things time to settle before retrying. + */ + cond_resched_stall(); goto retry; } diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index f7901cb4d2fa..58efaca73dd4 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -6431,8 +6431,8 @@ static int shadow_mmu_try_split_huge_page(struct kvm *kvm, } if (need_topup_split_caches_or_resched(kvm)) { + /* The preemption point in write_unlock() reschedules if needed. */ write_unlock(&kvm->mmu_lock); - cond_resched(); /* * If the topup succeeds, return -EAGAIN to indicate that the * rmap iterator should be restarted because the MMU lock was diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 4900c078045a..a98f29692a29 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -476,7 +476,6 @@ static void sev_clflush_pages(struct page *pages[], unsigned long npages) page_virtual = kmap_local_page(pages[i]); clflush_cache_range(page_virtual, PAGE_SIZE); kunmap_local(page_virtual); - cond_resched(); } } @@ -2157,12 +2156,14 @@ void sev_vm_destroy(struct kvm *kvm) /* * if userspace was terminated before unregistering the memory regions * then lets unpin all the registered memory. + * + * This might be a while but we are preemptible so the scheduler can + * always preempt if needed. */ if (!list_empty(head)) { list_for_each_safe(pos, q, head) { __unregister_enc_region_locked(kvm, list_entry(pos, struct enc_region, list)); - cond_resched(); } } diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index a5930042139d..bae5b39810bb 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -2819,7 +2819,6 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) prog->aux->extable = (void *) image + roundup(proglen, align); } oldproglen = proglen; - cond_resched(); } if (bpf_jit_enable > 1) diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c index 429a89c5468b..03566f031b23 100644 --- a/arch/x86/net/bpf_jit_comp32.c +++ b/arch/x86/net/bpf_jit_comp32.c @@ -2594,7 +2594,6 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) } } oldproglen = proglen; - cond_resched(); } if (bpf_jit_enable > 1) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index b6830554ff69..a046cde342b1 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -2510,7 +2510,6 @@ int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr, addr += range; if (err_ptr) err_ptr += batch; - cond_resched(); } out: From patchwork Tue Nov 7 23:07:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 080DEC4332F for ; Tue, 7 Nov 2023 23:09:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 997B2280006; Tue, 7 Nov 2023 18:08:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 91F59280005; Tue, 7 Nov 2023 18:08:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7245D280006; Tue, 7 Nov 2023 18:08:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5A2B3280005 for ; Tue, 7 Nov 2023 18:08:59 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3B7F0160116 for ; Tue, 7 Nov 2023 23:08:59 +0000 (UTC) X-FDA: 81432700398.27.E933E10 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf11.hostedemail.com (Postfix) with ESMTP id C558740005 for ; Tue, 7 Nov 2023 23:08:55 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=KlXcBKuU; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=r72KnT8j; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398536; a=rsa-sha256; cv=pass; b=077lBgAj3MDJP1MFG2QEyiBeBkDiwz39JJvs6U7/bD95ZF288NKkHnHte/Pc9B/On3XJgg bVxSMr2rBV7elPN0rtHnWNuN7GrcvdevV6cVhD389weoicg8PJmkexDxGPzDaYU5PLwN1H tvxio02Owe7WPXGOHquS+GJqeC2UQ8Y= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=KlXcBKuU; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=r72KnT8j; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398536; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Nen72dyIbcMLqxVEMjNCU3b1BhvmPRDB0dQ1Q/BjO8s=; b=BAZZ16mN4GUidcMqsP4ACLpu5uOX2+beazL59zMoiXbaPrd1v4nR2GSxFUVyfWpVQgH2pR 3evtStlnZoRmU98q1WnvpvMbOnFvimPTTCDXBbM9WNllDtK5uklf1EV+Y4FMAbuGJx2goL w/y1ub7S0fcklpR2UkHonyMNEMbnW5w= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJfg0029174; Tue, 7 Nov 2023 23:08:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Nen72dyIbcMLqxVEMjNCU3b1BhvmPRDB0dQ1Q/BjO8s=; b=KlXcBKuUHuz5yeH1dAKlLNPuUdLpP26AGB1tz8tu6lMRcU4CMkiaoIL2xLqMEvYEqa12 7b/zwN/PIvNGLUjSdrdvgJVirtKdE/4cpFd+DPwdgkdjKEhhK6CNRub1vXjzlZvKQIZQ h/MOBM45/7/JvVExa76qifwH4PR17dDu1b5K6aZ8KZVddk12Sho3vLDpApn72T+la7b0 JlREhBY2TAfIcfsyPoB0q9kYL5EIp4vrajdKgao8ZmNNV+JrisjwWqNLfP9gNLwgtHJU ORZAhbf9kx4kCN80Mo7RyJHZS7MsZXPhQYtYfI+qRdS0YqZnqb+WajBki1NGT9Gy3ptM Cg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23062n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:33 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2cbq031924; Tue, 7 Nov 2023 23:08:32 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2247gk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nFkwqhc/hZdDXlhT06uCZrO90fJ9KGN2r84xoEtaLwhrVX9geq1fJx2wXI8T3JFTvUcABXMgpObTpnB2PXgy+dVDW096aJ+WOVYpaCoWABVWMPgF/5BVCrEEMpx8NrTB1vs+6GnplbsGIs+p3sul9qJtjkXNbKJC6Yx83xm3LylFSWK4eVix5A/QLEBn/Mu2CWfjfzlmpOiUT324tGXrknbaCePGbcj7I1L1rwEApxDsm1vidL4a6Gdk9PjXE/5XgTTwsmjXiIVJs6cK3G/eSEsn9Ih0drapj7zDFFLL4ipH4bqEX5PehMDW90TY6SbsWmggsLbWYUpXWFBY2Q8Z6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Nen72dyIbcMLqxVEMjNCU3b1BhvmPRDB0dQ1Q/BjO8s=; b=EZlBOlvacbnkkVJQRFJYnKSnH0/m+dTefw0S8zL86u2IxZLXxxn9JXFYnF/y2Se1Y5ryQBgLh5VrnU6MWJr6lUe8hxKSH0XlHUv4IdpHomXWUEOGLagSBd515xQDAu89m8TJVkRwBRv581732XKagghESdg+HtDTy+UNXKxdwaioyIOok0GcIO0FzmGtowdPQOafFiw6XwUjRPtNTn2Cj7TwQVzr3WgTZERWcjRm+aVkvF0iLELYHiz3vVnpfr5EgXL/6ojwfaIRAMDQLJ5JcGvBubtAJskns5BZgFgM3BsqoBKw1vR0xalH44RnWakYBqx+aZIjLt+cCn1irAGS0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Nen72dyIbcMLqxVEMjNCU3b1BhvmPRDB0dQ1Q/BjO8s=; b=r72KnT8jrR4vTwezPQI0P9QL2BTgnSOPqBHU7ZmdX9M3w34jICUgqcYE8zWYkBA9pDHTezXBdN6QRUOiHzxEkdDetXvGniNLtsOX5LXt7lkegu/k1l2+OG0mw1KyvoQVkqEni4sdx66aVe5eZSUyNw9/2uD2HpPhK7K+8CfP2NM= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by PH7PR10MB7010.namprd10.prod.outlook.com (2603:10b6:510:274::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Tue, 7 Nov 2023 23:08:29 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:29 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Frederic Weisbecker Subject: [RFC PATCH 59/86] treewide: rcu: remove cond_resched() Date: Tue, 7 Nov 2023 15:07:55 -0800 Message-Id: <20231107230822.371443-3-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0335.namprd04.prod.outlook.com (2603:10b6:303:8a::10) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|PH7PR10MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: 965bf1d3-1b95-4a2e-9bce-08dbdfe674b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ye7ewhUVNKyDovM9qQCCJmXFWb+401qftjiHw6abzG4KTKoaHfJSh4ElNKtKGbIrT9DsgTncs+5HdMn1N9k+M71uxqDYAg1h5PP1nDZMA5uoh+EfV9P6cTqjUvHY51rcaRA+wWVgh/fUZ4lOnSxeAqdquV47AMB2ef+zA9dGe6afyw2+VU32vQ2RAmMNPtOew06Nmb0PIMBlXhqZl6twbXuUcys8G/kPJmQrpmcBXmUMrzomvvkEzzVkgXnCz1ERqUqnKUX+1f1Ois3bGSKZM2MlPPVGQ7L3ScqUgYrnvpylRFUjRR2AsJbzODsXolc5E1wLHZMt3WjMql0kefR9qIkCvXNRQL+DDJhpv34lrNDXpgVKQJf186m8+IholYbR3BANjAMutAPKMdkoYuju36oYDf33LnWoVL0Wg312p3nhnWW/0BVW0Kz153EAkIMwXp+ZLOLGxXCsU4omyWmMtV9ccxmxOiezBNspfF8gjh1NlG3q4xWHQLS7JXxT9w+y7JMm1WXQHOHir9XIw59gn5hXHdTk/wlytcGq/S1Wndk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2906002)(7416002)(966005)(7406005)(6486002)(478600001)(6666004)(54906003)(8676002)(316002)(66556008)(6916009)(66946007)(5660300002)(66476007)(4326008)(8936002)(6506007)(2616005)(41300700001)(1076003)(26005)(83380400001)(6512007)(38100700002)(103116003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7COX9TE14FpqLTj/ajK90AQFozphmqli+sOCP+r1NZOQCKSk8cna9VDZOLezlhnZj1fDPtWZLvfXxDXNE9AhYB5sKQFmE3rvNh7Ru50EFse07C7VIGNclUGeqaJOMES08Cp1mx85IwtjTSI92RA4SlFwy/zDaMArmKzPB0DVH6kuCBoj+oYwBC33BQdDREZDJcuavtYCzk5hlyRQ/we/OvoPa/emKVe0kSwQ5N43MhY1kNYSB1WrA4IT7sgRVo0UQmpWq7QF/USZYGlVDMg1eWtSf9tDYegBqq8uZOAkTLmvhfHkp19+t8AMubhELQMhGnJHcekMXFqYYVVzWganS8DBlwQNXPsAeUhcDj/OeWFAf/a5Z8P49XwjKyWwY+S6MOE8AgrIMG9R0VUyqY4X7yjOY2TESrNUm7e1ZKxUhwjKhPu/ShQof7MX3Eegl3wyFFhBd1TKOvhjhobsbbTqPpUBqxMB/z7jRFDsbYEucPJhouU/Z8zIYq+ic8ICfjCqO+v80oBsTx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BZn9qbWPLKGEt6UApCaSj3VUXONr0FrqO1qzXZnblXLSvUkth2mjd28VAMcvN47QB9FfA4xcdXsZb284yKc6KKE5Vck+ijdkfB74hovwOYG/3Q0OmBm/VH5N31DqaAG/VLKFd75oNvfpo1b52hiXV4aBEJjZZ2wd0dRjLQ8QkgZiGmENQ/FH/cUy6kJ3QVzJa364OOa7pWSwGJdFBbuNePGltgolPHEBkmz8XXwbVINdoXzkr4SJ8RnOwAkAf5Il2i7rZJQnTq3d0JOZ11/+slYjEzJl7mKo5COB7bkQ3f/GrmE3ONbVTlE8SaNPuhf7LdqNskkGul6cRY5fSU7zwVrkt5WQtJnvDCKfGrptFtS1iss/AGg9aJnewA0YyLqve+qfytgM/fvcCbRSvalDvf6Y2jEMLuLVJ+kPEm9O8htTTQdOR0xfboxH4xsmGcCSXOcjp5w02cNBHQR0QVP89S9sBgvI/73/zTACdOXRnjuTrJjirPzQI7Za1Dgim372fPNNpHOcpk4kn/4XFKpbr2EOc+AotbYqN1cj5yx9Lc1cabQkEkEA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 965bf1d3-1b95-4a2e-9bce-08dbdfe674b6 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:29.8136 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /u1d7je9Q5u7zyoFJw+qaOkiqoiKBQJYbPo6fY/PqD7fRMz+VG3rpg7XZi3U0eEHsEtdei9XjUNn5QR8I1A3IUdvcBBYp3m+cxI05NIVWkY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=667 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: mI3WrKvtBIps17UzG7Ct3GaywVT13Lwe X-Proofpoint-ORIG-GUID: mI3WrKvtBIps17UzG7Ct3GaywVT13Lwe X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: C558740005 X-Stat-Signature: cokq9nt1i5b6kg8r36s8s7wjexgze44z X-HE-Tag: 1699398535-118896 X-HE-Meta: U2FsdGVkX198QFXJj/UxLDcoGbPjsUCJxn75c+4msF2Bsq5X3sxp3xwG/Xe/jvfaTug/qRdflCkGSnzPTx/H/s2uitC+hvYTXkoNvHcrIgLUg11Pcs/YdJm9gcl0H4EoVYSiERIXhpZPWPS8sqbg6AzJZzBHZ8fYHBlPmDMYL4W3zSHuaKP53lgH4XKwJbqj3fMcpmuMjwjMut4rMxB7vZN4dF9A7+GtoiZeg0Iq6TLGWo3bpP3OkwSQV/VdseMSHR5OC/cNezoYqOx4bRGvofMBjNxqmy9ClkKXj2RqVxl7AajlbPnnNGGHJprInbYUDmHbZ37rI401NFqGpaQjgA39GA67F/ERhnoHwePVkNv1wrbnZNHocB15uz2t5dg6x0JbbO+Eh/mrJyRQbrFEA11o7ufnYW3xNtfqQCoaBBBlbYuxElX9S8IcZ77fnANjzrmY2yLhEdvGoTWqd9zffHW/L/whB1P+HhVT9k3XhR6nCjQpmPL8ekKzw867K96zbS68+9rue1A/oNqYKyLcA1v6BrIANDZKuprrfPn/FCy9BTcJYtSdLfncZQRP8WEaCrPpaJUohedkYSxWGpfvH/mMXf7m1MOWWlMakLQbXg+Blg75uF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.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: All the cond_resched() calls in the RCU interfaces here are to drive preemption once it has reported a potentially quiescent state, or to exit the grace period. With PREEMPTION=y that should happen implicitly. So we can remove these. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: "Paul E. McKenney" Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Signed-off-by: Ankur Arora --- include/linux/rcupdate.h | 6 ++---- include/linux/sched.h | 7 ++++++- kernel/hung_task.c | 6 +++--- kernel/rcu/tasks.h | 5 +---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 7246ee602b0b..58f8c7faaa52 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -238,14 +238,12 @@ static inline bool rcu_trace_implies_rcu_gp(void) { return true; } /** * cond_resched_tasks_rcu_qs - Report potential quiescent states to RCU * - * This macro resembles cond_resched(), except that it is defined to - * report potential quiescent states to RCU-tasks even if the cond_resched() - * machinery were to be shut off, as some advocate for PREEMPTION kernels. + * This macro resembles cond_resched(), in that it reports potential + * quiescent states to RCU-tasks. */ #define cond_resched_tasks_rcu_qs() \ do { \ rcu_tasks_qs(current, false); \ - cond_resched(); \ } while (0) /* diff --git a/include/linux/sched.h b/include/linux/sched.h index 199f8f7211f2..bae6eed534dd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2145,7 +2145,12 @@ static inline void cond_resched_rcu(void) { #if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU) rcu_read_unlock(); - cond_resched(); + + /* + * Might reschedule here as we exit the RCU read-side + * critical section. + */ + rcu_read_lock(); #endif } diff --git a/kernel/hung_task.c b/kernel/hung_task.c index 9a24574988d2..4bdfad08a2e8 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -153,8 +153,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout) * To avoid extending the RCU grace period for an unbounded amount of time, * periodically exit the critical section and enter a new one. * - * For preemptible RCU it is sufficient to call rcu_read_unlock in order - * to exit the grace period. For classic RCU, a reschedule is required. + * Under a preemptive kernel, or with preemptible RCU, it is sufficient to + * call rcu_read_unlock in order to exit the grace period. */ static bool rcu_lock_break(struct task_struct *g, struct task_struct *t) { @@ -163,7 +163,7 @@ static bool rcu_lock_break(struct task_struct *g, struct task_struct *t) get_task_struct(g); get_task_struct(t); rcu_read_unlock(); - cond_resched(); + rcu_read_lock(); can_cont = pid_alive(g) && pid_alive(t); put_task_struct(t); diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 8d65f7d576a3..fa1d9aa31b36 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -541,7 +541,6 @@ static void rcu_tasks_invoke_cbs(struct rcu_tasks *rtp, struct rcu_tasks_percpu local_bh_disable(); rhp->func(rhp); local_bh_enable(); - cond_resched(); } raw_spin_lock_irqsave_rcu_node(rtpcp, flags); rcu_segcblist_add_len(&rtpcp->cblist, -len); @@ -974,10 +973,8 @@ static void check_all_holdout_tasks(struct list_head *hop, { struct task_struct *t, *t1; - list_for_each_entry_safe(t, t1, hop, rcu_tasks_holdout_list) { + list_for_each_entry_safe(t, t1, hop, rcu_tasks_holdout_list) check_holdout_task(t, needreport, firstreport); - cond_resched(); - } } /* Finish off the Tasks-RCU grace period. */ From patchwork Tue Nov 7 23:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449426 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5013DC4332F for ; Tue, 7 Nov 2023 23:09:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D8E8F44017E; Tue, 7 Nov 2023 18:09:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CF0C444017B; Tue, 7 Nov 2023 18:09:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF4C444017E; Tue, 7 Nov 2023 18:09:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9672244017B for ; Tue, 7 Nov 2023 18:09:07 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7DD30B5D67 for ; Tue, 7 Nov 2023 23:09:07 +0000 (UTC) X-FDA: 81432700734.13.8D59EEF Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf10.hostedemail.com (Postfix) with ESMTP id 26789C0006 for ; Tue, 7 Nov 2023 23:09:03 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=HQNIEHyZ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=W2Rfwwtv; spf=pass (imf10.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398544; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zFNbI+mEoF4OPOprgv3SvDkE7nHhMkWabgKBcZWWtH8=; b=j9zfix1eMkrNrIJ5TR+MDcpLbQCfC+lewR0UC317GXpOBIFxmbWQ5/EKMtgTxV1/N0Akn+ IEaptzsl7RfYc8YYFNkGeZuMYuzO3mDYZQ8wgjJnZdl0FHYSg3LsUuglMdFt+T0Oqwekhs cnEZGUQVI42AyyCL3zpvThv7pBWwAww= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398544; a=rsa-sha256; cv=pass; b=GxygYUBdUgJh++HTIrwMPfHgYELE5Uzn1/6VsmtLYxP5GDQh2A/7BM8ed/sNZvW8sLldnG 0Z7ZZ/HDaX0PXXUZ7iZ34fiNaho4wQTBkO2zsWWeL/wWfW4q4SQyTxk0ahieHeWQuksO/E G/R7V8oM9Br2DZEnkGTif2631ji1U04= ARC-Authentication-Results: i=2; imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=HQNIEHyZ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=W2Rfwwtv; spf=pass (imf10.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJPE5004600; Tue, 7 Nov 2023 23:08:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=zFNbI+mEoF4OPOprgv3SvDkE7nHhMkWabgKBcZWWtH8=; b=HQNIEHyZMjp16WYt97omfLHOkrdTyx4FpHlcukBR6TP4/NFUKKZcJDGTkGs/z93RrtP1 dvLIV8CFji2RwZCQcHwWLEZJFhjNzI+NFl3tnglnL3ADfu8uT80ivL1yLo4FoPZcIt6+ qsg4BDDI5YhLloATP+VUgd4fkVJX3v259ZsGCSTbgYo3BgwaXrD9+o4OU6reWByUfCcK KXzl0I3QrGFuKTdXQPc2Hh2gUYVfPir8eKKEvtVVW6d+p+ELVxC4rD1icmp0Lft06vxx ZTRZdqohi9kzZGz/ESt+eoUceG8Atj+enhbjaJKIAT2xxMYs9/Cm5lbxb6XVDMVSjOHO xQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g636-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:39 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2mJL000336; Tue, 7 Nov 2023 23:08:38 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcb5k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LilRy611vnOnbvIBWasTXNaKL8QM5l8DWKhFF4D1n72ZWM7bKQmuJUgX8qVsjMqAdEIZZNWGraUTQ6IQC5t0bXmUaVqA5VYUIGqYJVVRCykr1LrrfEDnWdEmdAvOXX06sdc/g2lH9QVWhF06EPSG+01GB1nKeUBZcZSN4WlYxEfnDwyTqsk9rnog8brkKcUDvRqoZTOvKjkfiaemkwrsBmfkrnxfTU9Eg2d7mq2UShvE3L26HW0KqIjGR8LknOLYxG7WcyNApUjgK6JqVe7m+zLPNcI6tlLZzepC+qeSTfvPME3p8lTAKa2yyxKRolLpxlxXcy/i1VukaRJpITQwOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zFNbI+mEoF4OPOprgv3SvDkE7nHhMkWabgKBcZWWtH8=; b=dtyzp18EtUPnXESgBfhByG9m9QVT9XSx2DTYhIhFn6UK0rjSomcoCFmZHmpKCWK7Knw+YtCN45Vsm/erZZvvvwm0FMwr+s6QJHgTNjBdRXnzvvZgOcOebVO2hJVA2QO2ZP/UJUr91MurMyDM7pCgBkRstRa9pg+52YhZZjZVppBG35U6GxJ14O4zhm154RHakxp6pCiiJeOhpGNVxxEvEjLFC/x9ON3qquGtFp+W8nD/xD+Ii07oa+70d8CjaqIyc19VI1RISbkOu/E+Ugc1EDFy9ZuIjOuLsossRGZxtmxyGYdb52nQ7uk/UeH5UaMmi2S1621tfCp54M95IOYoMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zFNbI+mEoF4OPOprgv3SvDkE7nHhMkWabgKBcZWWtH8=; b=W2RfwwtviNr/AwLCJUk38Pu2L5+dATVD9rSAvL6LGwk404EZqswmrISQ2y97TpL5GoF/51Uy+lVdNfGL41tWi3FofV8sAK/Ca0mSagyXSTEwRll/46Ip5SpaSkQhg8aPMpdbUGcuEWgtcEV63tIUUdExEIO+Rti4NMHaVYsMZmw= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by MW4PR10MB5704.namprd10.prod.outlook.com (2603:10b6:303:18e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 23:08:35 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:35 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Davidlohr Bueso , Josh Triplett , Frederic Weisbecker Subject: [RFC PATCH 60/86] treewide: torture: remove cond_resched() Date: Tue, 7 Nov 2023 15:07:56 -0800 Message-Id: <20231107230822.371443-4-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: SJ0PR13CA0123.namprd13.prod.outlook.com (2603:10b6:a03:2c6::8) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|MW4PR10MB5704:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e8e8402-f83d-4fd0-8e16-08dbdfe677ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qHwRE1iIZ5umhXSpn8ZltlxCs5AfHUESgbaC0azNrGGo42A8CVkRQkUaVcpFgdgL14/QpJx95VmAugl2uqnrcSOvTsffDGe1H/fOdaRQtypnmBgxn2zispLcgPy/Fgxu4MDCCA/t8ylId6hQhZbUVAvWA00KdVpLIwvDDAT979x9niV429AgxiN+iWps/0MNUf9kZqqafNHAJGwj+2UrY6gve4nCeqCBjrJlIJDsH3bWU/tVu7z6ccrva8U3PsAIT4tis2RIs+9INbwnywcJvcwe0dhmTCHFVoPW051cVQKRH77ve5001UP4yt1KEP8iN0SFy+yocr02R+rs/WUmMYLizsp03WnjaPQjOrXeBBy10IUq8ux6F3I7PMItUVmW+fZIvssdUylky/+TZFIqye+bCAlHfcJyiarvozdB7XTr8DF7YxsGxlTFgC7kck8qcNUzzdgGj+AAnPzIspLny1Ekk+oyEFGgXnv5Xv8gWH369177730IGPuVUDx8KvINJMUaGsZfkNTNqlHGaSqPx3nZiYASuE4g6s0fNNZLlJwyvqI5DM276LX30447FGXj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(396003)(136003)(346002)(39860400002)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(478600001)(41300700001)(6506007)(2616005)(6486002)(6512007)(7416002)(6666004)(7406005)(8676002)(316002)(4326008)(8936002)(5660300002)(83380400001)(1076003)(26005)(66476007)(54906003)(66946007)(66556008)(6916009)(38100700002)(2906002)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CT1CYeBkVY3cJhc09eId/R9Tbdmie71TWl2RYCQZtK452bqktWI/GeAM8TcScq1yYHDH+noO4rHeOZh0WaVEnK4QkHnivLOmnLlzZMhAo10ZcnzYFbkDA9zrQQ89xZw70vUy9J3qnAbykd9QraUPSbULql7XO0R1wHVp3bmTnKudkDBSy9ttXj7vby5lNIvhQet1mJM4GfinjRcyMmUcP5jmgnTrOwuhVRNZBiKDXpqWJI4Rac4k/ZephZbWdsBevVdFdRlsWHviM7sQfBqjwkJHCPVxQb/YgLji2cPEdeY19b+oc0cjzslVSt9u2zkPHM7Dry3bcoLMxveF/V8fYrlnjpZKtQeTNH+0zpl//mt+3fl2cZJncAoHvNG+J2Bv0785jKLD5e35Tg/Piqh4bcS021k/E4mnZOCQqD/6Ea4nOh3QVl0ZaXCOt9CkfK+zunsdcSX2vnXtaNgDBZolrjr8Ziqo2eZpD5+CswpOfnP5RS8lK7v9rcswusyNZevy1gBxHwOmUnWjZdMh/NTEnEVIj31fEiaRGgjldZsDhqXHEBQL9FF9eammUwqKiQ4y7wymRztbUlVSSiY1JBRRMJVORWOaXv6L3VwjqhxWOdyNd3VNd0lDTf9Iz1y+93wWqlpmJGNoDek5C5EBNh+Yg5REqvUin/IFtE63YwVEfFbKf+a2Ui2ZGsd9+tzvEU1PLYsIDdJ77PXX0TKjWJ3fNtjGif8ujlSgPLsfrcJnCerjNkQscAlVX4644qWWR4QcQ5YPNCPe5o7ciJq6K/MJhbf9P1m0pEPka3vOEKCZ5BQe82vRoYaEaPY1TWC3F8j3icnQNdicpPVO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9I08LMKLaa87GS2b8N9hX56YDX1ppsc3VoCzjKqoUQvwSUgbKj92HtUOG9CiyrtkXxbWcD920mRZX2FGKG+cAhLlEwbRxjqhwBRVsBRBw8FsiaG1dV6O7HWIHCp5Y9b+E9HPbKmoNU4/koR4bGL1AMc5Yf4FSTKgGMX7FLFePufoS04NhAflBnAHqT2pr098IazA8QmJSbOdknakm55Moo/QYH22pkvLJoD0lQWIGBxKYKpaJWr8r/iXnnj9VzFMRCnG3SCb/cKvinYL+9FUhs84pz8oDdL9JSWmR1lcocv3G6RBc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e8e8402-f83d-4fd0-8e16-08dbdfe677ef X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:35.2186 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lq5Jzmgk0XYZ2wCIBLfI+D50QeAfYnsr4ZopUlQ0scRFiMgWGNgb6ClgLvk3H8ZQY3P68IYPEVthpRh+vcQ5lMZqKLAqH3H45Wup5QiUoio= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5704 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=858 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: 4P5D2YlnRh5Iy2JPqwKPi0ErUiHVOeB1 X-Proofpoint-ORIG-GUID: 4P5D2YlnRh5Iy2JPqwKPi0ErUiHVOeB1 X-Rspamd-Queue-Id: 26789C0006 X-Rspam-User: X-Stat-Signature: bscqoj1ao7jrs48yhnhfii5rn814aq9h X-Rspamd-Server: rspam03 X-HE-Tag: 1699398543-249281 X-HE-Meta: U2FsdGVkX18ZofHWqqIcwEQ8N4DMRC6MFJV4X9hFFIdszmz3gZx74KlJyBCNwvJ2iWaELIvsRtBehP2MA2lpTqCuvMIgr+StZhBpmEChPsWwkghuZ10IZWkf215ku5IjH8IjgnoJNohZNieRyRAF8nD16kNQe8HjyFWsUsQhC135xkMaJOwL8IZ9GgtmWIllppRrvl2mzoyMzW0+4YQ/6aODXmVWWhyrgslPnrTbVHoEojzEeY6PHYL7yRH1/KHlaeCbQldxxEJ+nmotSWfZADzT/HVllJYf3F+fiP2d4G13k8hanh/ai+j+yPjEWXvKoGU6MmMeLb+RBxTnEIza2a4ZPE1lR79FwNSxeV4RpZrDX2IEpeGIk31AeaB7l3uNlEMHejqZ9oeZxcpSw+KEpSR5jbibjMZq8vdHzreeFx0HAM36IAZRMPiTy3M3OuuhL3tfTuREWHzydw2OCwKMCM9D5MN6lWteCl1/eHdkIGr4iTeg6G3xFmdOymo3QmHJpW8xwNki+ZCEBQmbZdoOhaejcKX/O8wDRfBUXjksY4Jt7YeB5jFjtqMpibW8Ph8W8U8KDmYgGxGtLu6Tu39IEA889fiW6LaxExbZ/iND3ho4n1fwT4399sgT8KACBa/PmFynISKwawBNOKojuXIOdcRN4wPz+h62GXFoe5r9f1ylT1A35+G+kyDidV9LgtD9JYJSg+3n1G0LjkoMf8ppPtxWkIb1EVgVUYsv6n4pvVJLBS2omECQTuHjmuBSUGjxUYjmUjEzTTbNnpIowuyBgn7drWN/RqSoR9vBv+CXLsxvmc91DoryheYxtYgvlBzJ5Y5goiliM+Yms0DmZTx66FsUJd2Mdw4eDIQszoL+lNKIxOQhknqVViApUIZJJeWz+YUGPhjjLG9P5KcqmupHvCl1cl8RyaRCq1/HdiyDg8392qtkj7YoyMTP2fSY3uSnURhxZ+BVKOTyaa2wsxK dLPRPn0q Lf1+UCqv393UbdsRcFaZW1B4nd8M3J2Uudg5iycaCmyRzZDAIyHfcW1eJSoJXrP/IfIPl6sn4zFEeZeY+FcZAjw+IF50vE8/BJ8BX7cjw67hFVtLWxspb8mU309uiLO6/7J0SkT1XKkhRiSQI6Dxg5IEQ9UE2uQ3MwfxI4fStmrwO2+xU/UBN2lz5t7gFQnp6v2xFfZ34hBI/W9kPn5K4SG5ElfMyegoP8DkIql42rMVsU0bkdS4EhwvlpustwwZ1iBthiOZ0UlyC9/lKBOQ2J7pJ6gvl6aO75h0EIZLK79UldqGePzlhVWlfV3M4YXuo6FbKdk9iFe7p3eGrOy+EAX40ym3pLKVlJNJ/6nnDtCIgMS04QHVBKd+a77xwPrhhac0eIaJAEoJ3pQRu8+giVG9Hxxrm+f9x4kRypWE1XUoSGwIqB3HR0O+ouSphUDaO1qm0tHX2GEIho96y7+I8rXBRrvCdgUMjmnsU05zqr8qDCzHc3VLNjCI7nD0x2R0nBAOtbfkNRG+JgznNGzvogzhlt/7RhugU+WKO/XJyQwWnLE6ylsjEx9U+i6vPKG+d7WueF31N497vl5QSfoP+A2Xisshp7VOCQcvR X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Some cases changed to cond_resched_stall() to avoid changing the behaviour of the test too drastically. Cc: Davidlohr Bueso Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Frederic Weisbecker Signed-off-by: Ankur Arora Reviewed-by: Paul E. McKenney --- kernel/rcu/rcuscale.c | 2 -- kernel/rcu/rcutorture.c | 8 ++++---- kernel/scftorture.c | 1 - kernel/torture.c | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index ffdb30495e3c..737620bbec83 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -672,8 +672,6 @@ kfree_scale_thread(void *arg) else kfree_rcu(alloc_ptr, rh); } - - cond_resched(); } while (!torture_must_stop() && ++loop < kfree_loops); if (atomic_inc_return(&n_kfree_scale_thread_ended) >= kfree_nrealthreads) { diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index ade42d6a9d9b..158d58710b51 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -81,7 +81,7 @@ torture_param(int, fqs_stutter, 3, "Wait time between fqs bursts (s)"); torture_param(int, fwd_progress, 1, "Number of grace-period forward progress tasks (0 to disable)"); torture_param(int, fwd_progress_div, 4, "Fraction of CPU stall to wait"); torture_param(int, fwd_progress_holdoff, 60, "Time between forward-progress tests (s)"); -torture_param(bool, fwd_progress_need_resched, 1, "Hide cond_resched() behind need_resched()"); +torture_param(bool, fwd_progress_need_resched, 1, "Hide cond_resched_stall() behind need_resched()"); torture_param(bool, gp_cond, false, "Use conditional/async GP wait primitives"); torture_param(bool, gp_cond_exp, false, "Use conditional/async expedited GP wait primitives"); torture_param(bool, gp_cond_full, false, "Use conditional/async full-state GP wait primitives"); @@ -2611,7 +2611,7 @@ static void rcu_torture_fwd_prog_cond_resched(unsigned long iter) return; } // No userspace emulation: CB invocation throttles call_rcu() - cond_resched(); + cond_resched_stall(); } /* @@ -2691,7 +2691,7 @@ static void rcu_torture_fwd_prog_nr(struct rcu_fwd *rfp, udelay(10); cur_ops->readunlock(idx); if (!fwd_progress_need_resched || need_resched()) - cond_resched(); + cond_resched_stall(); } (*tested_tries)++; if (!time_before(jiffies, stopat) && @@ -3232,7 +3232,7 @@ static int rcu_torture_read_exit(void *unused) errexit = true; break; } - cond_resched(); + cond_resched_stall(); kthread_stop(tsp); n_read_exits++; } diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 59032aaccd18..24192fe01125 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -487,7 +487,6 @@ static int scftorture_invoker(void *arg) set_cpus_allowed_ptr(current, cpumask_of(cpu)); was_offline = false; } - cond_resched(); stutter_wait("scftorture_invoker"); } while (!torture_must_stop()); diff --git a/kernel/torture.c b/kernel/torture.c index b28b05bbef02..0c0224c76275 100644 --- a/kernel/torture.c +++ b/kernel/torture.c @@ -747,7 +747,6 @@ bool stutter_wait(const char *title) while (READ_ONCE(stutter_pause_test)) { if (!(i++ & 0xffff)) torture_hrtimeout_us(10, 0, NULL); - cond_resched(); } } else { torture_hrtimeout_jiffies(round_jiffies_relative(HZ), NULL); From patchwork Tue Nov 7 23:07:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449429 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4DFDC4332F for ; Tue, 7 Nov 2023 23:09:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C256440181; Tue, 7 Nov 2023 18:09:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 74B9644017B; Tue, 7 Nov 2023 18:09:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5074E440181; Tue, 7 Nov 2023 18:09:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 35CE244017B for ; Tue, 7 Nov 2023 18:09:21 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 175CE1A0AE9 for ; Tue, 7 Nov 2023 23:09:21 +0000 (UTC) X-FDA: 81432701322.22.5FC8F72 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf13.hostedemail.com (Postfix) with ESMTP id 83AF72001F for ; Tue, 7 Nov 2023 23:09:17 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eGRGPioV; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=teset856; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398557; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2TkODi4vvaw8iBZv3KVQzINFDwj61bfgmNMI8FJEOzA=; b=vCsEocc6oFNIX45vVdt88MYa1doKpyJVOsP9oDorw8xIT6cWoYVz9Iuv2DTbTgM+x0BxpN bxGaU07YeXoNpewTky3sA9/h//NB/pselTvvT67xF0glSUsJhOez0ct9r/8bXme/fsq2VQ eIG6ne84rAQE9YIObZzK5pnEM/+0+hg= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eGRGPioV; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=teset856; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf13.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398557; a=rsa-sha256; cv=pass; b=yIZmzICHeEK1lIwaljWuuy73lSlDDB6TxjafwMv3miZ0A/i6xAQHoHTJ62PJJ5FfT9aOGp 3D2dJ5JGZ0kkvYkJ7oDWsLXlHhPLQjPhVdCYKItRbzBCsH6TvMZHXcrnF6ZuAgGWZBZI4T Ztj4pp7NNY5Rkt31yZN3amHgTbZ7PpI= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJjp4005490; Tue, 7 Nov 2023 23:08:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=2TkODi4vvaw8iBZv3KVQzINFDwj61bfgmNMI8FJEOzA=; b=eGRGPioV74a3lb3O/sinRQbOWGFVsw3WyDdScGka5IDIkto2tYbwZO6WCICIpyvbqc+l vXsnlggLvTNnsu0gPvo2zRlxwbIkZM9BCTTdBIkvLhJvCHk8iOUzdqdYm1oRm5nIjScc ItgrdHYIt3GCJBV99fvdtSIH4wyYZOapes+t9ZSDbKFaMYuWpzwio7SED+ITgCe2r5nL o9bV/0IRr81aZ0ieJU8j2BDTpMlI5o04RbRPEXTOhssrMG6Xfvmz2JOqmMHc8e4I/oKU xwD1SZc5afN6gWTKDxYiqhYh/guy9NtflI901jWo2PWC/nDQOGLCc0XksIiveShK+gDv ig== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23g639-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:41 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N3G8u000430; Tue, 7 Nov 2023 23:08:40 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wvcxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V5Cr9DD9twVzyB9yQrtX/h7aQnZ3FgRR7/PbqL4T+gkYNdCPdUQfccm7j3/R2E+/y1nOx516t7KQhGEznjCm2X+xo0F+UP0Sf8w3ssO/5K4AMzmLvSHs/eRqSrwnhDIbmENwCKFT0pSCGRIRF1DYuTvKUTYeSS2AWclj2kh57XVKfWs+Qw7THz+M/6uiRz5HjwgWwXyYc2W0VvDbuimHMvwxooXAnE8BNTLNStb+nMHHSpOIZxbK5+kHOyLpudxyo4Hq9KhrJH/L8I05CoYa1WlHQbAyRrMa7bQ4lg7/T5JDkkPlFi3QpVO9HpyP5NpY7YaSuXcvUaS/8u1zApdOhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2TkODi4vvaw8iBZv3KVQzINFDwj61bfgmNMI8FJEOzA=; b=DY0No2atI96paX/PdS2cKGRWnhDaJdpqrH2Bea9gV0hR15dif93U2kybpOymei1pw2w32njznXPTeaDN6zgT+CBrPL+FBU+cNLqMTC9frU1Mam09YmALJNpZQYVOMCcErq5OLZlYppC7gn8eLZyfIV+SHupS58/S8tj/iokwl08+hK0XJ51ZfEVikwxtMGvQ6KSCrKeqwPFF40vPulxMZpIJ3zQmLpoag5CRTj4BVv4kM3ZBi5OZQTJbRgYRmN1uqpo/tkJasliXVxAQ73gzIGMElaJIqHW95y8eqKL2C7Bz4zHbbsvOmhpL/6yq0X2kXk29PqTZCWu79dV+SgaXmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2TkODi4vvaw8iBZv3KVQzINFDwj61bfgmNMI8FJEOzA=; b=teset856oHjLv2i8vifkv9ofGtxUEFMlkCwHzC24trRTr0SKMlIWNNVRcc2MeDJ/9DQbuEdPFe6xfk22pZJQEpWm1TFMmcuYt4pFtUEe0KJ2stC6pgJYoFCiScjz7NNJnvb6kpPW7VnULCZCGvE3vuIdNZ+y5YK5xg2meQtw0ws= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by PH7PR10MB7010.namprd10.prod.outlook.com (2603:10b6:510:274::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Tue, 7 Nov 2023 23:08:37 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:37 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , bpf@vger.kernel.org Subject: [RFC PATCH 61/86] treewide: bpf: remove cond_resched() Date: Tue, 7 Nov 2023 15:07:57 -0800 Message-Id: <20231107230822.371443-5-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR03CA0014.namprd03.prod.outlook.com (2603:10b6:a02:a8::27) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|PH7PR10MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: c338200d-6a48-4df0-1cb2-08dbdfe67961 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 45iQbgG5WDIS3h7izM1KzeNiajip4E1k9sUzo5KWQ4kbmeb7OKBfgtGYKPacLEnyQpvRRuZrzUL3yOfRp9zjzruFVSNE/ifh6xIB6pGCmrK7mY2kVblsvZ4PvDPS/bjiJEOKLwT2YSJPW3z1dgaZbKG3DMTIgelYomfFqAHl3P/SLx9ANs6aIuyqm+tbp+6IRKOqUj9rRGuRfvMta6ze75dckdUesiOCGM1QKvYDA1WB+ev/na1KwKWIsbin19dHoYG+M6MN8btOxrWPb3fMpzpMQNpb18YKG2tAV2f/gWnoy/ZNeElJ8aJ8sM6MVttEH3F6Eyha+r88m4auUe6IZIE1yJQa6qXqtZTLjtmq4ZW43fbrSJyEcFKuryVVLQkcWpEDZJaIowpZsoiSYKvU4Vc1xFUYHBcnx7GrPJPN9p1HpbGTOc0r8zU7Hfncsb+EPJKzk475x6Wt3ylGtxIfEh+ktf2wSi1+2ssoeevE5shqaEQedSvEO632v7qZUKI3fu8RveMoYmEvVMknMnfvxjH4+GBmbV0N9IJLMmPkvDY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2906002)(7416002)(966005)(7406005)(6486002)(478600001)(6666004)(54906003)(8676002)(316002)(66556008)(6916009)(66946007)(5660300002)(66476007)(4326008)(8936002)(6506007)(66899024)(2616005)(41300700001)(1076003)(26005)(83380400001)(6512007)(38100700002)(103116003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zIY2xLpmDCHiEUb/QzuAIb69NuIJaxDEDzn+zK3nRll+eW2pyUbnfgbUvSuuYQHyD64qeo6t+prqbXNaw9Li8rbBTbKu7rDj+t7DrtjkEiOGdJocW2K3BUhHYjC5A1QObzWRCfq/VeWiPk2H4a8kjTKdcIgLCYVoJfV8Te0MppLTyVnT6t/q4mD1nwib+gRsFkh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LVv3OLPjN4Tm+plpbM+5w3i6EdlBe0oRHWeObyrO5EkrQco/oLookywUnMnoynN3dpx2eBVDtDZwlmmWV5/sedPd0Ne616gK8Q6m1jJmhwnqQhJ/wF9tUf6VL12LRjIyjgBXrNj1lFCGxxuoLohxiwF/n2AaUSLQm3cF2fIWenxhlCZoQ+UV5FnMx0Am0I5V+4dyz1H/MuwvjfBkhfozDSDfP0jJjd/VAjkkP4JPr5xtV017bbY5ZvBKdgD0w6I2qEYqmkNxETckCL/FGEoK4HVo1V8LmojM++yecjgjwhKeoJyASkZTgGCLi+33BXlQPy5l8TOYrl+2fp6Phho175NyBZu6Js2l8vHPzbo+CAAnSAyFV+5aapCA6oX7dJeUqAQ/R0/wtvRNm8XGLgcPnZVRlSr5peOEHDq/zCD9AvRlAEA6qDVU57sI59hzRuWwCqf+aQoza6pqJHZ+hrhWvFqdOcusjyKFpMYHiOA/bnRqDLa2up7GZYtw3lBIX+6C+a2cnZ+wMVCgPAgXy69heNsCTaep32cnjDJZACls+noZDFURR9xHPxJZyJ+MmCnQNV+7cKflX9yAyHD+n/ZKANBI7Pn/nsNx06QNUjy8ofAdbzrlf5cw/zG7PaA+g/GInao40S6l0eqEd0myNgpC1klXoK4wIMzy09Cv+ezfzojCkIfjF7LfyjbJOg2vhxfEfgKClYCFR1gsNx6STUvXWxEtr9U6Lq7M5SNH0OgAlLCDhpgevR44ZR4arXGArbpxj2i+6aGiFlRlKmQmi1ish7j+1qKq5Z3uauKjJqHhu15PdylGdUnO6LBFfFByJLdtS66h9+h665HNm1piABjnKihJcLzsWNfWqmbmof37ZsupAMAWoqnqNyfmlV9YPhrBevhdsIOeY3SNbx4mPaIdBVcbdLfnjvh0Oc9842g0EnyUwaNPh/lTdT0T3HkGdVRgSCfEcUWQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c338200d-6a48-4df0-1cb2-08dbdfe67961 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:37.7257 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kYJwWbBcOViNt5WLx3BW/Q773udAa00DMCR45MayZdvi0AKCo51X3AJV9UyeSkwN70wxvytDZqbc9OIm22fyKsvMC6CZsoheOcDxfEzBdts= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: EIkfdFUdX3_47a-DUUBb5W6ITRtfIFuW X-Proofpoint-ORIG-GUID: EIkfdFUdX3_47a-DUUBb5W6ITRtfIFuW X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 83AF72001F X-Stat-Signature: 8s6omgzw9yfijgsrjnxkoqzjypdeo5aj X-HE-Tag: 1699398557-58071 X-HE-Meta: U2FsdGVkX18+5NddTLNq/zl8jZV4qmqakOXODfSu+cQuzNfeIq2UJNeK4FcFw3X0u6lARUT5IUSR0rwWUd3gkJ1qJKXAZNfKkK+YF6vM67tTLN6UceHh8ADCvwtvlZFMwdbdEZX8cx8O24SrJ/aPZ2T8xIS2GMsy1Rsok0a0QyQefqjhZ94MRUwuYdH1n7mx63UxBUHp86YDP5AETdIV7igKrEw/4oEzPFpT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93UgwmShYJxiuydPTV6p9xSLNgy/hDLSfCgkaQaBtZp2QY38+3a/Ms29ieIqewggQ7jU78rNtkQXMzY/vIMhnalmrV9NKfrVLQ2uSjuFrr8qkJ0KDMCI+rsgh3MkoEhmHNdE4E5nHnNIH9Hu5VI5OZ1PZWasO1pxldXRuE/EKLnaCZ6pvwf8hMVHuUO3bi2+sukKp2vr/jvlKrBkuZLjsrC44pEO7Xd8mhq9bav6b+T7Me7obzC3EI/r5brsVTW4akJJ4RA5dOxE5EE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the uses of cond_resched() here are from set-1, so we can trivially remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: bpf@vger.kernel.org Signed-off-by: Ankur Arora --- kernel/bpf/arraymap.c | 3 --- kernel/bpf/bpf_iter.c | 7 +------ kernel/bpf/btf.c | 9 --------- kernel/bpf/cpumap.c | 2 -- kernel/bpf/hashtab.c | 7 ------- kernel/bpf/syscall.c | 3 --- kernel/bpf/verifier.c | 5 ----- 7 files changed, 1 insertion(+), 35 deletions(-) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 2058e89b5ddd..cb0d626038b4 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -25,7 +25,6 @@ static void bpf_array_free_percpu(struct bpf_array *array) for (i = 0; i < array->map.max_entries; i++) { free_percpu(array->pptrs[i]); - cond_resched(); } } @@ -42,7 +41,6 @@ static int bpf_array_alloc_percpu(struct bpf_array *array) return -ENOMEM; } array->pptrs[i] = ptr; - cond_resched(); } return 0; @@ -423,7 +421,6 @@ static void array_map_free(struct bpf_map *map) for_each_possible_cpu(cpu) { bpf_obj_free_fields(map->record, per_cpu_ptr(pptr, cpu)); - cond_resched(); } } } else { diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c index 96856f130cbf..dfb24f76ccf7 100644 --- a/kernel/bpf/bpf_iter.c +++ b/kernel/bpf/bpf_iter.c @@ -73,7 +73,7 @@ static inline bool bpf_iter_target_support_resched(const struct bpf_iter_target_ return tinfo->reg_info->feature & BPF_ITER_RESCHED; } -static bool bpf_iter_support_resched(struct seq_file *seq) +static bool __maybe_unused bpf_iter_support_resched(struct seq_file *seq) { struct bpf_iter_priv_data *iter_priv; @@ -97,7 +97,6 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, struct seq_file *seq = file->private_data; size_t n, offs, copied = 0; int err = 0, num_objs = 0; - bool can_resched; void *p; mutex_lock(&seq->lock); @@ -150,7 +149,6 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, goto done; } - can_resched = bpf_iter_support_resched(seq); while (1) { loff_t pos = seq->index; @@ -196,9 +194,6 @@ static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, } break; } - - if (can_resched) - cond_resched(); } stop: offs = seq->count; diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 8090d7fb11ef..fe560f80e230 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -5361,8 +5361,6 @@ btf_parse_struct_metas(struct bpf_verifier_log *log, struct btf *btf) if (!__btf_type_is_struct(t)) continue; - cond_resched(); - for_each_member(j, t, member) { if (btf_id_set_contains(&aof.set, member->type)) goto parse; @@ -5427,8 +5425,6 @@ static int btf_check_type_tags(struct btf_verifier_env *env, if (!btf_type_is_modifier(t)) continue; - cond_resched(); - in_tags = btf_type_is_type_tag(t); while (btf_type_is_modifier(t)) { if (!chain_limit--) { @@ -8296,11 +8292,6 @@ bpf_core_add_cands(struct bpf_cand_cache *cands, const struct btf *targ_btf, if (!targ_name) continue; - /* the resched point is before strncmp to make sure that search - * for non-existing name will have a chance to schedule(). - */ - cond_resched(); - if (strncmp(cands->name, targ_name, cands->name_len) != 0) continue; diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c index e42a1bdb7f53..0aed2a6ef262 100644 --- a/kernel/bpf/cpumap.c +++ b/kernel/bpf/cpumap.c @@ -290,8 +290,6 @@ static int cpu_map_kthread_run(void *data) } else { __set_current_state(TASK_RUNNING); } - } else { - sched = cond_resched(); } /* diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index a8c7e1c5abfa..17ed14d2dd44 100644 --- a/kernel/bpf/hashtab.c +++ b/kernel/bpf/hashtab.c @@ -142,7 +142,6 @@ static void htab_init_buckets(struct bpf_htab *htab) raw_spin_lock_init(&htab->buckets[i].raw_lock); lockdep_set_class(&htab->buckets[i].raw_lock, &htab->lockdep_key); - cond_resched(); } } @@ -232,7 +231,6 @@ static void htab_free_prealloced_timers(struct bpf_htab *htab) elem = get_htab_elem(htab, i); bpf_obj_free_timer(htab->map.record, elem->key + round_up(htab->map.key_size, 8)); - cond_resched(); } } @@ -255,13 +253,10 @@ static void htab_free_prealloced_fields(struct bpf_htab *htab) for_each_possible_cpu(cpu) { bpf_obj_free_fields(htab->map.record, per_cpu_ptr(pptr, cpu)); - cond_resched(); } } else { bpf_obj_free_fields(htab->map.record, elem->key + round_up(htab->map.key_size, 8)); - cond_resched(); } - cond_resched(); } } @@ -278,7 +273,6 @@ static void htab_free_elems(struct bpf_htab *htab) pptr = htab_elem_get_ptr(get_htab_elem(htab, i), htab->map.key_size); free_percpu(pptr); - cond_resched(); } free_elems: bpf_map_area_free(htab->elems); @@ -337,7 +331,6 @@ static int prealloc_init(struct bpf_htab *htab) goto free_elems; htab_elem_set_ptr(get_htab_elem(htab, i), htab->map.key_size, pptr); - cond_resched(); } skip_percpu_elems: diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index d77b2f8b9364..8762c3d678be 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -1695,7 +1695,6 @@ int generic_map_delete_batch(struct bpf_map *map, bpf_enable_instrumentation(); if (err) break; - cond_resched(); } if (copy_to_user(&uattr->batch.count, &cp, sizeof(cp))) err = -EFAULT; @@ -1752,7 +1751,6 @@ int generic_map_update_batch(struct bpf_map *map, struct file *map_file, if (err) break; - cond_resched(); } if (copy_to_user(&uattr->batch.count, &cp, sizeof(cp))) @@ -1849,7 +1847,6 @@ int generic_map_lookup_batch(struct bpf_map *map, swap(prev_key, key); retry = MAP_LOOKUP_RETRIES; cp++; - cond_resched(); } if (err == -EFAULT) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 873ade146f3d..25e6f318c561 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -16489,9 +16489,6 @@ static int do_check(struct bpf_verifier_env *env) if (signal_pending(current)) return -EAGAIN; - if (need_resched()) - cond_resched(); - if (env->log.level & BPF_LOG_LEVEL2 && do_print_state) { verbose(env, "\nfrom %d to %d%s:", env->prev_insn_idx, env->insn_idx, @@ -18017,7 +18014,6 @@ static int jit_subprogs(struct bpf_verifier_env *env) err = -ENOTSUPP; goto out_free; } - cond_resched(); } /* at this point all bpf functions were successfully JITed @@ -18061,7 +18057,6 @@ static int jit_subprogs(struct bpf_verifier_env *env) err = -ENOTSUPP; goto out_free; } - cond_resched(); } /* finally lock prog and jit images for all functions and From patchwork Tue Nov 7 23:07:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3648C4332F for ; Tue, 7 Nov 2023 23:09:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A60144017F; Tue, 7 Nov 2023 18:09:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3054744017B; Tue, 7 Nov 2023 18:09:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E38444017F; Tue, 7 Nov 2023 18:09:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EA65644017B for ; Tue, 7 Nov 2023 18:09:12 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C309C1A0B60 for ; Tue, 7 Nov 2023 23:09:12 +0000 (UTC) X-FDA: 81432700944.29.46AF0BA Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf04.hostedemail.com (Postfix) with ESMTP id 5B79C40019 for ; Tue, 7 Nov 2023 23:09:09 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="ATpJGS/a"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ISYhFKIR; spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398549; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Z3vyht97jSaaiKqlZMd7yfSZ1HK1jQ6jqCqrZaoLl8c=; b=zZZDPqF9of/+x1F47UxuNmjjwTxGG5GVWE6X2lylLRc64SNsTZOYvOk8gQayciJUJxiMZ9 mq66AqYk1vuE1NhSPCYGeolQgc94iGndEY2sIzpGeBntysdtS8Zp4brqHEQ0jB1Ze/H2KA jt/0EWDyQS5DufD8LIzK0LSVq9V0EuQ= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398549; a=rsa-sha256; cv=pass; b=PDaTTfDFXLXkfzoLtvmf/byg2w8SLlaNZxRZWreKHeRWbPndoH6dzbC5fAPZS5Rs8yS8Bu Hf5n6tw1yjEUzIGR+hhP6jXn8li4BV1wc0BQy/mHoBB0hUx+hOKdxPmQxPN17/3rQgU7lA Cma2/p4K9y0MhDDzbE+QoB+d3OSrv+Y= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="ATpJGS/a"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ISYhFKIR; spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJS8e029120; Tue, 7 Nov 2023 23:08:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Z3vyht97jSaaiKqlZMd7yfSZ1HK1jQ6jqCqrZaoLl8c=; b=ATpJGS/aY6cZvpBBp/2WcVMo0RpbDb0pBtdHc2TbgnNs7WSBEW/6KkWIJfcMhBqDY5L/ uB4GlQiPZAus3cdj6EpNvuQRXHvCdDKdN3GEpFkHU60rUdURrjKlRWUrZbrBgVBiuqcj Jcm4U22aMHAFUrrPaMdC2ywH4iTYGXH3bwmfny8NeD6VK9Dm+dwp9cNe5i9iYu8r0qkO 7QjyOJh1jqGy63A/e/gnf8o3yB5dRRktC+zt5gxQ+POD8FSqI9xKvefLxVhYVbDSP45q ghLyTBCIg6UtdTeHef/yeLYO7/eDBJkg1Q2amFAnSmVsqJbqhsPHVuAELjczpkWlgM13 QA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w23062t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:44 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N5AgJ032041; Tue, 7 Nov 2023 23:08:43 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2247pn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J7D1CxbrVyhTZ0g1/HY86uCIyB/kUi7swtMeujudnieGvBHLdx03NuFOZOKIq/modcObWpSrg3Ym++FUOE525hPQ3lUuDDEi5T81gMLJadEzwrF7wkOgWKdMnNnRRmQwkcRAtE8GV9KzJc1XhVjFEC28+ZogGMH+TPSNY32iZ7fJs9jM1OOHKT6pejfQQVMxUgrIJ6sfbUhwcBNy2389WOeFVpL6dVY0kip5ixghzK1EoStmZRXVmYBUl1cvAY6ZK9W6vqn6oAXatIe1Pmv8lAT6oWqHJLt5JIE5ZZmnl2IwyPDleNidy5X6mhtvJ0aCBwU/ONR9PLR/jLsejxOOxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Z3vyht97jSaaiKqlZMd7yfSZ1HK1jQ6jqCqrZaoLl8c=; b=jiPri7P5ruY9q7rFhuiz5FvQQgvwcAROG07KQCrVC1hG5gYjl3bmDsqOIuzCspHv8DlmCksCg0eam5mT+LxYGOGEJ4XhWRGzPoz8yl8TSrQtXjJ09ZcnLlz68e0OS8GJu9wifIWOIggAVQcvSOmcABISFD9oSIF0EAq8qAVNghSk0ZHF/kUGOeel1w9E5qN2H/TB8I+r5kg3LFjNWuvOLf7h8ey+b9IZ47LKoQhSHM0bRgnZkoZRFI73qf/BctXAYhtAkpshZ+BRU3+02V6e6gDFwTMOXoUM0kXlQ7G4iELPmUtktfk1+ZGUS89KnOnx982THZ9NZrDwd6RErCEgTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z3vyht97jSaaiKqlZMd7yfSZ1HK1jQ6jqCqrZaoLl8c=; b=ISYhFKIRJkzz3ciGgW+nWSK6TLlTIAw2+pQeGADBPCUPB4TiCt/fXerydFkbaw8G+vgdoiC1iPYcEwz4g1xzQ79S2GumRdqp02jN2NkLepRvWhc0y93zJT9Tpx24JWDccNyR3LfbE9TItJIbXxRb6/iRPn7quPnwKbPd/+FmTsE= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by PH7PR10MB7010.namprd10.prod.outlook.com (2603:10b6:510:274::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Tue, 7 Nov 2023 23:08:40 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:40 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Masami Hiramatsu , Mark Rutland Subject: [RFC PATCH 62/86] treewide: trace: remove cond_resched() Date: Tue, 7 Nov 2023 15:07:58 -0800 Message-Id: <20231107230822.371443-6-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:a02:a8::18) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|PH7PR10MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: 422bde6b-7587-4a80-e8a1-08dbdfe67aec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DC/etMAh+Uqw2PoQKHxdlf5R3xMA4Ujt4jJx7B6thQzRQ8l21qktwr2Smu7oq+W8pVOIjowNBJpGyGWXzMy3j/a4P6ylnJ+x4vNAf/Vo4gcxm8fjpkJxh4T+6hUFhWr734w/GkYIjAWQi2+yffKKPgAPf4CPRREkVtbgeeIfmJv7KbnTCRfUbBbcQv8a7YL2fVCIPdoV9Fvc/lrnEBTIapdpCleAgwd89f2n/wTmRivSEf5hE+vxqqbM75Lw80feQG8ZyebVSGcLEQzCFtoVsnm8tMKj4jSaxoB+2EPEZKAogFuGDxKjGtN220BnyIm1lX5SHCR5B9Ws59G/BMXSny6pll9ZWb0oojvNKtmMWhkQK2KqIveMDOSDVz3MrUy8bsphXFJNFnXTLyJbk/0+l5qR4nPra8AGy2GJYyCTjCrGNh4KEMmdebs8gui4/ELekM2L3KWzYU76rDAattP5h43mtqKbv1gsEtqbNNB3dQfYDhP7bxmXQccRsZ5nlxwLMXY8E2LQCF/03o/E1kwRH+Ppkp+S2U535INGBSC6tqg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2906002)(7416002)(966005)(7406005)(6486002)(478600001)(6666004)(54906003)(8676002)(316002)(66556008)(6916009)(66946007)(5660300002)(66476007)(4326008)(8936002)(6506007)(66899024)(2616005)(41300700001)(1076003)(26005)(83380400001)(6512007)(38100700002)(103116003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rQjwd3uR/tRZ0p6PEPkqsIKTYEWVVuWXzqm8Hbmq44QoJ6k3UxGPZRE+4/E8uQxVLXBmA332PEArpkbzdKQaJwiiS9JVTmoXEry1SkhrJgXTpD3qqEXvr7CbjRdKshJUW5xno7I+R+1NrBXgL3LA9QG3i9hFwki+588RnimbH73US6qgiNZ5cXgfbQv3u0/aklLZ20ztYsYXyHXHqVCU/vaNQzpM4FVCfo+i2VKMVdqizMP2Wu5H2rqPMOakVBKujIj3Jkm+o88ZKcIW0CyBeDJBQUt2ZI6ztoWXEegpm6/+GesAO/KRA0dg5/pYrLyZJYNwdQPSlAnSsgLoTT6H6HO8irZzvk12xkW0jRYjmOQdlMCdIuyBw8nzCt5O4GFMtfSeLDY7tLnKgGQOcw2bC/V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vziK9w12OlQdUbIpGUgXqp0HR43w8txPpYSCJQK9JDgWrcnZqnFPCXDhCA9DHc8eQW+KKQsIfvilKpI25/5JUqnKwgP6+84Bqn2JMWmM9/u+5SFoeYo/yeVCzxEZrdiofkQaboqWYJoUSSmpjw7JJ/a7eToeUkjP+E6/tcgoqpcWNJUeCQWebmiEFMowzVLWqQAACie6MOkb5aH1oeXB4ahb16F+HHT8x2cPRVMUOyAfFWhgVqJi+v3RockJLi4rKYTFB6/Hk1k/0T3Tjo4oSRxfC3iOxPcceM+b5rSWW2veancvcr06P0E2OVZrEUAst0LjI5Oycy5MQUe9Ysy9iENguerMozKP8PKPCaIck81C25PYrr4MKAB1l9hOAnPfom7VuTn2h5qnojwosFjxdxY5wo8H0Dk9HcMXzXU3BCVRucL7EsSuUTcDipW9LGSGdK+GWMjLB20PkBsPrZ3kLmEARXUaBqW4g9iJp3ug6HuJaGUpZB1k/qIZUAZvnJ6375ZIhSB8Hf/EE6X+/xPwOFeAlC0rrWFv4w4Q27Aw+PKXF8lb3uJDEV8NGvvCK5ufE8nf+5OivGl8Hc3siDciZkJ4BKuLcjqzbjLIL7RguLDPEkDs/XYUup+Zpvtpw199x77ufRQ4jmvFqG4HZZ9gKGtZYxwUDJWq+EthE3MiJFIbJGsheAiwyWRxEfanWhIS6OXq18SGrtc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 422bde6b-7587-4a80-e8a1-08dbdfe67aec X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:40.2404 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kbHG77toslGsXPXMoZtSAIk+/t/m7rvoE4lDG8e90OniOKCONSPkw91mpklJkg69byLl3xijjcEOXB6p7qTEBYcVmjyvgxfVilOf4t7L1to= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: _itpNuPFzLRVEWNGzTbHz_qNX7vWHIOz X-Proofpoint-ORIG-GUID: _itpNuPFzLRVEWNGzTbHz_qNX7vWHIOz X-Rspamd-Queue-Id: 5B79C40019 X-Rspam-User: X-Stat-Signature: qxpoguugm9e44y8khxpi5zm9f5jk8759 X-Rspamd-Server: rspam03 X-HE-Tag: 1699398549-124489 X-HE-Meta: U2FsdGVkX18DV86UAGVwruw6LNHimiXkJIDBRDIhi8d0s2sJcco2pmZvoI2/r8skfNjGgzDmvm9gPAdQ/GCZqdS0Q4ggEaIOBN4S+sX7T1ep+wJkp7CrzA8kovRnmTZnlgBalnXsRjW5FIjPEmId/CjSAHOk8552izDTgQS0r2NJ12i60g3Gf7z7WEkkz6qBmdFImTD/CYa4kbiK7uRcKGIImCcxbwLqCiYreDq+TW1wzADNkFbjN75Ruouh6aH8Tfyy1ZZnXU5kSogJY0ii36mVoErhvf+WQtfCB29vy2qxFoSNbLu7aPyp5pwk/sBT/sQlpnuhIJUmpaWLfpDxGBcrDzDDYyoqURBrbiNJ2Fc513cjD8hcFQ1ZoATaYGHIDJpXZpY5AVvDm2VQDdbxUMhkymuHqWqtCtDVGCcOwTbzLW8297oslsWX1sEZkZVAAdY/R1Q+/M+U04Zt/6TCWRUWw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ni8MkUlOQBjndvvSn98GvmUnkjUuJ0ZrpQUvtszNq X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the cond_resched() calls here are from set-1. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Mark Rutland Signed-off-by: Ankur Arora --- kernel/trace/ftrace.c | 4 ---- kernel/trace/ring_buffer.c | 4 ---- kernel/trace/ring_buffer_benchmark.c | 13 ------------- kernel/trace/trace.c | 11 ----------- kernel/trace/trace_events.c | 1 - kernel/trace/trace_selftest.c | 9 --------- 6 files changed, 42 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 8de8bec5f366..096ebb608610 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2723,7 +2723,6 @@ void __weak ftrace_replace_code(int mod_flags) struct dyn_ftrace *rec; struct ftrace_page *pg; bool enable = mod_flags & FTRACE_MODIFY_ENABLE_FL; - int schedulable = mod_flags & FTRACE_MODIFY_MAY_SLEEP_FL; int failed; if (unlikely(ftrace_disabled)) @@ -2740,8 +2739,6 @@ void __weak ftrace_replace_code(int mod_flags) /* Stop processing */ return; } - if (schedulable) - cond_resched(); } while_for_each_ftrace_rec(); } @@ -4363,7 +4360,6 @@ match_records(struct ftrace_hash *hash, char *func, int len, char *mod) } found = 1; } - cond_resched(); } while_for_each_ftrace_rec(); out_unlock: mutex_unlock(&ftrace_lock); diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 515cafdb18d9..5c5eb6a8c7db 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -1996,8 +1996,6 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages) tmp_iter_page = first_page; do { - cond_resched(); - to_remove_page = tmp_iter_page; rb_inc_page(&tmp_iter_page); @@ -2206,8 +2204,6 @@ int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size, err = -ENOMEM; goto out_err; } - - cond_resched(); } cpus_read_lock(); diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c index aef34673d79d..8d1c23d135cb 100644 --- a/kernel/trace/ring_buffer_benchmark.c +++ b/kernel/trace/ring_buffer_benchmark.c @@ -267,19 +267,6 @@ static void ring_buffer_producer(void) if (consumer && !(cnt % wakeup_interval)) wake_up_process(consumer); -#ifndef CONFIG_PREEMPTION - /* - * If we are a non preempt kernel, the 10 seconds run will - * stop everything while it runs. Instead, we will call - * cond_resched and also add any time that was lost by a - * reschedule. - * - * Do a cond resched at the same frequency we would wake up - * the reader. - */ - if (cnt % wakeup_interval) - cond_resched(); -#endif } while (ktime_before(end_time, timeout) && !break_test()); trace_printk("End ring buffer hammer\n"); diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0776dba32c2d..1efb69423818 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2052,13 +2052,6 @@ static int do_run_tracer_selftest(struct tracer *type) { int ret; - /* - * Tests can take a long time, especially if they are run one after the - * other, as does happen during bootup when all the tracers are - * registered. This could cause the soft lockup watchdog to trigger. - */ - cond_resched(); - tracing_selftest_running = true; ret = run_tracer_selftest(type); tracing_selftest_running = false; @@ -2083,10 +2076,6 @@ static __init int init_trace_selftests(void) tracing_selftest_running = true; list_for_each_entry_safe(p, n, &postponed_selftests, list) { - /* This loop can take minutes when sanitizers are enabled, so - * lets make sure we allow RCU processing. - */ - cond_resched(); ret = run_tracer_selftest(p->type); /* If the test fails, then warn and remove from available_tracers */ if (ret < 0) { diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index f49d6ddb6342..91951d038ba4 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -2770,7 +2770,6 @@ void trace_event_eval_update(struct trace_eval_map **map, int len) update_event_fields(call, map[i]); } } - cond_resched(); } up_write(&trace_event_sem); } diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 529590499b1f..07cfad8ce16f 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -848,11 +848,6 @@ trace_selftest_startup_function_graph(struct tracer *trace, } #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS - /* - * These tests can take some time to run. Make sure on non PREEMPT - * kernels, we do not trigger the softlockup detector. - */ - cond_resched(); tracing_reset_online_cpus(&tr->array_buffer); set_graph_array(tr); @@ -875,8 +870,6 @@ trace_selftest_startup_function_graph(struct tracer *trace, if (ret) goto out; - cond_resched(); - ret = register_ftrace_graph(&fgraph_ops); if (ret) { warn_failed_init_tracer(trace, ret); @@ -899,8 +892,6 @@ trace_selftest_startup_function_graph(struct tracer *trace, if (ret) goto out; - cond_resched(); - tracing_start(); if (!ret && !count) { From patchwork Tue Nov 7 23:07:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449432 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB8CCC4332F for ; Tue, 7 Nov 2023 23:09:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE104440185; Tue, 7 Nov 2023 18:09:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D41FE440182; Tue, 7 Nov 2023 18:09:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A34C3440185; Tue, 7 Nov 2023 18:09:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 87D7B440182 for ; Tue, 7 Nov 2023 18:09:28 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 70D9D1A036C for ; Tue, 7 Nov 2023 23:09:28 +0000 (UTC) X-FDA: 81432701616.18.CE720A5 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf11.hostedemail.com (Postfix) with ESMTP id 318154000A for ; Tue, 7 Nov 2023 23:09:24 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=UgXWHP0y; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=puqIH41N; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398565; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lIOadZtTWRLNr2aNmC4m8NpdsjcflN9hHPdlsn5woq4=; b=CZOe4dcfWgY3JAyFEZUvZxHt1G8UH+t5eXy4i2im23FtEg7HZdb7acAoXp+jSDjHtdsRkw NQEQh8+wZG+HDvuhBoLy0+nzV83jH3tKdBUbcsCJufCBMQbWsjaZMyfEfDD7c/baWd+zcL LlhjAaWJltxHaJDwcuTxSk+lC9eB3e0= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=UgXWHP0y; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=puqIH41N; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398565; a=rsa-sha256; cv=pass; b=A7tPCBLchDnL/LL+C6UzvJWCalUsdIuLiH/HS6Sc3KvawvHJxIijlG7ZDlRSbO+1lPzLOe 2j3h/IbqX4fchyFHg7FGsKztpHuC7bMF6dxc5fjTq5SHrA9YKTNbHlaPfJROr0HCvfoKdN wERrEs31TKC2eiJx6sFWnzPN6kqpwSo= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK0GE022798; Tue, 7 Nov 2023 23:08:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=lIOadZtTWRLNr2aNmC4m8NpdsjcflN9hHPdlsn5woq4=; b=UgXWHP0y0kZM/7NQwTPK+YrW9Owr8tnZPTLvm0y7R3/RN6UZVUCOpVZrsEtKTXzeDKtK EXCepl04MYwjl3Gpn7oTvhD4Qs8w+L6JUZyQYWKGpijyLaH9O+VaKFNIXhqbqFuvWoDE uIUHwj7FfCXOUPTNtg5o5n0H5kNFdOj2GqA4rXMsveiatw8F90HeBJulKx/d/ISkXZzh x1Y8pZlrdi7HaTbIPQv196JwkvDGN6BQBgospe1aZEIFCaQnbLDK7kkZl5lwIYtrqt+w 5uBVnkH1y0Uyv8bMkiJzJpuF8U+eaPjc3WE9gfSVJDm4U/q/xkULbmmOnaEz6b9fADhN Zw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2006em-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:49 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2CNk000410; Tue, 7 Nov 2023 23:08:48 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wvd3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WYuNM/pWdvh12JCBhLjXgpYhNV7qO0vZ/c1awW0l6WEtWMgQ9JqswI1NIA1Aiy4QlZkOq+CQIw91sh/q6wRVPpekJ8fsdeA9i1c6nN886S4RoKHME8swPYMHRcwbA7i7A3WWbYlOXpqL8VlwI6dkWKREErBbFFqjcUk+wQKzolH1a80HOFSBkxvYeBaKsuPVsxke9+WDM3bknCWUhKjyTGaQ6NZvYFDwOZR8LlYl9hqI+fd5wUGUAkclctaqZajldeJAs1dqw27Cg8YJFsp77WEX2iuGELcVcevhL4Nh7U/gkcS18hR9kLIE/nlMTMTQ5cXK0zLZwSGilr+EO3EC7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=lIOadZtTWRLNr2aNmC4m8NpdsjcflN9hHPdlsn5woq4=; b=mLTqBH9oQ0/O8rqJOJB9onSrscXeKoeNpqnFJs4pfKHNyqk0DixmW70m4mrbrJNdDj4QwhlAaFDB+8sT0z9TALHR3tlVkD6gKeUZMOVXIvC0OfiuPAiYa75oyw7OOr3USKBqheoFwL7pCPtXFd5UewXiG0zGsrTvMnxStyDoRfCjoL90UZbwRW2PUwHFpdmbcLJrYK9B2AVd4TOqcAQ5hG+S8H9U5Zaeafr5+QqiGNcxL/xBe1SwHX5qu/MLcYBMfEw+NNvDWVEYs2YBcJhMK38alsILJYyY6hqT9yJUYY7dcE+luVy5rb9mG5zrtEQSwFd5OdiFRGukGQi0S8voqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lIOadZtTWRLNr2aNmC4m8NpdsjcflN9hHPdlsn5woq4=; b=puqIH41NBNOxKhVwKzINAqeusfd5ls+8Y4fovNjEY8XGbOXsognridAVhX6wM9SkTtyrJ8Z54c9lQLKHpqD+hAN1aiamtNHJ2PLhFcRwGbc5o21I7rLIVXTO0rp2VcMagnLi7aazsu+Ci+xOKiFB+vYd/eUjfPAacQkKMGNPFro= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by MW4PR10MB5704.namprd10.prod.outlook.com (2603:10b6:303:18e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 23:08:45 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:45 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Darren Hart , Davidlohr Bueso , =?utf-8?q?Andr=C3=A9_Almeida?= Subject: [RFC PATCH 63/86] treewide: futex: remove cond_resched() Date: Tue, 7 Nov 2023 15:07:59 -0800 Message-Id: <20231107230822.371443-7-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: SJ0PR13CA0192.namprd13.prod.outlook.com (2603:10b6:a03:2c3::17) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|MW4PR10MB5704:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b33aafc-5aeb-416d-c392-08dbdfe67e31 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i5Q0RifJMw1D/et2XhuKBMDSCy0iu3enlJqfq7GTFoy8vrQVsb3wgEtc9RUokGd5m+nWpg46wFLRV7H1jkTP50WM+1uCdxccRZCPUAxRlNcGEexvXu0PloV9B1AZ5McJHQ/7Fg3q9NqadX0M/wc7y+hyAbyENabTbRULjXmFNfD/y/+NGI1kZQ73ZjioJZqD9y6MLEg7ssK6cQhirqm56GiF24jqoY5CxV+fuE1YPVzrdx0okPQfiy5pTMrw6TQ67XDTteXJaodo08+c4Kqt4nTCvB3siObFfT9X5G5efHaMJyq2RsIl57DqVO4WimUJ/ftNV2K7D1nVLZVk35o7QvlpMdGFcSyq9LT9Eok2mgWUnULmjZfTglV7vPSurIOKnQdFsGq9rgNpdve84MEWRuAhcxGXp11LR38y7hK2lKRZXiUWpxLol72o1ZlihATPGamQdy5Eg7APR3UvHLiypimrWGNIA+EQu7K4d/S1q+orX8lAL0H+98VUtaJh3JnKjdCBa+ttVS39WE/e99zT/1kFLkeHZiW1oT1Xh+/8EK4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(396003)(136003)(346002)(39860400002)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(478600001)(41300700001)(6506007)(2616005)(966005)(6486002)(6512007)(7416002)(6666004)(7406005)(8676002)(316002)(4326008)(8936002)(5660300002)(83380400001)(1076003)(26005)(66476007)(54906003)(66946007)(66556008)(6916009)(38100700002)(2906002)(86362001)(103116003)(36756003)(66899024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YklF81w6EoohXYfWLJUzBEHNklkd?= =?utf-8?q?sYyo8FpjMjYe/mcBufiQk2AdhwoFlPgPqJkqpuM5knSfvIvjaopswg2MmeaNfmUCH?= =?utf-8?q?LTZmMGcnDCqXRoR5dJ9PZBdj1uNQT7dmOOBtG9ereGjByoREBdcYq2YCQGBBOjcbZ?= =?utf-8?q?YakUXSsFav2dc3NLKwPB0uRxSjUnG+FwbEMxe2EqluttV06BIHQ1FLbOpmGbf3Liu?= =?utf-8?q?xrkxfetFugxdl1X/APgGPGcDqahN5B3XmZzoI9bnTdJzXP1l492AQqFNMvJ11UDBL?= =?utf-8?q?ZM4Z1tqOAusNPWH24faK5pH+6wXNud6cAdRTFNp7CLVm32bZ2wnJljIzhllWJXslP?= =?utf-8?q?7GcUjVWGnhFG/Yfw4nTTk9s/+b3MKAfxHJyNQxr0pb2feZGiV0XqP6rY2Pgpj9mDa?= =?utf-8?q?shXp4B3hGqRkHQzc0yskvGQZGtSqBJnS0nc8b/HzfqgXnMeKinWsh3mumzQefuh7V?= =?utf-8?q?jZMifOy09Wi+2D8DlxyeQTDteYx9zY5GcP+Fn0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Sh3phqedxiJfDYpQyUw4pH7xwSq87?= =?utf-8?q?mOqa/UEyCdTCyHu7w/esLitkR0KUCZoEK9hw7IEHmbECRKVGKT76cjLFRSy4+yruZ?= =?utf-8?q?voXKz5mrzeSRnYbNdmIQqfW32KtS9N6le34MB+mst+jkqlBqXxduCgaZSN6gcpLAC?= =?utf-8?q?jaJmnAxMBBZRKMtTmk1J/bGIp0TlBJYH1Q=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?lJMxzMo6zFIF5rzK?= =?utf-8?q?8os5+gb9JpULJoGFCksmmevPjQPkf0tfMWi6Psl1bsbXB8MWnEc7aYYuH9ss76SsK?= =?utf-8?q?OhW3r6zILm6qMlgltanNe+kla+N+QLMQ/EB/5EztEwmi91ZFx9k0u1FJFgHxFetb4?= =?utf-8?q?8rVJ9L67ICOxgvLaDW4XnOSN3vi0yyaAo2LlgrNxqfzGFMw3sjcQqw52e5PGlNTZE?= =?utf-8?q?/3kLelZW6hzU02SEGogtH4upz+9znCXV4/9hqJ7yQiE2wrSRq+8N4i7wLlbDqRMr5?= =?utf-8?q?V1jPEgCYXYDJXW2vIotJ/ii23zTnucfChf08jJS3kUD8IvkEx6zPPgb4ZBid0cMU6?= =?utf-8?q?j9t/lHeepuT2Fxq1yXneeSOcrCkhIwA91gkzN/uHMwZCb0FBDSCLpazDYtfimVD/x?= =?utf-8?q?WSCenKAL8NrcuuXLNLqDUgalBbGVaeLdwPoi0G9swUI2wKcq/JfgvM+HTOyv3ztXP?= =?utf-8?q?uOzD4bik6mmKUZSRJFNlHK3jbqWLhDDSdjoi6D4WKKW+Dhs/VPzzZDmyr3yxy/PtJ?= =?utf-8?q?sFuYMlL5CwooUBZBJRrqlxv09U4iTuVUxnONirimfmkv3af8a7byTbWZGf9aCIGE1?= =?utf-8?q?3NFgIEGU8apXbJ0jrRExKN7Gw6mu4iK+xF+dlxee+aavaY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aNnaBgbVAKVLaFxvovQ?= =?utf-8?q?wppjubUHXwCed04PC0Ex81X39HAIUGRq5NmK1mJc/EnDMg=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b33aafc-5aeb-416d-c392-08dbdfe67e31 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:45.7545 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: monkbzwXD2gNPdbJF92yyDG6RjY4SRYNv0cnshy4YT86nh6J1yHN6+vAEHZ5bqRx4luPJ6yXvHaIwp9XKNPM15CG66Wh7EHlaxb2tJbPt9A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5704 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: 8Ak1VclO6a76SH60slzBE_htoxKTnSkp X-Proofpoint-GUID: 8Ak1VclO6a76SH60slzBE_htoxKTnSkp X-Rspam-User: X-Stat-Signature: 9hq9em69grz5uurjcyi5398yu6rjsc5h X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 318154000A X-HE-Tag: 1699398564-107453 X-HE-Meta: U2FsdGVkX1/uFojxKpLtM17y1DQ20Kv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eBPikxI5o3wjDc92B5VOw9nHwc+UK00LcXG5NK3o92y9OOoB1rt26VKH6Gvq/l6sCmPRIMghJg/cAClta8rHf0qdmtCVj76mdKdrU+vj6T2BxYLFWxUSii7c5dLZmjDdsM0sec1euS9rN4tT7UMB/+jcSS6JI3vYYlmDcy+6Xv6FDBArdRjM2ZTfoxWBTAOvo/6BbvLtrXAPLrHGwaLkxsFUU0l4O86/i1jbLwQE9Bh/mjQbp+u9i5aVA60EgzVcdPTBYziRpJVG1+F1A9JqIFnQ/VpsgG/qUlKmXWhb8RZW0X5e7LfgZHvgLL47IU/ggE5xmKX4m3zfkf/B7hUOAiztagJv0dzAUdH8SmkWkayDbO84PufUHc+mgUhfhZsf9k1QE1YnQfxjsj53oZnBg374GRTZgdHtpJqROfv5x6J/CBdmkVov8Fk2CdcgtpLMxrUI/9S+YdBAiSKLIcFwLjVMuIb8+PigPG2Od7r2YfUrFQvLcqcjTHSIWVdjHAKonmraZQXu+6aDiVOxak6TT0LZZK5QYyBS81QOokoZt3UH2PEcDwgejktRQAGqL86KizPA6368cRuWkbrLCVx44fA/niQNoTk+Ltsq8SQ3mwN6YTJw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most cases here are from set-3. Replace with cond_resched_stall(). There were a few cases (__fixup_pi_state_owner() and futex_requeue()) where we had given up a spinlock or mutex and so, a resched, if any was needed, would have happened already. Replace with cpu_relax() in one case, with nothing in the other. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Darren Hart Cc: Davidlohr Bueso Cc: "André Almeida" Signed-off-by: Ankur Arora --- kernel/futex/core.c | 6 +----- kernel/futex/pi.c | 6 +++--- kernel/futex/requeue.c | 1 - kernel/futex/waitwake.c | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/kernel/futex/core.c b/kernel/futex/core.c index f10587d1d481..4821931fb19d 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -724,7 +724,7 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, goto retry; case -EAGAIN: - cond_resched(); + cond_resched_stall(); goto retry; default: @@ -822,8 +822,6 @@ static void exit_robust_list(struct task_struct *curr) */ if (!--limit) break; - - cond_resched(); } if (pending) { @@ -922,8 +920,6 @@ static void compat_exit_robust_list(struct task_struct *curr) */ if (!--limit) break; - - cond_resched(); } if (pending) { void __user *uaddr = futex_uaddr(pending, futex_offset); diff --git a/kernel/futex/pi.c b/kernel/futex/pi.c index ce2889f12375..e3f6ca4cd875 100644 --- a/kernel/futex/pi.c +++ b/kernel/futex/pi.c @@ -809,7 +809,7 @@ static int __fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, break; case -EAGAIN: - cond_resched(); + cpu_relax(); err = 0; break; @@ -981,7 +981,7 @@ int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int tryl * this task might loop forever, aka. live lock. */ wait_for_owner_exiting(ret, exiting); - cond_resched(); + cond_resched_stall(); goto retry; default: goto out_unlock_put_key; @@ -1219,7 +1219,7 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) return ret; pi_retry: - cond_resched(); + cond_resched_stall(); goto retry; pi_faulted: diff --git a/kernel/futex/requeue.c b/kernel/futex/requeue.c index cba8b1a6a4cc..9f916162ef6e 100644 --- a/kernel/futex/requeue.c +++ b/kernel/futex/requeue.c @@ -560,7 +560,6 @@ int futex_requeue(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, * this task might loop forever, aka. live lock. */ wait_for_owner_exiting(ret, exiting); - cond_resched(); goto retry; default: goto out_unlock; diff --git a/kernel/futex/waitwake.c b/kernel/futex/waitwake.c index ba01b9408203..801b1ec3625a 100644 --- a/kernel/futex/waitwake.c +++ b/kernel/futex/waitwake.c @@ -277,7 +277,7 @@ int futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, return ret; } - cond_resched(); + cond_resched_stall(); if (!(flags & FLAGS_SHARED)) goto retry_private; goto retry; From patchwork Tue Nov 7 23:08:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E799BC4332F for ; Tue, 7 Nov 2023 23:09:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 552C544018D; Tue, 7 Nov 2023 18:09:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DDED440186; Tue, 7 Nov 2023 18:09:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2926544018D; Tue, 7 Nov 2023 18:09:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 0FFB3440186 for ; Tue, 7 Nov 2023 18:09:44 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E48E21CB6E9 for ; Tue, 7 Nov 2023 23:09:43 +0000 (UTC) X-FDA: 81432702246.03.A3D8723 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf18.hostedemail.com (Postfix) with ESMTP id 7E93D1C0014 for ; Tue, 7 Nov 2023 23:09:40 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=WAYamrx3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gMByEzZE; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398580; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ywo9nh6WsW9hCbxxtYjc7olFLiTkFOtc52nxwASZ3L8=; b=PcPPaTsioKqsdXqtmGtSAtzkK9VW7mofHxOzyOnx5KIAP3KDMH+CVPZ2BjoLPyQk8Ek+54 osQv/LPGaQCUvd3+czE+mr3EmhGxZztWR6Yg2kuZwfkouSoeubj2u0vrvgJo/3TocZCnl1 A6lWr4kqaPjl+lqiUpR0/ikD3xiVX+U= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=WAYamrx3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gMByEzZE; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398580; a=rsa-sha256; cv=pass; b=02DWYx7iW+Dp9NPtpX9ZhPoc/ubXnyJYuAwnwxWrCQHOQeLihE0SXNry4kkzx6ki7l5mQG +qIz2AQ9u48P8iMkV7NA91rOqZ5XKaEuBSkv2B201XsatgV/XK5OzkCBhR6DhPezKV2MnT 0yRcFCu809BP1asOq5lN23t2hJVYgcM= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK0GI022798; Tue, 7 Nov 2023 23:09:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=ywo9nh6WsW9hCbxxtYjc7olFLiTkFOtc52nxwASZ3L8=; b=WAYamrx3NnHwU8SM0vNsbwYAP/mjfEzhAgTLg6L3z+AAnZjrwmTzpCz4kvXTwgBV9LA2 Tfm/35y9FLc3Gc4Cc1cNe4k/uAX6h7cC+HT4niXFpKIvyM7Z1BHINSJ+9qYQgWZw+H1b l2ZIsTNDNNJuHlh9NDOVQerCl09rzsdMfp4nQUKHP3J/JgD5xi4Jg/8LywMvZOVU65tH RvmVV9ZpK8Abu85GvICjN2tCIhfCkFM0OLiFLoqOImnOy0Z7CJJBOmS7R9C/xhD36sEm Dry0nDVUn8pkDbfbixAK+qd+wfvgI00Ua/vhoKmaaYplGDm+uIPjOiFreACbpEx7rkYH 7g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2006fg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:23 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N3fcA000640; Tue, 7 Nov 2023 23:09:22 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wvd4m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FB4/hJjQKnBpETV38tpHeMrQS8CbpLWKv0eO6etnde4j/LMWoHQLn2gbQFjoyhv5s19Q07921Vv/VOToUolIWVzM22cx+hCsXX69vqDuoG/jnk22M5G1CLtrDiquAKgohAWXQzjEksoQ4/CuUavZ+CKjxm5KkhpGe5eB0F/9eN0iSdGw1hu1Cu/LSUqQMmsSWwkM3LJDNMQlaa7Z6M1t9eYCIF+pq5k6nXuBEkzHQhVytNAtxl7cg4sLljHmnHjo3UrvERAD1ufP2iSRnHXg2SJ2bNvnO99UglDLPQknWxzfCUR1AaHPQTG3PSOCGBWrvfRpLOuapjEQ/1SzLafLLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ywo9nh6WsW9hCbxxtYjc7olFLiTkFOtc52nxwASZ3L8=; b=XByppUSLE2NG0KWVhZeyLOD06RTFGDFOtDnFZjzfHeKRL4dFuiEYSccF4NtorG1nMzAW0qtETxPzcs2wcjORBK6xSPgcD8h7cWPbGOpCpDunwH47uQplcP71bMwLD3BtwETaYFV104ln8pyrPBw9BUj1sIlyJUDMPrX+6kMNH2/4EJFDv2AYYVR2obD2wkn5alYuxs3knQ37VTtBLVADVGTrecmhfejM0ul+Jmd6/lddvFu35UIFIJ23FQG+lDr6s6a7mqp8YshgvfMJBY4MTIY4I2nYsGt2PYCA7ooAAm4HTrH+zNrC6qawxlXaPpeNIBul0sMWG0AT+GVfDkDDiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ywo9nh6WsW9hCbxxtYjc7olFLiTkFOtc52nxwASZ3L8=; b=gMByEzZEOfpQuXezGvEILz18NTfz1iRcqtb9Ux5d8An8aiHpvLgaMhcfjyqhK/y8Gc3mvWn6/1DIgh56OGbKNCZnHO0d89Spu4Gz95W/04IqHxGDuNmGS3Wo6Ln6s6ecbP4BNBu8OPIFI6e7woVwv+M53PHHVdcIC9DufeyRsiQ= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by PH7PR10MB7010.namprd10.prod.outlook.com (2603:10b6:510:274::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Tue, 7 Nov 2023 23:08:48 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:48 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Greg Kroah-Hartman , Petr Mladek , John Ogness , Sergey Senozhatsky Subject: [RFC PATCH 64/86] treewide: printk: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:00 -0800 Message-Id: <20231107230822.371443-8-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: SJ0PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:33a::19) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|PH7PR10MB7010:EE_ X-MS-Office365-Filtering-Correlation-Id: a8cce687-893f-4d7f-c79e-08dbdfe67fb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hVmPy/rx/0NajJEa9ptJE4D8AgRDTFzv4bVjjWO3hAo3T2tn46FraWzvmA0ToyIVtGrU5cZYPCXDe/k7NNCAhAjZrlTO5kes2zY7NPV7kqA5p4syXOFPWnBZMMn9ud7s0a4by8P0UR7sK6XneVnD12vLTUrT/KVY0IwsekRa/12HlETp7k5QAqQcygKxYMVAi9mAfgtimZf/8Z2tJG+FteJ4Qf7eila0Gy/qmWRO3o6QDPManGtd+zNKEqfeICbq8rUxAf/DBe7qcTJNivtEuhmZGAX2uHwckkkJ4ahiV7rFKW5YrMCUwWMd7y/aoSEjzS2D0zd/uZL+OrwMXv/mxHe43sJ/d3s4HQoKwKaY/60Etx2xyKqCYJC374Xu3/aT5EUlrciJ6bm6iPJg4Oucrb4+rLxZOM4rNf3AKURQEnhAAkkydpAwOQlVPefK6jFr6nDUf7PxI4spO6AFmPRRUa/82gx1zlQ0n+GADrxDxTpSzOGA9GRoiEuyd/Zv85c4i2rIRcj2vigevcrsykOIiUn1w4qpBhD5WnSLHmTces0wK0r9OgQtRqCaE1FlYsjeGEXkiEme1glxF/4KMa/mYHO6sUK5b3e2DMsZVq4RU638ZM/u4HzaCs3ExLi3+7v+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(376002)(136003)(346002)(39860400002)(230273577357003)(230173577357003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2906002)(7416002)(7406005)(6486002)(478600001)(6666004)(54906003)(8676002)(316002)(66556008)(6916009)(66946007)(5660300002)(66476007)(4326008)(8936002)(6506007)(2616005)(41300700001)(1076003)(26005)(83380400001)(6512007)(38100700002)(103116003)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: safcAGP4t0zLWR3J37zRHtvMh4DY6l1rlU/lNWHzM5zMXpXizLDhZgGkbV2q+Xxu1OPlJbuoGrKmcSpfdU69h9WdFdQLFymVYUt1XmsWjeMAkbMvJ+PbCphBmRc8ropWpZOeuFho5m3EcKHHsAM2U9wqZ5MIOW1sfXC45VqCqFCeWIdMHIgh806NRq8Vi9lLUw5SdpXMMFHcKlK+4FWMNVe3huHRsIo5dPHHX0S+lz30PkxUuFCqcnoMJJKFLnPNaK4xfRvqG+EmVXeTYFPA37gXle2Zs59cZW62uIY+neleobo+zQ4WY4N+jFF6p5v4jkvZkM+6/PlEF5ZMpbzo4nIqArQ1xqQiN6gS1dEWqpuKLnRHjP7mEh2E9OUxQ3O9BGo8CWUuuLUt2AFkj36vDIFff9YthowuBx+lJH11+BmXpRIZIPXCSlQGNDVb9eGiUiy8ulEX8OCdQ2GSM1DJoICT0PLTPh+hhLBqt7StTJZ4hn1AmVnbwJiTBt94Cv6Dr5iHxqWMZTxOXdVlfUqj3L9bL6YbpaKc3syE5fqQV52dBcqSfQkU8fXruPBKfrBvJYC2yjzdBXZaBBERIPADnA479kDuTN3P9rvWdCoCP7jxx9NgvVeJaSkjgWTVsHD2nGexeBMJX+AkZddBzLbAyNwP61ssrx6HPRZDx2KfUUxUNU0A/IzDsO+BwiKGjAdtdSO5WB0+d3LBJQf34/e4DlQ8HOfDU7rwZUJEtLWvsHx0oPLSqVVN11n+uleVpW4OSwsThUXVh32v90HVfoMBdFR0EnifRhYBlFh9tFz6nhDLtHJOunW6FiHpVfgk42dNcHDRbc5V4OZxVl61n3G/6+nG9qSXbXP0+RExWLzP4qpdy9nYFXZsZgUehRbbVN2oqqifcZ1lvTgJz+Urf7nOjSkg4aWh8deZ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XL/ANXwd3bOI4NCUtUZR8taEHAUiu5gEgyIYR5y2PYEaJLHU3WgPB5sPKxqC2I+DebNyb0xtdwhjX5UKkDIe++sP6OnzsykoplyXVO3gA8gXsub9S7O+d0i6HmArK++upMOOLHKPp+BxeXlo/1Xq3mRCv0AJSo6czAlQVfCaq8AHpqfro1+2uev7BiNZvnLS587EIgdIgq00SmiwUI9u8bmLnU25KXjYwHnfbn6w/bKEYT0PIS+n4WZPwskKYqVgNooYkZ0HeJQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8cce687-893f-4d7f-c79e-08dbdfe67fb8 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:48.3125 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dANcJPZiyeP8bIKr7EVXvcvAbP23YRrQc/zb0Ub+rOHXRP+KY5fNCyG5A4JuV9FF1SxkkvlrnTUMuwcNZCf9gAokLKOXljwFmOR00O9MZBA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7010 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: r4XYZmFDUmzKnMOoqulRjoN3V0K593e7 X-Pro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ldU+2V4MjPiMPkXXb/EnfLZFInK/P/vbgVndeZNtiU+m1Wc+WvMHrWYd9Bz/a IeECWVzs ZWtnMHMy//SZUnwTncm5PijkDawlPbNsORqmyhTYr5Jkwd6Rq+t6tpFNl+cG4jdR9vBK3ihjIUMbwuweJmrq5tCPyjfB/hLdVu28LpX/k5d42lOuFcHbl47VjQwWngYr5n+NnS1HnXwZKF2YpiMPMX8y+VRteejuiByc0+urQ9EX2HhB+vh96/j7VHc28kL0UacfPFPEgzxxjfM986iQsQQXegEPR3rY4QrAFX8Jb7bqD4i2jTqaQ+i8JEfDkSNU7I4p+xc+b7vZ+c3Q0ZQ1JFyi+iosq+vyghGbjaPDFQ7EgI0oDbq5PzAwsm1Kp67juBnLudacHSVg1lUowFsFx8R7CZh7He5+YB29a7HMgY4ynOA9nHbn6Hv8pBr0RnUU2/UF05cPp+bbtrbusEFREyN6A6n+EvicJt7fLbRx6PIDNsIA1/MMXewt0zvLA2Xth2ZQywfbUL2b5GGwlxGVbEWKolbQSWTWfcnHRfLTUjPEvIZkelamCHeBuUmoG2xdQfw/O04oBJq3TmJ4D5ZZY1fyfTSoRH8o/dtMpUNhVtQOh41txi+rOH0XezcXTQ4zh7UjIVHgzpdNk/dHdksz4EoiHse6C9pig7e6Lip5kzFZ2T5843n81yyKPcx12RIZVtZuW9I8kKrMyFHQhUfgVs3odbD8foUnNSNzWopGBMVwobkdu7Dx8hsbGMbz3bAZtFzpckLKLcQYgxbc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The printk code goes to great lengths to ensure that there are no scheduling stalls which would cause softlockup/RCU splats and make things worse. With PREEMPT_COUNT=y and PREEMPTION=y, this should be a non-issue as the scheduler can determine when this logic can be preempted. So, remove cond_resched() and related code. Cc: Greg Kroah-Hartman Cc: Petr Mladek Cc: Steven Rostedt Cc: John Ogness Cc: Sergey Senozhatsky Signed-off-by: Ankur Arora --- include/linux/console.h | 2 +- kernel/printk/printk.c | 65 +++++++++-------------------------------- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/include/linux/console.h b/include/linux/console.h index 7de11c763eb3..db418dab5674 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -347,7 +347,7 @@ extern int unregister_console(struct console *); extern void console_lock(void); extern int console_trylock(void); extern void console_unlock(void); -extern void console_conditional_schedule(void); +static inline void console_conditional_schedule(void) { } extern void console_unblank(void); extern void console_flush_on_panic(enum con_flush_mode mode); extern struct tty_driver *console_device(int *); diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 0b3af1529778..2708d9f499a3 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -375,9 +375,6 @@ static int preferred_console = -1; int console_set_on_cmdline; EXPORT_SYMBOL(console_set_on_cmdline); -/* Flag: console code may call schedule() */ -static int console_may_schedule; - enum con_msg_format_flags { MSG_FORMAT_DEFAULT = 0, MSG_FORMAT_SYSLOG = (1 << 0), @@ -2651,7 +2648,6 @@ void console_lock(void) down_console_sem(); console_locked = 1; - console_may_schedule = 1; } EXPORT_SYMBOL(console_lock); @@ -2671,7 +2667,6 @@ int console_trylock(void) if (down_trylock_console_sem()) return 0; console_locked = 1; - console_may_schedule = 0; return 1; } EXPORT_SYMBOL(console_trylock); @@ -2922,9 +2917,6 @@ static bool console_emit_next_record(struct console *con, bool *handover, int co /* * Print out all remaining records to all consoles. * - * @do_cond_resched is set by the caller. It can be true only in schedulable - * context. - * * @next_seq is set to the sequence number after the last available record. * The value is valid only when this function returns true. It means that all * usable consoles are completely flushed. @@ -2942,7 +2934,7 @@ static bool console_emit_next_record(struct console *con, bool *handover, int co * * Requires the console_lock. */ -static bool console_flush_all(bool do_cond_resched, u64 *next_seq, bool *handover) +static bool console_flush_all(u64 *next_seq, bool *handover) { bool any_usable = false; struct console *con; @@ -2983,9 +2975,6 @@ static bool console_flush_all(bool do_cond_resched, u64 *next_seq, bool *handove /* Allow panic_cpu to take over the consoles safely. */ if (other_cpu_in_panic()) goto abandon; - - if (do_cond_resched) - cond_resched(); } console_srcu_read_unlock(cookie); } while (any_progress); @@ -3011,28 +3000,26 @@ static bool console_flush_all(bool do_cond_resched, u64 *next_seq, bool *handove */ void console_unlock(void) { - bool do_cond_resched; bool handover; bool flushed; u64 next_seq; /* - * Console drivers are called with interrupts disabled, so - * @console_may_schedule should be cleared before; however, we may + * Console drivers are called with interrupts disabled, so in + * general we cannot schedule. There are also cases where we will * end up dumping a lot of lines, for example, if called from - * console registration path, and should invoke cond_resched() - * between lines if allowable. Not doing so can cause a very long - * scheduling stall on a slow console leading to RCU stall and - * softlockup warnings which exacerbate the issue with more - * messages practically incapacitating the system. Therefore, create - * a local to use for the printing loop. + * console registration path. + * + * Not scheduling while working on a slow console could lead to + * RCU stalls and softlockup warnings which exacerbate the issue + * with more messages practically incapacitating the system. + * + * However, most of the console code is preemptible, so the scheduler + * should be able to preempt us and make forward progress. */ - do_cond_resched = console_may_schedule; do { - console_may_schedule = 0; - - flushed = console_flush_all(do_cond_resched, &next_seq, &handover); + flushed = console_flush_all(&next_seq, &handover); if (!handover) __console_unlock(); @@ -3055,22 +3042,6 @@ void console_unlock(void) } EXPORT_SYMBOL(console_unlock); -/** - * console_conditional_schedule - yield the CPU if required - * - * If the console code is currently allowed to sleep, and - * if this CPU should yield the CPU to another task, do - * so here. - * - * Must be called within console_lock();. - */ -void __sched console_conditional_schedule(void) -{ - if (console_may_schedule) - cond_resched(); -} -EXPORT_SYMBOL(console_conditional_schedule); - void console_unblank(void) { bool found_unblank = false; @@ -3118,7 +3089,6 @@ void console_unblank(void) console_lock(); console_locked = 1; - console_may_schedule = 0; cookie = console_srcu_read_lock(); for_each_console_srcu(c) { @@ -3154,13 +3124,6 @@ void console_flush_on_panic(enum con_flush_mode mode) * - semaphores are not NMI-safe */ - /* - * If another context is holding the console lock, - * @console_may_schedule might be set. Clear it so that - * this context does not call cond_resched() while flushing. - */ - console_may_schedule = 0; - if (mode == CONSOLE_REPLAY_ALL) { struct console *c; int cookie; @@ -3179,7 +3142,7 @@ void console_flush_on_panic(enum con_flush_mode mode) console_srcu_read_unlock(cookie); } - console_flush_all(false, &next_seq, &handover); + console_flush_all(&next_seq, &handover); } /* @@ -3364,7 +3327,7 @@ static void console_init_seq(struct console *newcon, bool bootcon_registered) * Flush all consoles and set the console to start at * the next unprinted sequence number. */ - if (!console_flush_all(true, &newcon->seq, &handover)) { + if (!console_flush_all(&newcon->seq, &handover)) { /* * Flushing failed. Just choose the lowest * sequence of the enabled boot consoles. From patchwork Tue Nov 7 23:08:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449428 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F315CC4332F for ; Tue, 7 Nov 2023 23:09:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 81457440180; Tue, 7 Nov 2023 18:09:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 79D9044017B; Tue, 7 Nov 2023 18:09:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57961440180; Tue, 7 Nov 2023 18:09:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3FFE544017B for ; Tue, 7 Nov 2023 18:09:17 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 1E280A066E for ; Tue, 7 Nov 2023 23:09:17 +0000 (UTC) X-FDA: 81432701154.21.8AF90CD Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf16.hostedemail.com (Postfix) with ESMTP id CE8B0180022 for ; Tue, 7 Nov 2023 23:09:13 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=EJDYxZ4U; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=CeuPZ4lG; spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398553; a=rsa-sha256; cv=pass; b=HrBoQSEPWAabhFlKHMesoSbk606apRc7+DwEu7ZN+G5+LJ7+eslOsTArHlD8RItyuj8krJ bcFnO69t9bCuCCCe4BhI9IFvMvxqRI1s7hTVsOBjMyqj8beQMr4m3Jf1ZO+jHLfcdAJ7zD Rb7h+/8Cs2+jIsutKXmCRwjdPDGUSgQ= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=EJDYxZ4U; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=CeuPZ4lG; spf=pass (imf16.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398553; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wuuI4Zq//eIf7z3jbSZj4GH7eL+Dj3jet/RMEv0kkmY=; b=wRsdaLJo9DYdds5jq3SKPv1e/4m6ledweP4OWdoWuLRR01BKRyMN0xFkXgANdUmePjW4yi Klrx/zm7cLHSbZ2pPre1hWKFSKQbJ26K5Y/tzMvVBJcxj9CsffQrzRFQtV14wwKtqdJNWv 9lZtcBlmFbKM76woSGVfuVfU4LT0cq8= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK6Lr026463; Tue, 7 Nov 2023 23:08:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=wuuI4Zq//eIf7z3jbSZj4GH7eL+Dj3jet/RMEv0kkmY=; b=EJDYxZ4UcH0lIjt++qvAuJmJDhqKmpCiiNyfbFkz8AF9KIpdYjVS1JpdC/eQZK4ybVM+ TNAj6qQnNohnXckdRRrPviT4ehT3BntQun50dsJjsQ2UkYlp+QYRxc3X8vi+dP12nfeM 4mJlgr05dLBVJu6wuQbBfH/o4E3uNlnc4Eo8PjvI9/kj5TWHkWQRseM6QMXAJI0pfOIi uistbvHTQbg586YYyY4Y4l2pO8Qs5LIHxftNkC0J/Bhuu1V64nXDttX7RZJ9Mb+3TX49 OboxEYIb+90QuUtNidIsgdbF61F9pFUxcTSPuTEsXORyJzLBIn1sgi42o8db0NKbdrIR 9w== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106v6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:54 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N4iXv031877; Tue, 7 Nov 2023 23:08:54 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2247up-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L0TcSGxd1NL42cDaYyIEeSBruW/zqSyB7bHOipTJhwMOju+ju0bALgnlVyfS8Tu4T8Y7K9vDdF6xmdof+N6nWWo1rjJLTnHjogjj7wcRGXojdrJd1p0ILuO1M6LWlle2qOzVPGNyG1T4GZUcnjIhp9tRtzhkh9mlSGjfOYk63U7nEmmbWK7k0NqnB4Ac2cJDqDyQ5G8cASXJ7HEllEgFWCRByrLy6MtnO44M3uymWK3O3JEpOLo4Z55pa11eegymjfdIvdXAQoDbmN3TFk7eiaYpBQeYPMlth0cn6Y6JXOAgG7aFOQM3LwSIhh9o4lR3B9aNbIQSG2c7cjrFLPSpUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=wuuI4Zq//eIf7z3jbSZj4GH7eL+Dj3jet/RMEv0kkmY=; b=QVhym4XZcf9a2trUtpbchXoRSrvp5ymdIUDkHn3lNiS/No+zs5wsBkyOuSJHBTljYKAq0ryjKWbf46BVsskCkaeJk/QED5p900vavJjQZXSPUt8GGN4KytCWMGR6UxgMLyKKvek2Aw/jp5YPuPRal2yv7Rt0vxPj6DEgAy0xmeU2bpjUiJuxg4G3dR93oiFQ+1tPTbtmbEc5zswI5nyrzHcHCc9OFb9ih7XSpOxPbmfiWX+NnrL8cQJeImuMFqsdLji2DaIQQBHCxfc1uGVLWGM2QqlN0FRd0tfitUu7k+YAF4rnCace6/VkEHSTugIKJmWUksWVBdCWGYlIl5T46A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wuuI4Zq//eIf7z3jbSZj4GH7eL+Dj3jet/RMEv0kkmY=; b=CeuPZ4lGiiiywLjCnPoYJhPv3a5ge6OlLM7UBkVkdXOGg66jO4GrmfW2K/SBGt9H0vbhpb0LY/gGGukeEgr1ewlh39cobNnq/Dpu8APGOBYuJIetLpV/xfPeewE+wujuCbZ5IX7ckhRN0EP32stMs9LjWngscn0SK2nsVwg8Qvc= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by MW4PR10MB5704.namprd10.prod.outlook.com (2603:10b6:303:18e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 23:08:50 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:50 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Oleg Nesterov , Jens Axboe Subject: [RFC PATCH 65/86] treewide: task_work: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:01 -0800 Message-Id: <20231107230822.371443-9-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: SJ0PR03CA0027.namprd03.prod.outlook.com (2603:10b6:a03:33a::32) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|MW4PR10MB5704:EE_ X-MS-Office365-Filtering-Correlation-Id: 98fee117-b9a6-405b-928b-08dbdfe68106 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Q6Jb5LmgQBqesVOjSO1xVhkjAeYVzdc6fR82V705cE2PWXjGvKbibu9jAOT743i0+WpqpU4pLvxdV+ftQg8YoQH1pmOxbpKDqeLS4uq/sJd/sqPpbpTPrL0iLdFcBbn79n+5kB5fJdpyZ/yyEtTOIHFI24k5C4EkKZmwwRl0g91nbKXx10DjNoJOJSjUD3degSgmMhOzng3wiwkkHZ/2mICfqqArdx3YhFfn3uVIOkQCjccTvdvV8SdxCdXzPKFQfBN+kZzz9IPXhpKZzjaG0UK0wLO5on3qobSt2BLz4YVTGmJATM3UrDUk+tBi+5nkqkuzitOMvpFGislE4AuBwCA8lqXNQlBHpvMqC19oGxZ1mJfmDQIfHTUx0oBBmo7KFiylIiT32EtqxJXY2fZ5kaNZJyOG+mVSZCXEuseMfceLJYPFEBGOqbul2S/LvJEzuqd7WRLWGuJ8lhFeo0LV300hGqwvSf1nbg58xuAbdsgR07XikdPs/r3BK9By0PaY1Vz2l23YPK/lyRYBNnR1btofJGjir4QX57o8Y1oxmjPlYh3rHGmYzccKpILnTvP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(396003)(136003)(346002)(39860400002)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(478600001)(41300700001)(6506007)(2616005)(6486002)(6512007)(7416002)(6666004)(7406005)(8676002)(316002)(4326008)(8936002)(5660300002)(83380400001)(1076003)(26005)(66476007)(54906003)(66946007)(66556008)(6916009)(38100700002)(2906002)(86362001)(103116003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WDpum2pjR4GeWBzz7aey7jpEv1k6PyCA0Loo7FBglu0nzBU/D1txU+CrZCZmkab/R2AHrYuG0Shc3bCPFcIo4dUSsu3tSJF92o7PmLKX4ctd1uVEAYlQDqCX20ML0UXH/n8BeLgoH31naTfxlNQXywrt9La6bybqDK/dmuKYOg/1ufM00XDTvflJEEcGz4Sahi9KdbrU5CqXTajGK7sX6aQh5l2uggbVsHrJva5OwNlTFcfxb28T4U0vYJjJbIPl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dC++l2JmjmMb8F6BEuBkGpTJwtGH7hQUbh94l29OwWAyrPYW0an2JmraHVCQ4sAlqV9BmtxXob+98KpEli+kvCm0Wg1pNI/FFwOicT2+1MlwizKc0dZgahlBcWLhSOAb55OHg2FuqBS7bIpy64EHyOXKamLdaWjAv3s4dv+k9FSM9vSmH037Pq7//O5Asca/4jV8XXXs9dzh7uHBYsrF9hrisP85HznHOhto0N/rxs30FvkKU8SN5mt/YcOkIFjdpEYtXuu48FpDEB1UiTEwy1FaRSaly4GfKJZhekmQoEbkWXIxa99JT3Z1Qcex3Rwrae4rvDzyufSKNAOrroycyzULHjIgyb9fNfJOaRVlANKHdChwGUrtkFet2ESZpjmoAnMUj1KkEQPpAdhRMiLQ6mXcCsGulYtc+TuB0g1UtfDIRN5AF2snQvPSGYRKy4z2UROH5xTUuF7vvA//Vs4CoLLTOYoimxddzWLOiQDFNqLqnuQIl3+yws9Q56rYPenjCZShuJb8xMEUY5ZXetmNvraYgR9q0JMQ3JVfEenDNCs2tsA3EQO7kcxz7ukP7BhZISB+bqOcRi8pOWTBowJpVePHYHg/PyTAOiYzZRID5LuAmhgfZzkyKyKlEC2a9LKUcnPuqUxb0rErm3DiMeoPH9+MrtpOrj3xRD9fL9Lg07kcP92w/x24M8CFaWdtwJXDVcO7r1uYf96xxK9UDeA2/3qiTIa8x7t2aVnJzuBYjOdtRLG9Fpb+GUomZ14XRxrLGz8sn2FZb+Vr6ImNATv2idiY2N9z8G4XgA/u4wFN7Gs1kV4PyYQiVejpHhnIH+EH2Y0+9ONN5R4JqzL+M896YoOKb5ZbA4/DaU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98fee117-b9a6-405b-928b-08dbdfe68106 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:50.4405 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iSgzrWUuZTRU3SiLAZFusncELudPg+LGpI6sQmCCY1FrhybJqkDLKGNxADeEH2IXZ5v4SvJjZcz9/FlQP7Ul4rLn7688uWPteI04/BjqtVU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5704 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=892 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: yoeV5auVAsON1BbVo38xeuAP2wWnzGxf X-Proofpoint-ORIG-GUID: yoeV5auVAsON1BbVo38xeuAP2wWnzGxf X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: CE8B0180022 X-Stat-Signature: em31ujdkh9sjqmhzb5rfza18jrt4ifus X-Rspam-User: X-HE-Tag: 1699398553-831452 X-HE-Meta: U2FsdGVkX1/yeXat74CqNwBuPnwMBUlzy3lln2YD4CRlg+Dm2odLj6DAiv+1sQMSkKX47gkvmYA+xUovERl94kAG1ejTyTV4ZGym+eS1cL6ADFUcLkR58/cTXhbtActaGjO3FN3rxtdO0l6faacvSnqGJETi15D0IE4GXtuZRqNqBaXbqZqJP/Oel7e5v8QAs2mmllK1ihfOHeIUCnQP/rzoZGTYJjmVsATLY+aJrHuWUMqbGlJS0v7JXbJbGiZ4P1I1JYUqCfA3hsjgi7u57dYcBEvtR0Pql+BaGCWcxsdmU04+Kf2fOXZp5LFCG/TgXevDB9FArcqQ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itxGLuVESTKejoUH3pA2dNm90BjohjcmlMO/sD/rRGs/wYKcJ/mwinhpN95eGGNFADL0zuj9DnDayr7rPbXvp2NtdIs/8Kb3At3S7s4JvnEI++jsXOmH X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The cond_resched() call was added in commit f341861fb0b7 ("task_work: add a scheduling point in task_work_run()") because of softlockups when processes with a large number of open sockets would exit. Given the always-on PREEMPTION, we should be able to remove it without much concern. However, task_work_run() does get called from some "interesting" places: one of them being the exit_to_user_loop() itself. That means that if TIF_NEED_RESCHED (or TIF_NEED_RESCHED_LAZY) were to be set once we were in a potentially long running task_work_run() all, then we would ignore the need-resched flags and there would be no call to schedule(). However, in that case, the next timer tick should cause rescheduling in irqentry_exit_cond_resched(), since then the TIF_NEED_RESCHED flag (even if the original flag were TIF_NEED_RESCHED_LAZY the tick would upgrade that.) Cc: Oleg Nesterov Cc: Andrew Morton Cc: Jens Axboe Signed-off-by: Ankur Arora --- kernel/task_work.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/task_work.c b/kernel/task_work.c index 95a7e1b7f1da..6a891465c8e1 100644 --- a/kernel/task_work.c +++ b/kernel/task_work.c @@ -179,7 +179,6 @@ void task_work_run(void) next = work->next; work->func(work); work = next; - cond_resched(); } while (work); } } From patchwork Tue Nov 7 23:08:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449436 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44922C4167B for ; Tue, 7 Nov 2023 23:09:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFAF244018B; Tue, 7 Nov 2023 18:09:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A8069440186; Tue, 7 Nov 2023 18:09:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8379844018B; Tue, 7 Nov 2023 18:09:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6976F440186 for ; Tue, 7 Nov 2023 18:09:40 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 47B611CB4E1 for ; Tue, 7 Nov 2023 23:09:40 +0000 (UTC) X-FDA: 81432702120.05.3619CFC Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf28.hostedemail.com (Postfix) with ESMTP id 62A65C000E for ; Tue, 7 Nov 2023 23:09:35 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=XmwyzCdN; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=chQK03sW; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf28.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398575; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8OOP07ZJ5K6zJC39RegnS+KEULj9FcngGrvEUb0ws6k=; b=gKNXqApCHOM+m3i9UPhaF1wUJeQMzR65PzQsTKP2qLHM6kjaFvze3ielLQrJbq+j8oLoYJ al0KxHv527uYFSVVhfS+UtK7xquRbdEP1UHuLupG0DsuVA+dQp8cILaP9PoGfOnei/uyPt 2GnJ4A55gI15Syg9FRbt7yECDcf4XUo= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=XmwyzCdN; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=chQK03sW; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf28.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398575; a=rsa-sha256; cv=pass; b=BpXdVQC/g5DxYuVIL1ob3ANS6Kp01U4EThHWhn7YFA2jlSz42PUStJtZdYe1SlSIcV4QKw tfOAtS+Q6wGvL7owJPV/yenNyCDwQuN1bGrjtyId1HwBV0AHslYWCC2ORAJii2M57PvUNw yh7dXsyE+8MY2iWlB5cM/A6KmPGafaY= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJw4U004992; Tue, 7 Nov 2023 23:08:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=8OOP07ZJ5K6zJC39RegnS+KEULj9FcngGrvEUb0ws6k=; b=XmwyzCdNvorDE0taCW4iQoVJcWUOkisSdhd0zc36J37LmN6Grzy67bBU8uOxmfNu+gfc MwGkI4Y2C+0T/3hYgYaorQGA/AIA0Ozf95PgJXYm9adbnu/C+hSTkgfbE/9V9NKcIMgg HRMeJHRNIBuicTGs3UQ+sDREa7IliIfsFCFabvRGb6TsGW3SSHpPtHbx0yIy/j1iKuf3 TDUrl8Nh/82Rvld9cf9IM7ELtUzgAgFs+Gr0ul9y9bsWQcAs0KNrYW5oAJA2Gg/PdMoT b04VtXAaq44YyyEtVt3RD/vSlwXSv8nN8ebYcfV9FKa8Vy2S+MC3aFG0FLFpc0trmbZ+ Ww== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6aj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:59 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2EWc011007; Tue, 7 Nov 2023 23:08:58 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tv9m4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:08:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DK3DOo9G/Cu4iKnECZHgG1Rfs7Pu7IYi1qkcCjeaimK5p+1v44+4eQAnCswWXoJYTrbywwrjeexk2pv+VADzvQHzezV/S9Un3RSIO3gxvO1Wb4udyxgepzQzTsz1UWrLHsFziwfC026qrGBhjr1xrEuqohcfclL9dacezv9eJeE6JnUwR0WqpdulQk0JTeTjIXQSfG2DF8JX1jZluaLEnwpmqz7OfSQCfBrgN/LpcQqpqYJo4T0slVFe+ZzBDrf9kKFpqSw9zVKl6WoLZJ9cG/4FcB2NLZFcVjy0wuN2P0PZqnUjkg/HP+T+aFHVcV/H8S41ypsT9FizPVs2bKlQMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=8OOP07ZJ5K6zJC39RegnS+KEULj9FcngGrvEUb0ws6k=; b=DbJKLtrh631FVTCkt7PW3L5jjxA2svLR9XENlLXilRbohygi1N0BKW7ktoKywHC8oZScBsoD74GyZNRO9mFCpuo1+mPGu5frNUe+LQm0kesC6WzCbZ6IVWO637LVrQYqwTMrmTZ2QcCSn8PjzTh0yL7fExt/RZwyfdYROuuNKlHpWUCQ9SnruKFO2NnGCcTaerNdkrtYlxsvxqhnTEAEadUbVkG8E0RtdhLTLfgLCaVY4bZXg8bKYh/bJ0+eZxEegR8hn/8G2szr6lMOZQjvz3pDhVWM8wj+CFoGuaas3E/BwImbDA65o9y6a4eMrGEiQT2DuXNkY7coiwFVcSoA2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8OOP07ZJ5K6zJC39RegnS+KEULj9FcngGrvEUb0ws6k=; b=chQK03sWHUl3IwwtZ4T148M+FywzSg1R2MIFMPabA9H7dHkR7Cov3PNBR2BvOxilnCUSPFreo8A4fA5PdMIRc+Z3YJfjM0Y7ydn72Nz+Kf4KuCAtalljX3DWnGnf9WK7TbBbknSY+qXFPuLDWGQyE392JucY/+KqvUeV6PploFg= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by MW4PR10MB5704.namprd10.prod.outlook.com (2603:10b6:303:18e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.27; Tue, 7 Nov 2023 23:08:55 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:55 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Tejun Heo , Zefan Li , Johannes Weiner , Peter Oberparleiter , Eric Biederman , Will Deacon , Luis Chamberlain , Oleg Nesterov Subject: [RFC PATCH 66/86] treewide: kernel: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:02 -0800 Message-Id: <20231107230822.371443-10-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: SJ2PR07CA0021.namprd07.prod.outlook.com (2603:10b6:a03:505::23) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|MW4PR10MB5704:EE_ X-MS-Office365-Filtering-Correlation-Id: f1a33053-30f6-4fd4-9b3c-08dbdfe68414 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zaRAPPZXVgVD5Jt/SdHiz1qj7K32eddOMxf14d9iiY/DnHBFukcb3pAQxBQhQcxjdyH1hTXTOqVzxkP20S/KfcxpSHos+3Ds45nFMmDLl2e/QNlkIdFQei6ggXiPbLzHQ6iq2PYxhQjHwrh2GaGGeRhh7SQto7ByhxxmPUSYgxWfIffx6TaNsfVsxhsMPlQ9FSAIAmDCfxAVmq0KwRojUl5bEk1usi2pkFErUNs1BtMUxv+jpyZSlIQPkuA2VsNinK8An8g7i0kGlnCygA9l9E+xs1h4RPjymAeBPDPxSwEDkcLPxJ30asS1lWG+et8E/wpgbyzxm861a8pXY5MwGCu023XBWHiZV+Dy37FDZOR0dpnhbc423+o4t0b66l6lYCqm36KN7hvB144H1wFmi3Uhocet0BTbtCrd7uqVDBWIaEgg3REXIOVVXaEwlURK7C51iPxmcPLT62J7NztvCURkJ2NCbe90ivpxzSo31dtYC22CNT9v1VDOer/j+WxPGjWt6yuPOePbzvx+vl/3bzbIewEBmogblbfjCXPV698= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(396003)(136003)(346002)(39860400002)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(478600001)(41300700001)(6506007)(2616005)(966005)(6486002)(6512007)(7416002)(6666004)(7406005)(8676002)(316002)(4326008)(8936002)(5660300002)(83380400001)(1076003)(26005)(66476007)(54906003)(66946007)(66556008)(6916009)(38100700002)(2906002)(86362001)(103116003)(36756003)(66899024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Sx5Rda8oJzkLUFM3YvoR2Jsf3Wy+79Wb2k2dv4GlFGHCz3bVVovekmudqSyGpc09icC5RhDEY3c9nGs/3DyIBVoHtcO6VLps+BbvjdeGpZtB0lmuFtRYc/JID0g3+VIm7CH8wyHU5kqMzJr3/929DRsykjRGjjQQUnzPOZ8kEmygQU95TejL8Ve8zoWBp7TQUBeVla0mNh2g0WY6DoNPoV4F1TSkjCttoXIs2A9dlgB75xpjz3Txj0k6WiaGBIyR6svYxSvOA0XieqtEPdCP5X3aYxH+76QaOs3RB0mbTc3UmbO6VPW1mSco2828rhQm85qsQ1f1zogj92aMfyNoBGOOOv678D40x5Vhvh+m5z+FrIf1dSMqzMZA1e8lzlZQ3IQ/EGynOqWAoxP2x6H6Te7xI+PMRQPBZa+A4j7+2sfAJjH4ioWwVViiaG92Qw21L0eHZsioOi7LipSJZ7L/zwE7JA2Gdh8uMkLCk89IbP29BYhkSPCAZHJAU7Bsj7D8/RRBZaQpW6uDCPhb+jdqJAL1rebImndNH0ReoY2S6p5IW9Vyy0qBmCLwIwUh07xSVUf8LStnWHHBbsM8bZZbrh29WbWrT6zc3gDWvNeGZtiPMcUzLX62yefSr9yx2lJiJvs2u7eva0b+Y9YdeU3ylUHb+KhxVc3xoMUdIwPXmUiK4aHHmhnZcE3iRF8I3DrWv79t2xWxJxksVCdzHkAXkJeOx4Mse/swg3OaPhuaPRQL8rKI12X2vdowD6G+MTwzt5KmYo8toqsW+ffukgUbM+mNiIrgpVvRtgYmKuJxLU0GZ7ZlAbgzYiiBnowx2J6VQxvxlf56osIHeA856e9RycDiD/3HBCsV+Rrrgygj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Bx13gGEqQLIw/W9WQS3sCHUe3dErXTF146UnUGpuO0NWpuIJ3j2zMqsuNSflb+bcwz/YfPE3dHsjcEbFZ3vRqv1oTDxCqueHOlMFQwqReKS2TqtT923/fjwEDaG+/leGNaCM7BdHsAJIpb8YGfMAr59F8EgOJCI7ZUq1LTzgzXjm48WexOWX7Zut2RLbMaMFmRXAA8Qu6GgYW5TdupjySpEYYxC5TPOte9l6kZKe+Epvsj7/V0OkmcooE/QImTnEIJ8PG0Z3NH4GdOvBPOj7SP5aDTsfcbb1f4ww4A8LUrTtF2D+6G9JS6OnV95Rgzab2DctxEexym87XXEdhc3WkRLk2A5+P4WoMyDupYmyYmlQv+dCI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1a33053-30f6-4fd4-9b3c-08dbdfe68414 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:55.6255 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n5q7pLPijrvOPMona7K8sU5qbJw6ZOVffbtpr00rtxqqt5Evn4cX/JYxn1imiHYiz5Psfx7T4TTh8hzpUEdhbuNwfUq2keKJI7GE8TYkiVA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5704 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: pdLlzmeJJ_4t3JNhsYOqts4QHNbXtwH6 X-Proofpoint-GUID: pdLlzmeJJ_4t3JNhsYOqts4QHNbXtwH6 X-Rspamd-Queue-Id: 62A65C000E X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ywcf67sqgfxfft7w9zeijgnsfp9w9f1t X-HE-Tag: 1699398575-371079 X-HE-Meta: U2FsdGVkX184qhmTBK/SQadXlOmMKH4rj7o09VxDeNl5e/0SfNjLne+eA1TFMUZzzGhN+SwaL2pwnfAhPPuh8G9oSu/OlWvmwp/aD3IeLes0KrVz5Z+PrX6gw8n6wcZwhCfg5ydlAOTlhm8gYCicTVvuP9xMYYUvcHkELdmfrg5feW2irGtADTlbiBmQJ3j2cWXOTsOD0tCTuPmU9sJICiGN1Jisu7CDDmL5vK1npSpg1fMTuXWlkhjOiTHMOsMZBnZKwX9QMHEE8bdEhdAj/5d65nOZXEzd3fG0FzHfeeJxSsD+q2r1cHGa7/eRX5IcDRwd8N3De2bmWGJUkDWBNqDz13uERUSkKlV6vOdF7vpCuvdU5azzlhOW+Bic07dJ3DHkaEMLWlw73j/hUtpwZOGtR/mikLNAmgpHr+OHyKTJHNTepQfARaYk2C7cNqHhMwWd6Xh906WP+GqvaRXKSxwczp4lLiSen4Tqi/F65rNnavMJKMDkRcwRP9vjwWwA/az85W4lVT6piasjakBKQNH4TfbUNawaQParj/tgXqQVvZJ4dZju2prDSDxIekTk/37jbYWp4R/+oN6C/rvS+y3QVZ+vTEwk5s+0v1yf0JWZx87Rb3C8o71R8GwDlNE/V8uZXF/K5kJ2AlrC0htpMRO3cT6803JdgLmblw2u17mqS/rrF6Co65z/wFaSoNJt6fswTZl+T36BbMAzCuyuaU9ErU+W4zOnQbtA5F9uZlFFcXgnn52R44nYdnwWFKTS/Dh4z08f+x3/C45TRC7MMoNkNm2CdNoo553326HhR3H61nuNKGHr0yiQ77GSLtA7Hf3nBEcl9rWfC9hRmBGkWIo101VXSSuOasnsZkGGaFJ8baO7vdcP0ymYgiBjk4EgIdy3/RD+BveAgsBmmO+G38N1NoNH26cnh9D7Mt+bVX5r5dIPawGe3NPqnB0CmQjgSkbvRl7p0lUhJSSW7pe TCTR3zUp nDQQYvcNTGXVivZ4rg0rpiVIkAlBkRFidA33lgGuH44W8bZ4g8ALLVYzc4F+MRHAgHN7r4z443KH3i0J9i3TAA43QegDswNaM9D/Ov6a+ulVgnrdjiKslTK8e+/LQRe3iasq6NKCLrFTTaXDRnpOCu77VcGF4vhXE8H3a9oMAXNl+d4TDKV7QZ8frntlU6rGwTZd7jgnnh7DlrmeZENiYJavWOW1RalQO50lxS80giEMTXE3y2uHxmodMJjTy6f36OTJ7Lqz2tYY7ujXhuZbQI7Mp0CHOaVVhwGltP24ytYTOHWzXGg++A+yOisekhk7kb/m6UU9irR9cmqYqY+rdiiSAxvQGgdqZlXCSs099nlaONmn+FnFfVy9XG4OSkTBPBtmrk2jv9z4hf5XgisgypQhZCQPFjU6hxIN4SExWA4lQcwLfJkELLixNwU75mX0AQGXq3ghZEbVtYyYD5LZxtRSkFABfTfNhH2NjnLCB59Zz/WrveKSqIhEcjU8eut+nLMGWasxgjiEcexZaIH1Hnm/IHVdn4BEB6ff1qfwjY+m7uslfYwJXe0oX1606I6p6b2hDLegCzTnGO1UQTvRDjHar83sHmlnl+FY9n/WiPpSu+OjOQTn5Y3s0t6+6sHLhX0LB+J+EZe+1ErMduC9Gw/mhSasAcoki2QoCKSmwSKl8OVGolm+/vjz+8W3RjYjWQgdiZI/mrjRf/NK2Ra7W1b+LNOyZP85dkZWrQYEcal1lyCjwMopga1QWPY05x2zoGNhV57Ot+FN3NUIY92e408SQnvhm0K96rcDbGaly11NhsKs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All of these are from set-1 except for the retry loops in task_function_call() or the mutex testing logic. Replace these with cond_resched_stall(). The others can be removed. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Tejun Heo Cc: Zefan Li Cc: Johannes Weiner Cc: Peter Oberparleiter Cc: Eric Biederman Cc: Will Deacon Cc: Luis Chamberlain Cc: Oleg Nesterov Cc: Juri Lelli Cc: Vincent Guittot Signed-off-by: Ankur Arora --- include/linux/sched/cond_resched.h | 1 - kernel/auditsc.c | 2 -- kernel/cgroup/rstat.c | 3 +-- kernel/dma/debug.c | 2 -- kernel/events/core.c | 2 +- kernel/gcov/base.c | 1 - kernel/kallsyms.c | 4 +--- kernel/kexec_core.c | 6 ------ kernel/locking/test-ww_mutex.c | 4 ++-- kernel/module/main.c | 1 - kernel/ptrace.c | 2 -- kernel/sched/core.c | 1 - kernel/sched/fair.c | 4 ---- 13 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 include/linux/sched/cond_resched.h diff --git a/include/linux/sched/cond_resched.h b/include/linux/sched/cond_resched.h deleted file mode 100644 index 227f5be81bcd..000000000000 --- a/include/linux/sched/cond_resched.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 6f0d6fb6523f..47abfc1e6c75 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -2460,8 +2460,6 @@ void __audit_inode_child(struct inode *parent, } } - cond_resched(); - /* is there a matching child entry? */ list_for_each_entry(n, &context->names_list, list) { /* can only match entries that have a name */ diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index d80d7a608141..d61dc98d1d2f 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -210,8 +210,7 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp) /* play nice and yield if necessary */ if (need_resched() || spin_needbreak(&cgroup_rstat_lock)) { spin_unlock_irq(&cgroup_rstat_lock); - if (!cond_resched()) - cpu_relax(); + cond_resched_stall(); spin_lock_irq(&cgroup_rstat_lock); } } diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index 06366acd27b0..fb8e7aed9751 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -543,8 +543,6 @@ void debug_dma_dump_mappings(struct device *dev) } } spin_unlock_irqrestore(&bucket->lock, flags); - - cond_resched(); } } diff --git a/kernel/events/core.c b/kernel/events/core.c index a2f2a9525d72..02330c190472 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -125,7 +125,7 @@ task_function_call(struct task_struct *p, remote_function_f func, void *info) if (ret != -EAGAIN) break; - cond_resched(); + cond_resched_stall(); } return ret; diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c index 073a3738c5e6..3c22a15065b3 100644 --- a/kernel/gcov/base.c +++ b/kernel/gcov/base.c @@ -43,7 +43,6 @@ void gcov_enable_events(void) /* Perform event callback for previously registered entries. */ while ((info = gcov_info_next(info))) { gcov_event(GCOV_ADD, info); - cond_resched(); } mutex_unlock(&gcov_lock); diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 18edd57b5fe8..a3c5ce9246cd 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -19,7 +19,7 @@ #include #include #include -#include /* for cond_resched */ +#include #include #include #include @@ -295,7 +295,6 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, unsigned long), ret = fn(data, namebuf, kallsyms_sym_address(i)); if (ret != 0) return ret; - cond_resched(); } return 0; } @@ -312,7 +311,6 @@ int kallsyms_on_each_match_symbol(int (*fn)(void *, unsigned long), for (i = start; !ret && i <= end; i++) { ret = fn(data, kallsyms_sym_address(get_symbol_seq(i))); - cond_resched(); } return ret; diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 9dc728982d79..40699ea33034 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -452,8 +452,6 @@ static struct page *kimage_alloc_crash_control_pages(struct kimage *image, while (hole_end <= crashk_res.end) { unsigned long i; - cond_resched(); - if (hole_end > KEXEC_CRASH_CONTROL_MEMORY_LIMIT) break; /* See if I overlap any of the segments */ @@ -832,8 +830,6 @@ static int kimage_load_normal_segment(struct kimage *image, else buf += mchunk; mbytes -= mchunk; - - cond_resched(); } out: return result; @@ -900,8 +896,6 @@ static int kimage_load_crash_segment(struct kimage *image, else buf += mchunk; mbytes -= mchunk; - - cond_resched(); } out: return result; diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 93cca6e69860..b1bb683274f8 100644 --- a/kernel/locking/test-ww_mutex.c +++ b/kernel/locking/test-ww_mutex.c @@ -46,7 +46,7 @@ static void test_mutex_work(struct work_struct *work) if (mtx->flags & TEST_MTX_TRY) { while (!ww_mutex_trylock(&mtx->mutex, NULL)) - cond_resched(); + cond_resched_stall(); } else { ww_mutex_lock(&mtx->mutex, NULL); } @@ -84,7 +84,7 @@ static int __test_mutex(unsigned int flags) ret = -EINVAL; break; } - cond_resched(); + cond_resched_stall(); } while (time_before(jiffies, timeout)); } else { ret = wait_for_completion_timeout(&mtx.done, TIMEOUT); diff --git a/kernel/module/main.c b/kernel/module/main.c index 98fedfdb8db5..03f6fcfa87f8 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -1908,7 +1908,6 @@ static int copy_chunked_from_user(void *dst, const void __user *usrc, unsigned l if (copy_from_user(dst, usrc, n) != 0) return -EFAULT; - cond_resched(); dst += n; usrc += n; len -= n; diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 443057bee87c..83a65a3c614a 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -798,8 +798,6 @@ static int ptrace_peek_siginfo(struct task_struct *child, if (signal_pending(current)) break; - - cond_resched(); } if (i > 0) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 3467a3a7d4bf..691b50791e04 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 448fe36e7bbb..4e67e88282a6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -51,8 +50,6 @@ #include -#include - #include "sched.h" #include "stats.h" #include "autogroup.h" @@ -3374,7 +3371,6 @@ static void task_numa_work(struct callback_head *work) if (pages <= 0 || virtpages <= 0) goto out; - cond_resched(); } while (end != vma->vm_end); } for_each_vma(vmi, vma); From patchwork Tue Nov 7 23:08:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C710C4332F for ; Tue, 7 Nov 2023 23:09:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 021C9440183; Tue, 7 Nov 2023 18:09:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EEDD0440182; Tue, 7 Nov 2023 18:09:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA66C440183; Tue, 7 Nov 2023 18:09:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B31D9440182 for ; Tue, 7 Nov 2023 18:09:24 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 961C5B5D46 for ; Tue, 7 Nov 2023 23:09:24 +0000 (UTC) X-FDA: 81432701448.23.6228FCE Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf24.hostedemail.com (Postfix) with ESMTP id 4B9A7180017 for ; Tue, 7 Nov 2023 23:09:21 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Hw+962zu; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ownyZOK+; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398561; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=JafVxiqnswdVWwpqn3XmzBdsqp/u4CdTWeLJekrmYts=; b=QL3JfukCUydI7WsoZhZnp1Rvgy6hPO3oszBeHvbVRoZGJlk0ptl+9PmnXqcx2XalyFMTnR Sv71c0+jb5c3fnCJulcLQKoQ7mXBy45EKN8diGJilsw143XtIrxAE6S1Yl6//rZTsbWrH7 lpP1IDz/M5Iob/yuaxMu7n36Dt1+CdY= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Hw+962zu; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ownyZOK+; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf24.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398561; a=rsa-sha256; cv=pass; b=rz4zDiakBIKVllxdzirCktbKZrZM5emMbeQNa2yEcAiJAwGqsZ+NogXmrM9Qc5TL6sfgLn 74uPIGa0AQdqHFvC/8sQEDTD9j4jsNCr0jFrVYiy+8n3IqcniXFjLNHZM19EnwM4zWvwq7 m0rhevpeybg3n7X+SsYT/9Q+Mr40jdA= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJqao022727; Tue, 7 Nov 2023 23:09:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=JafVxiqnswdVWwpqn3XmzBdsqp/u4CdTWeLJekrmYts=; b=Hw+962zu6Yi712n4EeenkP5NQHCYRcDslb0xaB3oOe2tLz8UHhe/2zvlm24rDxlz1uDy Q4/uhIxvb5Og5J+KKmfLA8Z3jzrxHy1pYdDJ4hUOlfhD5kXr+uvK/NFr/D+PQYxaY1UU IxW4jDNqLZHzEjMeg2jc1UzfoVZV3QSX9MKorAGOmNkUkFeg+iqoPsX2iGj+Rt+mRTc5 E6SzIF0NYSgmZ1uwXPWJsgN6Sm/kNL492AzZbBTl8vwHALQhZppDhVMP6/ybB8M3dkye nNUHEZzpoPvqD8YCwHfJnTISAdezocmcWcg/vyboEWwLFhqQUm5McYjnzpJB59BPsORp 2Q== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2006ey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:02 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7Msdnx000524; Tue, 7 Nov 2023 23:09:01 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wvd8y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M3R74tya9b6FeKFH2C/BYTCIaUOuZXbVGbQl1E4MmXw7RMK60j+42pljhMfdeWlYDHqyFLL7byzy0eln78Aevy7X1Z+2wFdXJu6FKpVtzkgp45FtHqJqEUbxFHVIfQjxVcUQeL/IULOHcH5UtmkUFsr4O1mZKA2a2jTD4jVCbsAvB6kTaARlbNh9WkmPLqpGAU+7Efjk07FGxt+kOxQvVPKbNCvovMDPjhVRi7cq2wEbMj9JSm7/bb3HyJWgQJYNbfWpG0fjfIfxA8zAe96mPcTWp7LrPU1xh7vwx7XGhQXj5QnSx4TOHC5gBHA+ZyvxFngC3pyivVOKBVawOBgiGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JafVxiqnswdVWwpqn3XmzBdsqp/u4CdTWeLJekrmYts=; b=B5IyGS8WMBrPyXOJk9f+hBL0doMo+8cqzFqjjGExQmlWiZjxWftadkWnbiyN8cqFjHnczBlmoJvgqmixpsXRZuanpLLVFMYcR3tNBpYSdAqWmAzO35xDUphfrRp4wkseRflbu1IUrL7v5cQ9nd0FIQ5DcGYoItAsa5ckk2kAqWQEPjR6zCIaJnPMRXPhzwyqSY1K2nxsV6Ihpdv1gpXB1ZO+Zz39eisGL+JgChcVx045wB4/nazQ9Wun/e4WgcNa8JTCxkG+5/HgZ+kXb4doc/0rni578y4HO+50fTcAoy8xmMsUGiBrzPj+ad+64dTJiGbtfi7V6HGiXelAA6t1wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JafVxiqnswdVWwpqn3XmzBdsqp/u4CdTWeLJekrmYts=; b=ownyZOK+9nqG7GX5+a0BG7rAy5lOwbNlyMzp2X0AUPk1WhxNWB7QQQPihW/IPu4YH6HRWpV3/M+t05WdIYveXehx44JjKxSQD59eNPdmHYWsPaI2ML0/vwXhbOMm/YQ5JNz/St4i0nbqRdoMwjgGsPIL52pMkMvEzUD/QfYze8I= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:08:58 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:08:57 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Tejun Heo , Lai Jiangshan , Nicholas Piggin Subject: [RFC PATCH 67/86] treewide: kernel: remove cond_reshed() Date: Tue, 7 Nov 2023 15:08:03 -0800 Message-Id: <20231107230822.371443-11-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR11CA0067.namprd11.prod.outlook.com (2603:10b6:a03:80::44) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ade9d50-cd26-4de6-2a65-08dbdfe68567 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MLEy72m5rLy1X4NIK49IbSnCp85Pj4Hl176JZmNsyXM8QjwgY1UO9K4UGMcUZkWnlDucLNUfnDGlauTSz5lBSPf4AOYeeC4bSujfDnTo47bg/OtLzfHPGiDkSZtsyxmx2HhRv2ePTV1Gsbf1JGr1xf4Shi+oJN5RDtXRBO2pZpgaXsGZdS/Vv9vnVYfo8CzkmmXdbbQj5OQli1qxn8PRPFwVcfySBZNC6BW18UetUnaT5Pw2HNFCDifWGKL6SYJZL2+DCaVk2er4F+DZwrtKl5yg0n0S9zUpEWvUaz5HO5hwAf+cWtguOkfhfBpQDxtwHnCUWbmhkU24ReANmc1LA5ncLQkhACZt+D4UPo8g77vBK3VtIKVdw2B6GvMx1Jc2WfilBbR3TvVJCB+il8pCCmdHNS8gSzn/akVnMwldj5x2FJK5cfH0aJyidltEKyqNTNW01CjKt8Rz5u1sJIcMX6QpVSJz7XR2MfFNjW7jp5fEEvkYu1jmHHAtCnSFzh1EbwdbxM0W4IdEQT9Gv71KWvWBK0hkLMFIf7dfHTjJhnA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nF0Y+8weTvpZH6CZGTP6m193GNY3Hv70FT+oIpHbabAPQ3X/NYYX0wu4xJM2xLfCwZq9pCVKrEfxRIyOK3eawzQ+nuSTh6aWLuWNzMVlXaR3YUTaOR4p0dGysQdWLpaRfmMRhbmQZd11p6TyCex59gTX26jJvKnQXqRWkiph+myUPbTOT0Rld5VgRq13qmX+/t3MuUOrCvdrrBNWNjCmLWA6HNbj1SWafIbGIoTI/9zfO184caMSf+8bbACaIjEo8oeGVwtnKKCp+9RJiIXOuFOoEvXFOckOnHlgbyCH8Xyuk0jKL5Z126f5XzV50HQOlNwUUJc9IWFW9f4/HOgxatqnDySyqoNXxRn6X6vUIjHaMeSlD3ATImmf8lvd9u4QOp0KkwfKVj+mZaCiztpWKXdxQUBR1b/XobiReEjxZmzCfzLSqdg7p/1IEWTDNOVQCEcCOx/Yu4fxHupEumpcIlWHcLDoc4G2F1RCJzAL4KnQ6YhLc2hjcGkoEIu/TEbHVrRTNmGpHT+uYCGFGqQj2HEC6wCdEXlCU/vywAWn1uH22FrJKu7i6XZeaRiRG1oz6X+P79ypgFErs7yr2VHl3LsDTtsSdau2f8r1FuUzssTkZp2TWfhevadWOK3f2v0ZoedTwm3s1PkaP4lbsvvDAo1PVCnWjgVXxNbkwSTk+DLGVWpdc5xXSIGuv5rQSq/nAeXHgZMM4qDsYAidJPMogatAhvV5/wQBiH+3LGAtDdxQs0wlS8pz2iDfCmSmYLsgiaexNZT9Y7Oz+2VuL5oUkfECYSrLZml55mJZufvC0rspyH1KRz7R9+bSLCI5//LG/MtXV6Ld8o2txW1/NhesMzdLO35kbypRgOLKDpgire1b77LhLjAWN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g3zhiqBqvg3onuMHsSIai+Z3r3Q1ODl3uOiiCSwn0Hy8SO3SPOqHSwFjHHjIN/qG7T4iM1ESvO3TxNDTxj+1kpvaPIiNCycgsnC8/0GIJW+G0u5tM51/OQkN2s6gC5if93Y+Q7ArexGRGS9SsT1W3QXj1MoLkBvxPL8LNvRS4D0gvDtTM7dMPOga/R7axGGQW+lVGAaVCPq6n6nyk6jZXahSOQeg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ade9d50-cd26-4de6-2a65-08dbdfe68567 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:08:57.8191 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rlxhZS+XXXYdf2aGAka82tw6dnDsekE61b5ap8uPd0B4bl7sGSKQxo80US3WitJqbA9SggSa4NljKrqtoMQ4gbTuZ8xXaKcDPtYPkJoUQyU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: dwU40Yjw50w1YY45RhAtgApT_BvecWbi X-Proofpoint-GUID: dwU40Yjw50w1YY45RhAtgApT_BvecWbi X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 4B9A7180017 X-Stat-Signature: nwzo489x9hkaqrywdzkh1yjemhotdewi X-Rspam-User: X-HE-Tag: 1699398561-465356 X-HE-Meta: U2FsdGVkX19Nqu7NRzlUgCwuwPcg2ap9/tBN1w2OoGnYYplcMtsZr1c7OtsZn0+liMgfg0NcXSf0U35LJLu4EdNz4wjsvYFcjK/amyvlnAcrXsceVhGohpz/T5N4vgZdPFRnAUXeKgmo6wgMLoBwu+J+R2hheQ3CN8G4PkMHJ9E1bNyLTu46wzmbxynQh1PzTcpb0FyaU+WyWxIha5AMkRZRBDLDkp2KI4jMJsp5SpuIGjlxrui1Cjldx0earCaF1I8wX0Ahd61USCorIrLkzGFuZrUHsSY4jZSPyYsJWAobKJy6Wd2XDvcjy15TqyNMvP1m6M3yQwHw33m+c8yFhA5c3UHA8JTPN32yQ/3Dr76836NyP6NksfvvbzryTjdaqBRTy42NHttfTg0elVHQprUbeGYG2+pypPUaAvP9UigfhfkhU/uDpHHAiqGzYwu1C/NZ3zw+qrQXzCznymfGinABf/FJqNoSlOGsRQ58oKXJiHDGGUkGyDhzU94cCuPo5QYGvyMzWaXZfEmBA1UDYoBg+D4EYlfJtv4XOSLBk9yPvNzwfG2kn6O4qwCCh8uUEkrp0qvqtF4VOKu2PBS4S0tv9DC7LNEGEOUgmIRwzFaVGFc5jlcoE9wcDezoVWm28mdHdUUnFPFrUb4/ugiyJk0iTctLCliXlGChaYv0ekKQONjsNkP/xSa3NMmDCsErMYT/rzfss+ytDHaNdensLgBAjsv2iqwH4hobiGPILcSwwlb5cMwqwhIPFBfEpweP68IRjKwmWrflXCHzDpekjpW9FbH3jSK61AJ44YOZt67AumA3QloS2p7lDsXcOO3lr1RCpG6J3DXK0UptueGq6LAmGNn9qnKWQ6amFik0/o7Yyx8CgupFoPlNegxDy4qyoWJFUE1jw5xxF19N+Q/lFVC+erJAn95kp98rCj7wPP8dhrrhX4KQ8VFi4k1+Xehz6jrIz/DagKRb1OVHGba dSmheczn KWtiEeUVsXlxaZrV8/wuSKkDfckjic2+AzIkfdqAs4f2CnKoTqI6fX/sbYksBTzNidNn6cDh5qmxKVvWp58Zh2GWDi/j2WvyxqADWHOysmSLH3JjPtzugs404Eyj6Z6ZwnCWfZd5g5OTjRi3u4W4sGhyg0KuavjvgmkC7ZI/N0NBhQgDKLJEeABPcZJxETivs228jYVdRRjDvEsFChGO7ivjlAhEsID9pjxB8uSSNDhIfcWdM/JCDXmyxQzC8yqkxJnW3m2vsxeytnvpX7KgNjY1aSi4fEIORUmEG6qcYoMaHnd3KB8f/a+osKiaVxp5VuqcHQhSzJVrF69O8yRZmg51KG/wVQqyYQoJchg+aM22QG3L+1/FLEeOVjeYqiP0ESI8knXldcA4dQvegu2DWh2BsyDn7xBV2GbIOwXZ6chSm5qXk3VXhUcMBtp0yId07VbkR/9Y4asdhkfY3ZTNisHm61QMv/6uoo9WoaYVvvDdzUyKDos3gyufF0YJjE9v0KF5Y0sseSxpNpwVtZtIj2s9cUN+np7HUCluIEPlsbLU7+ajlcm2sPpqWNZimuur4/QhJ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All of these are set-1 or set-2. Replace the call in stop_one_cpu() with cond_resched_stall() to allow it a chance to schedule. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Tejun Heo Cc: Lai Jiangshan Cc: Andrew Morton Cc: Nicholas Piggin Signed-off-by: Ankur Arora --- kernel/kthread.c | 1 - kernel/softirq.c | 1 - kernel/stop_machine.c | 2 +- kernel/workqueue.c | 10 ---------- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 1eea53050bab..e111eebee240 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -830,7 +830,6 @@ int kthread_worker_fn(void *worker_ptr) schedule(); try_to_freeze(); - cond_resched(); goto repeat; } EXPORT_SYMBOL_GPL(kthread_worker_fn); diff --git a/kernel/softirq.c b/kernel/softirq.c index 210cf5f8d92c..c80237cbcb3d 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -920,7 +920,6 @@ static void run_ksoftirqd(unsigned int cpu) */ __do_softirq(); ksoftirqd_run_end(); - cond_resched(); return; } ksoftirqd_run_end(); diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index cedb17ba158a..1929fe8ecd70 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -148,7 +148,7 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) * In case @cpu == smp_proccessor_id() we can avoid a sleep+wakeup * cycle by doing a preemption: */ - cond_resched(); + cond_resched_stall(); wait_for_completion(&done.completion); return done.ret; } diff --git a/kernel/workqueue.c b/kernel/workqueue.c index a3522b70218d..be5080e1b7d6 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2646,16 +2646,6 @@ __acquires(&pool->lock) dump_stack(); } - /* - * The following prevents a kworker from hogging CPU on !PREEMPTION - * kernels, where a requeueing work item waiting for something to - * happen could deadlock with stop_machine as such work item could - * indefinitely requeue itself while all other CPUs are trapped in - * stop_machine. At the same time, report a quiescent RCU state so - * the same condition doesn't freeze RCU. - */ - cond_resched(); - raw_spin_lock_irq(&pool->lock); /* From patchwork Tue Nov 7 23:08:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D4F9C4167D for ; Tue, 7 Nov 2023 23:09:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8643544018A; Tue, 7 Nov 2023 18:09:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CC7A440186; Tue, 7 Nov 2023 18:09:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4908844018A; Tue, 7 Nov 2023 18:09:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2985A440186 for ; Tue, 7 Nov 2023 18:09:39 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D9ECA1A0B25 for ; Tue, 7 Nov 2023 23:09:38 +0000 (UTC) X-FDA: 81432702036.19.3B6DDFA Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id 4DF30A000A for ; Tue, 7 Nov 2023 23:09:35 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=XCt682Da; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="ULPGQF/5"; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf15.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398575; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3uI/fZFeuBr6jA7+6es//f2md0mir79g9QeIhmGXwRI=; b=zQTctNwA6gZcO02pyEbjD2xSPKGD/zmT9Lr30tjVXtrEbGme7HnEsIGd31GQl/8WArXhj9 pZ5hgNTRSE5JAh4L0FZAWnbG3denKJu8MS7rqfrFEFqxlJFqpgtt+95puZnf+20F6UTW72 DfU+5oSuJKEsvoh0BFaEIRb9huA+ttY= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=XCt682Da; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="ULPGQF/5"; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf15.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398575; a=rsa-sha256; cv=pass; b=D6cWInQa7zYpWmBWJpARA8Tf2dLG2AagRivL/Fo5+D1at4UDzP//WoaUmHa6GQwD1oFta4 F4bvWGxwJZ1FgWrrzWQgi5MlvxAH0d4OEIvYqPj3cGvvrzYpE5rfJO7BTSCAyiR38woc9v qcpJ0cFyoMAVD2MNEnzEzo1xvMF5y7A= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LKAVv026491; Tue, 7 Nov 2023 23:09:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=3uI/fZFeuBr6jA7+6es//f2md0mir79g9QeIhmGXwRI=; b=XCt682Da902H1JOx4GpvspdbXkv3cnNlPxXM5GMDD42oyqHH6OM5ueseh2LcB05fudqq 9UnWndXQyFsIgfscCCK48BKPzXn9kX53kDXTBGG+P+2QfNrlFGP8SFufx7Ln+BvbZRRq JCxr2C1gsAGWHphObumbo4DhbSD4s2th/r4pY4kW32Y6lYhZFwkeLfUwx+aswH0ct7TK MfJqda06eCfQd0g27c7M4gJlBWxWoC3qr7NAObr5NuSNZzPksNLxde/lSqbaZ66ymRfH GVpTID25VeAR2TOmPNKNzk50Bh8oiC7sX073e/yyZdGeNoeqRMnvN1ShIcWez2Zs/FX1 IQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106vf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:05 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N3ZLT000474; Tue, 7 Nov 2023 23:09:05 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbk5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDcafdkPv2AMXR3KeInQtRKujO4TfcUJiGf4PF2BltvUCy5iA/wm7qa39C14/7Wxi8fYa78+OSkIg0whlIGR+TQMUZxVGS+WPrYrpjMplG7+bwyA0U1UuXkX518rJ2A9igDs/m9KvTkDKW5LoXv7KFPjIjMHclxhBQ1BENg6/fQdHwKX+fUvcWhb3+J9EoYct8vjXTeFzXkX+PtawpfWbbgTfjnYGqGvMWK5NbtM7+Xfj9XBQlni43xb/e1UUGDj4HANV4rtOvXYhegb6J1nBtSyw4Onoa2UEDO+mAfgq1BDTpl1Q0pepQqBIXcsScGRafpu0oZs+u9tzTsk1JNJkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=3uI/fZFeuBr6jA7+6es//f2md0mir79g9QeIhmGXwRI=; b=L2zTaKlHd4Ff+AfTqKbOvps7RvqgBrcZReEJkH5RfYNBLPSMYTIInZnuvDAC6hdYt2XRMl+ygcocCaGeCFu6dxCcbqVvlrVFWJeTVrXBL5X7KQwKtdj5BoOQwF9YDMkiSc5tDIH6unzGPv8AfUfzvoADl3QJjgCXfzWJXKM2ddA2t7a4su6Nq6WXWIVq83p8P2STt36e432S4HESqyUaEavRQ4yu0so5bA7Se2Ozzfxqz0pPS+B2flv6iS0VYPQM+Qsa/RywrI8tUdhUbmykeJiujHQyAtqIuRWzLE7k3woD6wd3W93xSzILU0jcyPxmlMoMn5J3czKa6vbA+QcYXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3uI/fZFeuBr6jA7+6es//f2md0mir79g9QeIhmGXwRI=; b=ULPGQF/53ERyl7qiIiBXq56ajqYolS+R1MRCImVMuR/RPD7rXo/8/A65J/tJTTKO0bHoj1waJLSZOBgnfjcdKx01yZ/aSiypkbxzqRL71PYM0x6bvwthmrQwrO5qe4D8/7o4fI7IwVBnjTM9R4TcAQQoKjEsQg6EVXe9mnwY8Uk= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:00 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:00 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , SeongJae Park , Mike Kravetz , Muchun Song , Andrey Ryabinin , Marco Elver , Catalin Marinas , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Naoya Horiguchi , Miaohe Lin , David Hildenbrand , Oscar Salvador , Mike Rapoport , Will Deacon , "Aneesh Kumar K.V" , Nick Piggin , Dennis Zhou , Tejun Heo , Christoph Lameter , Hugh Dickins , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , Vitaly Wool , Minchan Kim , Sergey Senozhatsky , Seth Jennings , Dan Streetman Subject: [RFC PATCH 68/86] treewide: mm: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:04 -0800 Message-Id: <20231107230822.371443-12-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR11CA0058.namprd11.prod.outlook.com (2603:10b6:a03:80::35) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: e4371a20-9aa2-46da-6ab3-08dbdfe686ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1iHVqK5mdApJWfcw7ZLYmLnwwrfmfqkv3UWIjrrGrnl4/GboY4+tu/En5ac4qnpWDONmUOIiE0eWw1IHmwMYAWy2KZCkhZG+/nyV+b93qHQigK9hC4nPUhkKYw8QR77+YC7pFkSww9MIinB8ai2u3488Nn2SIhCkKPXy80J8C7Pto6KgHy8T7c8P0seVzFwa/gMsTS1A3SINXRDira+zrrrCn6H6bR6GxvxfstywXjhWj3mVprSlSAt1dKHAr8a4jC1+mD2MnpXTpjdA8LxUDIy+LTaN1HEgJ5UBCVil+hH1UtwacPE4yFig3NQ54q52pbJR6xG07QQjWZEqbAZRdNyl45mfBS0lZARc/w61oF5cztHIDmE53xauhPWGVEGZGg1DFsf06b8xL2cdd/58zDjeT2BM3LgHgbOPeKHvNfdcWTOGXWmrlKf82Uu2AmIsAz2SE3wvuHJ1bhBnIzN0YtnF1s/DAH7YVJaV8Kr4r1jE6TISqPiLH+INHpRNT4l/ot61YxkSaCSsvvm1AG8BOTQlRhWhV9WckohLTr+tOIn3kmSq1k2QQO6HgP+m+cdbBpFGR5dOZmwzutvYZzsz9QbLi3lxBl/WGMd61gGWQQk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7366002)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002)(579004)(559001)(309714004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1FopSakw1Ko0kKgkFKXciaBS33hpYTaLW9JyipZJ3Xt+VPel4zwqCF21RKzFe3gVGsW1Tc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BYKgCk9wGFNpIm7GQR3L5LxoFUNT3LPSccm51gNHuI5GI6TvmCD8HEBmLaeLLf3X7Se4YmF9k2eyWQQHSWtJC8nUvtp/0LV4AihkzuyY+hryFSpmgujptaUHa47TC0EFDJStEvjcfB/egtIlV0VeDntsw4K9Q3V+FTAlCk9NauWUl+LC/0SXmkh22av3Aocapr006eO9mDfwCSr X-MS-Exchange-AntiSpam-ExternalHop-MessageData-1: 5yPG2gYdWudJghAE/epF9eHuAPIuBHP9aOsvPdV6YeCulyBi5D+jmXoLxekwkMH33d1FkvvG3LcRfFC1Ri++6KhwtYpAv/UcrobFieqaB3RvKspDzW4xD7sw X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4371a20-9aa2-46da-6ab3-08dbdfe686ca X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:00.3284 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vyndtLu+I1Gk3UxiwfsM2T8DI/boxg3n4LeOu7t3Sc3BJkjLh7El3ojDTdwc8PNDf+DCatavWXXNQIPCGMgLX7I9jc0JpdzVg1LB4UXGryA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: VEx-YbWmKrd44qtDJfQl0QM31CdMnzq- X-Proofpoint-ORIG-GUID: VEx-YbWmKrd44qtDJfQl0QM31CdMnzq- X-Rspamd-Queue-Id: 4DF30A000A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 1ui9msi7qpemxmhmo4cea9b9iwn4pqei X-HE-Tag: 1699398575-851195 X-HE-Meta: U2FsdGVkX195gIdLCDRsGeqTl9sTj62kMCclGnEKR1Wo4hKrs8NtoK2gVQYBO7h5inVCjHXpVUidCh5J2tMhbNf9rVVsag+ycdCamPJskg7WstIzhwEba7Xhvw32epRcofRqNdFyQJ5PJ4j57SUK3IAyCf6ShUdHUtS1RHCP/r8ieQIg+Tkn4fn3SZMoDdfESUdGMGAv9pvvfuYeDhoXVhK6ImY4Ziu+OCYh2TOgF/0Eqiv89ncKIQ4Ez4vZxJ16bd4qUeDkoklzK9QeYRpv6p+NQ7DLDAZwnMwn8YbSJ2qdNT/j5iIoEi6LtKh3sFNqLhTjhU/MeDBJDtMgxhnOUoOupEBfRi/EIp3lMR9abUsadJqIo04+HMOtWLlWsxYkCgIA+5caWUoLEH/buNXoairgFzwrvIS3cJP6r1PKSNy0qTbghxgfSU7DfNH8N8TMrynLgWqGdVGKfcFfl7OoaDu6Sbpu5Y3qNAYH9XIIjOd2mR2BVuoZ9fy2LuR8e7+H4SA7OeKoLW9CpqbsM4NnfnAi6FFWkFkEapM081SYE2cv50UDiw1/P31/RV5sDlYCX4V0TqDyeoKUeX2IN2Ck0OA0obXe/vdX+zYCO+eHwKyl3HYd3mPCDJx+NpkZ1mT2M82arpt+nYnHsPC69hz/+ZOmUcgDRbhPWiaLXjp065wKbpjJZqVlUxiD+3tjbudvq03jpE8Ql5Jj251zv95YzLGtGINfX+HcAceqYk0ZQJofPVEFLBhBsAKLSSgXxp2rrFzUAS44lIaEegqpbtsGHrTCjuQIrOfdRatmbnbGNkhizGN+ySt8o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FzIJBel5jEF5CVnIlRDuHIDaLFsI0dRrQljqjjNISudfq8T9IdKF1mSCaSO3r8UbH69qG3JE8rhdkMaVbhdKkAixY4i0y RZWGoeDV tX9U+b6OWaRfzwI155puQz57A/cs7tDD+BwqxfYFO7c3W3veBAjKxJ+kZJefD1gMQC2SIxgoh4HCR3mvjiIFQ23KS0ofnuRtbia0643txG7oogXZ9WVJO2qgJS4ZAEnLPkTe8b/qXwAlt9QYgoC02kLeSQg1BmZzZIiGTNuOqyuVOAL86i5G30EkiPmJk48/U/byjmEXfDeRrE3TQpnZ85NrHAVnrg2H9fImo1L6oGCUyjR7b9ZXZrMNFTk0rDpBHZseWYrdRO3YQV/9WXmeHQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the cond_resched() cases here are from set-1, we are executing in long loops and want to see if rescheduling is needed. Now the scheduler can handle rescheduling for those. There are a few set-2 cases where we give up a lock and reacquire it. The unlock will take care of the preemption, but maybe there should be a cpu_relax() before reacquiring? [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Andrew Morton Cc: SeongJae Park Cc: "Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Cc: Andrey Ryabinin Cc: Marco Elver Cc: Catalin Marinas Cc: Johannes Weiner Cc: Michal Hocko Cc: Roman Gushchin Cc: Shakeel Butt Cc: Naoya Horiguchi Cc: Miaohe Lin Cc: David Hildenbrand Cc: Oscar Salvador Cc: Mike Rapoport Cc: Will Deacon Cc: "Aneesh Kumar K.V" Cc: Nick Piggin Cc: Peter Zijlstra Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Hugh Dickins Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Vitaly Wool Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Seth Jennings Cc: Dan Streetman Cc: linux-mm@kvack.org Signed-off-by: Ankur Arora --- mm/backing-dev.c | 8 +++++++- mm/compaction.c | 23 ++++++----------------- mm/damon/paddr.c | 1 - mm/dmapool_test.c | 2 -- mm/filemap.c | 6 ------ mm/gup.c | 1 - mm/huge_memory.c | 3 --- mm/hugetlb.c | 12 ------------ mm/hugetlb_cgroup.c | 1 - mm/kasan/quarantine.c | 6 ++++-- mm/kfence/kfence_test.c | 22 +--------------------- mm/khugepaged.c | 5 ----- mm/kmemleak.c | 8 -------- mm/ksm.c | 21 ++++----------------- mm/madvise.c | 3 --- mm/memcontrol.c | 4 ---- mm/memory-failure.c | 1 - mm/memory.c | 12 +----------- mm/memory_hotplug.c | 6 ------ mm/mempolicy.c | 1 - mm/migrate.c | 6 ------ mm/mincore.c | 1 - mm/mlock.c | 2 -- mm/mm_init.c | 13 +++---------- mm/mmap.c | 1 - mm/mmu_gather.c | 2 -- mm/mprotect.c | 1 - mm/mremap.c | 1 - mm/nommu.c | 1 - mm/page-writeback.c | 1 - mm/page_alloc.c | 13 ++----------- mm/page_counter.c | 1 - mm/page_ext.c | 1 - mm/page_idle.c | 2 -- mm/page_io.c | 2 -- mm/page_owner.c | 1 - mm/percpu.c | 5 ----- mm/rmap.c | 2 -- mm/shmem.c | 9 --------- mm/shuffle.c | 6 ++++-- mm/slab.c | 3 --- mm/swap_cgroup.c | 4 ---- mm/swapfile.c | 14 -------------- mm/truncate.c | 4 ---- mm/userfaultfd.c | 3 --- mm/util.c | 1 - mm/vmalloc.c | 5 ----- mm/vmscan.c | 29 ++--------------------------- mm/vmstat.c | 4 ---- mm/workingset.c | 1 - mm/z3fold.c | 15 ++++----------- mm/zsmalloc.c | 1 - mm/zswap.c | 1 - 53 files changed, 38 insertions(+), 264 deletions(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 1e3447bccdb1..22ca90addb35 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -816,8 +816,14 @@ static void cleanup_offline_cgwbs_workfn(struct work_struct *work) continue; spin_unlock_irq(&cgwb_lock); + + /* + * cleanup_offline_cgwb() can implicitly reschedule + * on unlock when needed, so just loop here. + */ while (cleanup_offline_cgwb(wb)) - cond_resched(); + ; + spin_lock_irq(&cgwb_lock); wb_put(wb); diff --git a/mm/compaction.c b/mm/compaction.c index 38c8d216c6a3..5bca34760fec 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -395,8 +395,6 @@ static void __reset_isolation_suitable(struct zone *zone) */ for (; migrate_pfn < free_pfn; migrate_pfn += pageblock_nr_pages, free_pfn -= pageblock_nr_pages) { - cond_resched(); - /* Update the migrate PFN */ if (__reset_isolation_pfn(zone, migrate_pfn, true, source_set) && migrate_pfn < reset_migrate) { @@ -571,8 +569,6 @@ static bool compact_unlock_should_abort(spinlock_t *lock, return true; } - cond_resched(); - return false; } @@ -874,8 +870,6 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, return -EINTR; } - cond_resched(); - if (cc->direct_compaction && (cc->mode == MIGRATE_ASYNC)) { skip_on_failure = true; next_skip_pfn = block_end_pfn(low_pfn, cc->order); @@ -923,8 +917,6 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, goto fatal_pending; } - - cond_resched(); } nr_scanned++; @@ -1681,11 +1673,10 @@ static void isolate_freepages(struct compact_control *cc) unsigned long nr_isolated; /* - * This can iterate a massively long zone without finding any - * suitable migration targets, so periodically check resched. + * We can iterate over a massively long zone without finding + * any suitable migration targets. Since we don't disable + * preemption while doing so, expect to be preempted. */ - if (!(block_start_pfn % (COMPACT_CLUSTER_MAX * pageblock_nr_pages))) - cond_resched(); page = pageblock_pfn_to_page(block_start_pfn, block_end_pfn, zone); @@ -2006,12 +1997,10 @@ static isolate_migrate_t isolate_migratepages(struct compact_control *cc) block_end_pfn += pageblock_nr_pages) { /* - * This can potentially iterate a massively long zone with - * many pageblocks unsuitable, so periodically check if we - * need to schedule. + * We can potentially iterate a massively long zone with + * many pageblocks unsuitable. Since we don't disable + * preemption while doing so, expect to be preempted. */ - if (!(low_pfn % (COMPACT_CLUSTER_MAX * pageblock_nr_pages))) - cond_resched(); page = pageblock_pfn_to_page(block_start_pfn, block_end_pfn, cc->zone); diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 909db25efb35..97eed5e0f89b 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -251,7 +251,6 @@ static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s) folio_put(folio); } applied = reclaim_pages(&folio_list); - cond_resched(); return applied * PAGE_SIZE; } diff --git a/mm/dmapool_test.c b/mm/dmapool_test.c index 370fb9e209ef..c519475310e4 100644 --- a/mm/dmapool_test.c +++ b/mm/dmapool_test.c @@ -82,8 +82,6 @@ static int dmapool_test_block(const struct dmapool_parms *parms) ret = dmapool_test_alloc(p, blocks); if (ret) goto free_pool; - if (need_resched()) - cond_resched(); } end_time = ktime_get(); diff --git a/mm/filemap.c b/mm/filemap.c index dc4dcc5eaf5e..e3c9cf5b33b4 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -526,7 +526,6 @@ static void __filemap_fdatawait_range(struct address_space *mapping, folio_clear_error(folio); } folio_batch_release(&fbatch); - cond_resched(); } } @@ -2636,8 +2635,6 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter, folio_batch_init(&fbatch); do { - cond_resched(); - /* * If we've already successfully copied some data, then we * can no longer safely return -EIOCBQUEUED. Hence mark @@ -2910,8 +2907,6 @@ ssize_t filemap_splice_read(struct file *in, loff_t *ppos, folio_batch_init(&fbatch); do { - cond_resched(); - if (*ppos >= i_size_read(in->f_mapping->host)) break; @@ -3984,7 +3979,6 @@ ssize_t generic_perform_write(struct kiocb *iocb, struct iov_iter *i) if (unlikely(status < 0)) break; } - cond_resched(); if (unlikely(status == 0)) { /* diff --git a/mm/gup.c b/mm/gup.c index 2f8a2d89fde1..f6d913e97d71 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1232,7 +1232,6 @@ static long __get_user_pages(struct mm_struct *mm, ret = -EINTR; goto out; } - cond_resched(); page = follow_page_mask(vma, start, foll_flags, &ctx); if (!page || PTR_ERR(page) == -EMLINK) { diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 064fbd90822b..6d48ee94a8c8 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2954,7 +2954,6 @@ static void split_huge_pages_all(void) folio_unlock(folio); next: folio_put(folio); - cond_resched(); } } @@ -3044,7 +3043,6 @@ static int split_huge_pages_pid(int pid, unsigned long vaddr_start, folio_unlock(folio); next: folio_put(folio); - cond_resched(); } mmap_read_unlock(mm); mmput(mm); @@ -3101,7 +3099,6 @@ static int split_huge_pages_in_file(const char *file_path, pgoff_t off_start, folio_unlock(folio); next: folio_put(folio); - cond_resched(); } filp_close(candidate, NULL); diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1301ba7b2c9a..d611d256ebc2 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1830,8 +1830,6 @@ static void free_hpage_workfn(struct work_struct *work) h = size_to_hstate(page_size(page)); __update_and_free_hugetlb_folio(h, page_folio(page)); - - cond_resched(); } } static DECLARE_WORK(free_hpage_work, free_hpage_workfn); @@ -1869,7 +1867,6 @@ static void update_and_free_pages_bulk(struct hstate *h, struct list_head *list) list_for_each_entry_safe(page, t_page, list, lru) { folio = page_folio(page); update_and_free_hugetlb_folio(h, folio, false); - cond_resched(); } } @@ -2319,7 +2316,6 @@ int dissolve_free_huge_page(struct page *page) */ if (unlikely(!folio_test_hugetlb_freed(folio))) { spin_unlock_irq(&hugetlb_lock); - cond_resched(); /* * Theoretically, we should return -EBUSY when we @@ -2563,7 +2559,6 @@ static int gather_surplus_pages(struct hstate *h, long delta) break; } list_add(&folio->lru, &surplus_list); - cond_resched(); } allocated += i; @@ -2961,7 +2956,6 @@ static int alloc_and_dissolve_hugetlb_folio(struct hstate *h, * we retry. */ spin_unlock_irq(&hugetlb_lock); - cond_resched(); goto retry; } else { /* @@ -3233,7 +3227,6 @@ static void __init gather_bootmem_prealloc(void) * other side-effects, like CommitLimit going negative. */ adjust_managed_page_count(page, pages_per_huge_page(h)); - cond_resched(); } } static void __init hugetlb_hstate_alloc_pages_onenode(struct hstate *h, int nid) @@ -3255,7 +3248,6 @@ static void __init hugetlb_hstate_alloc_pages_onenode(struct hstate *h, int nid) break; free_huge_folio(folio); /* free it into the hugepage allocator */ } - cond_resched(); } if (i == h->max_huge_pages_node[nid]) return; @@ -3317,7 +3309,6 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h) &node_states[N_MEMORY], node_alloc_noretry)) break; - cond_resched(); } if (i < h->max_huge_pages) { char buf[32]; @@ -3536,9 +3527,6 @@ static int set_max_huge_pages(struct hstate *h, unsigned long count, int nid, */ spin_unlock_irq(&hugetlb_lock); - /* yield cpu to avoid soft lockup */ - cond_resched(); - ret = alloc_pool_huge_page(h, nodes_allowed, node_alloc_noretry); spin_lock_irq(&hugetlb_lock); diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c index dedd2edb076e..a4441f328752 100644 --- a/mm/hugetlb_cgroup.c +++ b/mm/hugetlb_cgroup.c @@ -235,7 +235,6 @@ static void hugetlb_cgroup_css_offline(struct cgroup_subsys_state *css) spin_unlock_irq(&hugetlb_lock); } - cond_resched(); } while (hugetlb_cgroup_have_usage(h_cg)); } diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c index 152dca73f398..1a1edadbeb39 100644 --- a/mm/kasan/quarantine.c +++ b/mm/kasan/quarantine.c @@ -374,9 +374,11 @@ void kasan_quarantine_remove_cache(struct kmem_cache *cache) if (qlist_empty(&global_quarantine[i])) continue; qlist_move_cache(&global_quarantine[i], &to_free, cache); - /* Scanning whole quarantine can take a while. */ + /* + * Scanning whole quarantine can take a while so check if need + * to reschedule after giving up the lock. + */ raw_spin_unlock_irqrestore(&quarantine_lock, flags); - cond_resched(); raw_spin_lock_irqsave(&quarantine_lock, flags); } raw_spin_unlock_irqrestore(&quarantine_lock, flags); diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c index 95b2b84c296d..29fbc24046b9 100644 --- a/mm/kfence/kfence_test.c +++ b/mm/kfence/kfence_test.c @@ -244,7 +244,7 @@ enum allocation_policy { static void *test_alloc(struct kunit *test, size_t size, gfp_t gfp, enum allocation_policy policy) { void *alloc; - unsigned long timeout, resched_after; + unsigned long timeout; const char *policy_name; switch (policy) { @@ -265,17 +265,6 @@ static void *test_alloc(struct kunit *test, size_t size, gfp_t gfp, enum allocat kunit_info(test, "%s: size=%zu, gfp=%x, policy=%s, cache=%i\n", __func__, size, gfp, policy_name, !!test_cache); - /* - * 100x the sample interval should be more than enough to ensure we get - * a KFENCE allocation eventually. - */ - timeout = jiffies + msecs_to_jiffies(100 * kfence_sample_interval); - /* - * Especially for non-preemption kernels, ensure the allocation-gate - * timer can catch up: after @resched_after, every failed allocation - * attempt yields, to ensure the allocation-gate timer is scheduled. - */ - resched_after = jiffies + msecs_to_jiffies(kfence_sample_interval); do { if (test_cache) alloc = kmem_cache_alloc(test_cache, gfp); @@ -307,8 +296,6 @@ static void *test_alloc(struct kunit *test, size_t size, gfp_t gfp, enum allocat test_free(alloc); - if (time_after(jiffies, resched_after)) - cond_resched(); } while (time_before(jiffies, timeout)); KUNIT_ASSERT_TRUE_MSG(test, false, "failed to allocate from KFENCE"); @@ -628,7 +615,6 @@ static void test_gfpzero(struct kunit *test) kunit_warn(test, "giving up ... cannot get same object back\n"); return; } - cond_resched(); } for (i = 0; i < size; i++) @@ -755,12 +741,6 @@ static void test_memcache_alloc_bulk(struct kunit *test) } } kmem_cache_free_bulk(test_cache, num, objects); - /* - * kmem_cache_alloc_bulk() disables interrupts, and calling it - * in a tight loop may not give KFENCE a chance to switch the - * static branch. Call cond_resched() to let KFENCE chime in. - */ - cond_resched(); } while (!pass && time_before(jiffies, timeout)); KUNIT_EXPECT_TRUE(test, pass); diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 4025225ef434..ebec87db5cc1 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -2361,7 +2361,6 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages, int *result, for_each_vma(vmi, vma) { unsigned long hstart, hend; - cond_resched(); if (unlikely(hpage_collapse_test_exit(mm))) { progress++; break; @@ -2382,7 +2381,6 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages, int *result, while (khugepaged_scan.address < hend) { bool mmap_locked = true; - cond_resched(); if (unlikely(hpage_collapse_test_exit(mm))) goto breakouterloop; @@ -2488,8 +2486,6 @@ static void khugepaged_do_scan(struct collapse_control *cc) lru_add_drain_all(); while (true) { - cond_resched(); - if (unlikely(kthread_should_stop() || try_to_freeze())) break; @@ -2721,7 +2717,6 @@ int madvise_collapse(struct vm_area_struct *vma, struct vm_area_struct **prev, int result = SCAN_FAIL; if (!mmap_locked) { - cond_resched(); mmap_read_lock(mm); mmap_locked = true; result = hugepage_vma_revalidate(mm, addr, false, &vma, diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 54c2c90d3abc..9092941cb259 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1394,7 +1394,6 @@ static void scan_large_block(void *start, void *end) next = min(start + MAX_SCAN_SIZE, end); scan_block(start, next, NULL); start = next; - cond_resched(); } } #endif @@ -1439,7 +1438,6 @@ static void scan_object(struct kmemleak_object *object) break; raw_spin_unlock_irqrestore(&object->lock, flags); - cond_resched(); raw_spin_lock_irqsave(&object->lock, flags); } while (object->flags & OBJECT_ALLOCATED); } else @@ -1466,8 +1464,6 @@ static void scan_gray_list(void) */ object = list_entry(gray_list.next, typeof(*object), gray_list); while (&object->gray_list != &gray_list) { - cond_resched(); - /* may add new objects to the list */ if (!scan_should_stop()) scan_object(object); @@ -1501,7 +1497,6 @@ static void kmemleak_cond_resched(struct kmemleak_object *object) raw_spin_unlock_irq(&kmemleak_lock); rcu_read_unlock(); - cond_resched(); rcu_read_lock(); raw_spin_lock_irq(&kmemleak_lock); @@ -1584,9 +1579,6 @@ static void kmemleak_scan(void) for (pfn = start_pfn; pfn < end_pfn; pfn++) { struct page *page = pfn_to_online_page(pfn); - if (!(pfn & 63)) - cond_resched(); - if (!page) continue; diff --git a/mm/ksm.c b/mm/ksm.c index 981af9c72e7a..df5bca0af731 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -492,7 +492,6 @@ static int break_ksm(struct vm_area_struct *vma, unsigned long addr, bool lock_v do { int ksm_page; - cond_resched(); ksm_page = walk_page_range_vma(vma, addr, addr + 1, ops, NULL); if (WARN_ON_ONCE(ksm_page < 0)) return ksm_page; @@ -686,7 +685,6 @@ static void remove_node_from_stable_tree(struct ksm_stable_node *stable_node) stable_node->rmap_hlist_len--; put_anon_vma(rmap_item->anon_vma); rmap_item->address &= PAGE_MASK; - cond_resched(); } /* @@ -813,6 +811,10 @@ static struct page *get_ksm_page(struct ksm_stable_node *stable_node, */ static void remove_rmap_item_from_tree(struct ksm_rmap_item *rmap_item) { + /* + * We are called from many long loops, and for the most part don't + * disable preemption. So expect to be preempted occasionally. + */ if (rmap_item->address & STABLE_FLAG) { struct ksm_stable_node *stable_node; struct page *page; @@ -858,7 +860,6 @@ static void remove_rmap_item_from_tree(struct ksm_rmap_item *rmap_item) rmap_item->address &= PAGE_MASK; } out: - cond_resched(); /* we're called from many long loops */ } static void remove_trailing_rmap_items(struct ksm_rmap_item **rmap_list) @@ -1000,13 +1001,11 @@ static int remove_all_stable_nodes(void) err = -EBUSY; break; /* proceed to next nid */ } - cond_resched(); } } list_for_each_entry_safe(stable_node, next, &migrate_nodes, list) { if (remove_stable_node(stable_node)) err = -EBUSY; - cond_resched(); } return err; } @@ -1452,7 +1451,6 @@ static struct page *stable_node_dup(struct ksm_stable_node **_stable_node_dup, hlist_for_each_entry_safe(dup, hlist_safe, &stable_node->hlist, hlist_dup) { - cond_resched(); /* * We must walk all stable_node_dup to prune the stale * stable nodes during lookup. @@ -1654,7 +1652,6 @@ static struct page *stable_tree_search(struct page *page) struct page *tree_page; int ret; - cond_resched(); stable_node = rb_entry(*new, struct ksm_stable_node, node); stable_node_any = NULL; tree_page = chain_prune(&stable_node_dup, &stable_node, root); @@ -1899,7 +1896,6 @@ static struct ksm_stable_node *stable_tree_insert(struct page *kpage) struct page *tree_page; int ret; - cond_resched(); stable_node = rb_entry(*new, struct ksm_stable_node, node); stable_node_any = NULL; tree_page = chain(&stable_node_dup, stable_node, root); @@ -2016,7 +2012,6 @@ struct ksm_rmap_item *unstable_tree_search_insert(struct ksm_rmap_item *rmap_ite struct page *tree_page; int ret; - cond_resched(); tree_rmap_item = rb_entry(*new, struct ksm_rmap_item, node); tree_page = get_mergeable_page(tree_rmap_item); if (!tree_page) @@ -2350,7 +2345,6 @@ static struct ksm_rmap_item *scan_get_next_rmap_item(struct page **page) GET_KSM_PAGE_NOLOCK); if (page) put_page(page); - cond_resched(); } } @@ -2396,7 +2390,6 @@ static struct ksm_rmap_item *scan_get_next_rmap_item(struct page **page) *page = follow_page(vma, ksm_scan.address, FOLL_GET); if (IS_ERR_OR_NULL(*page)) { ksm_scan.address += PAGE_SIZE; - cond_resched(); continue; } if (is_zone_device_page(*page)) @@ -2418,7 +2411,6 @@ static struct ksm_rmap_item *scan_get_next_rmap_item(struct page **page) next_page: put_page(*page); ksm_scan.address += PAGE_SIZE; - cond_resched(); } } @@ -2489,7 +2481,6 @@ static void ksm_do_scan(unsigned int scan_npages) unsigned int npages = scan_npages; while (npages-- && likely(!freezing(current))) { - cond_resched(); rmap_item = scan_get_next_rmap_item(&page); if (!rmap_item) return; @@ -2858,7 +2849,6 @@ void rmap_walk_ksm(struct folio *folio, struct rmap_walk_control *rwc) struct anon_vma_chain *vmac; struct vm_area_struct *vma; - cond_resched(); if (!anon_vma_trylock_read(anon_vma)) { if (rwc->try_lock) { rwc->contended = true; @@ -2870,7 +2860,6 @@ void rmap_walk_ksm(struct folio *folio, struct rmap_walk_control *rwc) 0, ULONG_MAX) { unsigned long addr; - cond_resched(); vma = vmac->vma; /* Ignore the stable/unstable/sqnr flags */ @@ -3046,14 +3035,12 @@ static void ksm_check_stable_tree(unsigned long start_pfn, node = rb_first(root_stable_tree + nid); else node = rb_next(node); - cond_resched(); } } list_for_each_entry_safe(stable_node, next, &migrate_nodes, list) { if (stable_node->kpfn >= start_pfn && stable_node->kpfn < end_pfn) remove_node_from_stable_tree(stable_node); - cond_resched(); } } diff --git a/mm/madvise.c b/mm/madvise.c index 4dded5d27e7e..3aa53f2e70e2 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -225,7 +225,6 @@ static int swapin_walk_pmd_entry(pmd_t *pmd, unsigned long start, if (ptep) pte_unmap_unlock(ptep, ptl); swap_read_unplug(splug); - cond_resched(); return 0; } @@ -531,7 +530,6 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, } if (pageout) reclaim_pages(&folio_list); - cond_resched(); return 0; } @@ -755,7 +753,6 @@ static int madvise_free_pte_range(pmd_t *pmd, unsigned long addr, arch_leave_lazy_mmu_mode(); pte_unmap_unlock(start_pte, ptl); } - cond_resched(); return 0; } diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 5b009b233ab8..4bccab7df97f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5650,7 +5650,6 @@ static int mem_cgroup_do_precharge(unsigned long count) if (ret) return ret; mc.precharge++; - cond_resched(); } return 0; } @@ -6035,7 +6034,6 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd, if (get_mctgt_type(vma, addr, ptep_get(pte), NULL)) mc.precharge++; /* increment precharge temporarily */ pte_unmap_unlock(pte - 1, ptl); - cond_resched(); return 0; } @@ -6303,7 +6301,6 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd, } } pte_unmap_unlock(pte - 1, ptl); - cond_resched(); if (addr != end) { /* @@ -6345,7 +6342,6 @@ static void mem_cgroup_move_charge(void) * feature anyway, so it wouldn't be a big problem. */ __mem_cgroup_clear_mc(); - cond_resched(); goto retry; } /* diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 4d6e43c88489..f291bb06c37c 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -804,7 +804,6 @@ static int hwpoison_pte_range(pmd_t *pmdp, unsigned long addr, } pte_unmap_unlock(mapped_pte, ptl); out: - cond_resched(); return ret; } diff --git a/mm/memory.c b/mm/memory.c index 517221f01303..faa36db93f80 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1104,7 +1104,6 @@ copy_pte_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma, pte_unmap_unlock(orig_src_pte, src_ptl); add_mm_rss_vec(dst_mm, rss); pte_unmap_unlock(orig_dst_pte, dst_ptl); - cond_resched(); if (ret == -EIO) { VM_WARN_ON_ONCE(!entry.val); @@ -1573,7 +1572,7 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb, addr = zap_pte_range(tlb, vma, pmd, addr, next, details); if (addr != next) pmd--; - } while (pmd++, cond_resched(), addr != end); + } while (pmd++, addr != end); return addr; } @@ -1601,7 +1600,6 @@ static inline unsigned long zap_pud_range(struct mmu_gather *tlb, continue; next = zap_pmd_range(tlb, vma, pud, addr, next, details); next: - cond_resched(); } while (pud++, addr = next, addr != end); return addr; @@ -5926,7 +5924,6 @@ static inline int process_huge_page( l = n; /* Process subpages at the end of huge page */ for (i = pages_per_huge_page - 1; i >= 2 * n; i--) { - cond_resched(); ret = process_subpage(addr + i * PAGE_SIZE, i, arg); if (ret) return ret; @@ -5937,7 +5934,6 @@ static inline int process_huge_page( l = pages_per_huge_page - n; /* Process subpages at the begin of huge page */ for (i = 0; i < base; i++) { - cond_resched(); ret = process_subpage(addr + i * PAGE_SIZE, i, arg); if (ret) return ret; @@ -5951,11 +5947,9 @@ static inline int process_huge_page( int left_idx = base + i; int right_idx = base + 2 * l - 1 - i; - cond_resched(); ret = process_subpage(addr + left_idx * PAGE_SIZE, left_idx, arg); if (ret) return ret; - cond_resched(); ret = process_subpage(addr + right_idx * PAGE_SIZE, right_idx, arg); if (ret) return ret; @@ -5973,7 +5967,6 @@ static void clear_gigantic_page(struct page *page, might_sleep(); for (i = 0; i < pages_per_huge_page; i++) { p = nth_page(page, i); - cond_resched(); clear_user_highpage(p, addr + i * PAGE_SIZE); } } @@ -6013,7 +6006,6 @@ static int copy_user_gigantic_page(struct folio *dst, struct folio *src, dst_page = folio_page(dst, i); src_page = folio_page(src, i); - cond_resched(); if (copy_mc_user_highpage(dst_page, src_page, addr + i*PAGE_SIZE, vma)) { memory_failure_queue(page_to_pfn(src_page), 0); @@ -6085,8 +6077,6 @@ long copy_folio_from_user(struct folio *dst_folio, break; flush_dcache_page(subpage); - - cond_resched(); } return ret_val; } diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1b03f4ec6fd2..2a621f00db1a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -402,7 +402,6 @@ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, params->pgmap); if (err) break; - cond_resched(); } vmemmap_populate_print_last(); return err; @@ -532,8 +531,6 @@ void __ref remove_pfn_range_from_zone(struct zone *zone, /* Poison struct pages because they are now uninitialized again. */ for (pfn = start_pfn; pfn < end_pfn; pfn += cur_nr_pages) { - cond_resched(); - /* Select all remaining pages up to the next section boundary */ cur_nr_pages = min(end_pfn - pfn, SECTION_ALIGN_UP(pfn + 1) - pfn); @@ -580,7 +577,6 @@ void __remove_pages(unsigned long pfn, unsigned long nr_pages, } for (; pfn < end_pfn; pfn += cur_nr_pages) { - cond_resched(); /* Select all remaining pages up to the next section boundary */ cur_nr_pages = min(end_pfn - pfn, SECTION_ALIGN_UP(pfn + 1) - pfn); @@ -1957,8 +1953,6 @@ int __ref offline_pages(unsigned long start_pfn, unsigned long nr_pages, goto failed_removal_isolated; } - cond_resched(); - ret = scan_movable_pages(pfn, end_pfn, &pfn); if (!ret) { /* diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 29ebf1e7898c..fa201f89568e 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -554,7 +554,6 @@ static int queue_folios_pte_range(pmd_t *pmd, unsigned long addr, break; } pte_unmap_unlock(mapped_pte, ptl); - cond_resched(); return addr != end ? -EIO : 0; } diff --git a/mm/migrate.c b/mm/migrate.c index 06086dc9da28..6b0d0d4f07d8 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1528,8 +1528,6 @@ static int migrate_hugetlbs(struct list_head *from, new_folio_t get_new_folio, nr_pages = folio_nr_pages(folio); - cond_resched(); - /* * Migratability of hugepages depends on architectures and * their size. This check is necessary because some callers @@ -1633,8 +1631,6 @@ static int migrate_pages_batch(struct list_head *from, is_thp = folio_test_large(folio) && folio_test_pmd_mappable(folio); nr_pages = folio_nr_pages(folio); - cond_resched(); - /* * Large folio migration might be unsupported or * the allocation might be failed so we should retry @@ -1754,8 +1750,6 @@ static int migrate_pages_batch(struct list_head *from, is_thp = folio_test_large(folio) && folio_test_pmd_mappable(folio); nr_pages = folio_nr_pages(folio); - cond_resched(); - rc = migrate_folio_move(put_new_folio, private, folio, dst, mode, reason, ret_folios); diff --git a/mm/mincore.c b/mm/mincore.c index dad3622cc963..46a1716621d1 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -151,7 +151,6 @@ static int mincore_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, pte_unmap_unlock(ptep - 1, ptl); out: walk->private += nr; - cond_resched(); return 0; } diff --git a/mm/mlock.c b/mm/mlock.c index 06bdfab83b58..746ca30145b5 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -351,7 +351,6 @@ static int mlock_pte_range(pmd_t *pmd, unsigned long addr, pte_unmap(start_pte); out: spin_unlock(ptl); - cond_resched(); return 0; } @@ -696,7 +695,6 @@ static int apply_mlockall_flags(int flags) /* Ignore errors */ mlock_fixup(&vmi, vma, &prev, vma->vm_start, vma->vm_end, newflags); - cond_resched(); } out: return 0; diff --git a/mm/mm_init.c b/mm/mm_init.c index 50f2f34745af..88d27009800e 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -892,10 +892,8 @@ void __meminit memmap_init_range(unsigned long size, int nid, unsigned long zone * such that unmovable allocations won't be scattered all * over the place during system boot. */ - if (pageblock_aligned(pfn)) { + if (pageblock_aligned(pfn)) set_pageblock_migratetype(page, migratetype); - cond_resched(); - } pfn++; } } @@ -996,10 +994,8 @@ static void __ref __init_zone_device_page(struct page *page, unsigned long pfn, * Please note that MEMINIT_HOTPLUG path doesn't clear memmap * because this is done early in section_activate() */ - if (pageblock_aligned(pfn)) { + if (pageblock_aligned(pfn)) set_pageblock_migratetype(page, MIGRATE_MOVABLE); - cond_resched(); - } /* * ZONE_DEVICE pages are released directly to the driver page allocator @@ -2163,10 +2159,8 @@ deferred_init_memmap_chunk(unsigned long start_pfn, unsigned long end_pfn, * Initialize and free pages in MAX_ORDER sized increments so that we * can avoid introducing any issues with the buddy allocator. */ - while (spfn < end_pfn) { + while (spfn < end_pfn) deferred_init_maxorder(&i, zone, &spfn, &epfn); - cond_resched(); - } } /* An arch may override for more concurrency. */ @@ -2365,7 +2359,6 @@ void set_zone_contiguous(struct zone *zone) if (!__pageblock_pfn_to_page(block_start_pfn, block_end_pfn, zone)) return; - cond_resched(); } /* We confirm that there is no hole */ diff --git a/mm/mmap.c b/mm/mmap.c index 9e018d8dd7d6..436c255f4f45 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3253,7 +3253,6 @@ void exit_mmap(struct mm_struct *mm) nr_accounted += vma_pages(vma); remove_vma(vma, true); count++; - cond_resched(); } while ((vma = mas_find(&mas, ULONG_MAX)) != NULL); BUG_ON(count != mm->map_count); diff --git a/mm/mmu_gather.c b/mm/mmu_gather.c index 4f559f4ddd21..dbf660a14469 100644 --- a/mm/mmu_gather.c +++ b/mm/mmu_gather.c @@ -98,8 +98,6 @@ static void tlb_batch_pages_flush(struct mmu_gather *tlb) free_pages_and_swap_cache(pages, nr); pages += nr; batch->nr -= nr; - - cond_resched(); } while (batch->nr); } tlb->active = &tlb->local; diff --git a/mm/mprotect.c b/mm/mprotect.c index b94fbb45d5c7..45af8b1aac59 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -423,7 +423,6 @@ static inline long change_pmd_range(struct mmu_gather *tlb, goto again; pages += ret; next: - cond_resched(); } while (pmd++, addr = next, addr != end); if (range.start) diff --git a/mm/mremap.c b/mm/mremap.c index 382e81c33fc4..26f06349558e 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -514,7 +514,6 @@ unsigned long move_page_tables(struct vm_area_struct *vma, mmu_notifier_invalidate_range_start(&range); for (; old_addr < old_end; old_addr += extent, new_addr += extent) { - cond_resched(); /* * If extent is PUD-sized try to speed up the move by moving at the * PUD level if possible. diff --git a/mm/nommu.c b/mm/nommu.c index 7f9e9e5a0e12..54cb28e9919d 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1525,7 +1525,6 @@ void exit_mmap(struct mm_struct *mm) for_each_vma(vmi, vma) { cleanup_vma_from_mm(vma); delete_vma(mm, vma); - cond_resched(); } __mt_destroy(&mm->mm_mt); mmap_write_unlock(mm); diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 61a190b9d83c..582cb5a72467 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2510,7 +2510,6 @@ int write_cache_pages(struct address_space *mapping, } } folio_batch_release(&fbatch); - cond_resched(); } /* diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 85741403948f..c7e7a236de3d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3418,8 +3418,6 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, */ count_vm_event(COMPACTFAIL); - cond_resched(); - return NULL; } @@ -3617,8 +3615,6 @@ __perform_reclaim(gfp_t gfp_mask, unsigned int order, unsigned int noreclaim_flag; unsigned long progress; - cond_resched(); - /* We now go into synchronous reclaim */ cpuset_memory_pressure_bump(); fs_reclaim_acquire(gfp_mask); @@ -3630,8 +3626,6 @@ __perform_reclaim(gfp_t gfp_mask, unsigned int order, memalloc_noreclaim_restore(noreclaim_flag); fs_reclaim_release(gfp_mask); - cond_resched(); - return progress; } @@ -3852,13 +3846,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, * Memory allocation/reclaim might be called from a WQ context and the * current implementation of the WQ concurrency control doesn't * recognize that a particular WQ is congested if the worker thread is - * looping without ever sleeping. Therefore we have to do a short sleep - * here rather than calling cond_resched(). + * looping without ever sleeping. Therefore do a short sleep here. */ if (current->flags & PF_WQ_WORKER) schedule_timeout_uninterruptible(1); - else - cond_resched(); + return ret; } @@ -4162,7 +4154,6 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, if (page) goto got_pg; - cond_resched(); goto retry; } fail: diff --git a/mm/page_counter.c b/mm/page_counter.c index db20d6452b71..c15befd5b02a 100644 --- a/mm/page_counter.c +++ b/mm/page_counter.c @@ -196,7 +196,6 @@ int page_counter_set_max(struct page_counter *counter, unsigned long nr_pages) return 0; counter->max = old; - cond_resched(); } } diff --git a/mm/page_ext.c b/mm/page_ext.c index 4548fcc66d74..855271588c8c 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c @@ -472,7 +472,6 @@ void __init page_ext_init(void) continue; if (init_section_page_ext(pfn, nid)) goto oom; - cond_resched(); } } hotplug_memory_notifier(page_ext_callback, DEFAULT_CALLBACK_PRI); diff --git a/mm/page_idle.c b/mm/page_idle.c index 41ea77f22011..694eb1b14a66 100644 --- a/mm/page_idle.c +++ b/mm/page_idle.c @@ -151,7 +151,6 @@ static ssize_t page_idle_bitmap_read(struct file *file, struct kobject *kobj, } if (bit == BITMAP_CHUNK_BITS - 1) out++; - cond_resched(); } return (char *)out - buf; } @@ -188,7 +187,6 @@ static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, } if (bit == BITMAP_CHUNK_BITS - 1) in++; - cond_resched(); } return (char *)in - buf; } diff --git a/mm/page_io.c b/mm/page_io.c index fe4c21af23f2..02bbc8165400 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -106,8 +106,6 @@ int generic_swapfile_activate(struct swap_info_struct *sis, unsigned block_in_page; sector_t first_block; - cond_resched(); - first_block = probe_block; ret = bmap(inode, &first_block); if (ret || !first_block) diff --git a/mm/page_owner.c b/mm/page_owner.c index 4e2723e1b300..72278db2f01c 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -680,7 +680,6 @@ static void init_pages_in_zone(pg_data_t *pgdat, struct zone *zone) ext_put_continue: page_ext_put(page_ext); } - cond_resched(); } pr_info("Node %d, zone %8s: page owner found early allocated %lu pages\n", diff --git a/mm/percpu.c b/mm/percpu.c index a7665de8485f..538b63f399ae 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -2015,7 +2015,6 @@ static void pcpu_balance_free(bool empty_only) spin_unlock_irq(&pcpu_lock); } pcpu_destroy_chunk(chunk); - cond_resched(); } spin_lock_irq(&pcpu_lock); } @@ -2083,7 +2082,6 @@ static void pcpu_balance_populated(void) spin_unlock_irq(&pcpu_lock); ret = pcpu_populate_chunk(chunk, rs, rs + nr, gfp); - cond_resched(); spin_lock_irq(&pcpu_lock); if (!ret) { nr_to_pop -= nr; @@ -2101,7 +2099,6 @@ static void pcpu_balance_populated(void) /* ran out of chunks to populate, create a new one and retry */ spin_unlock_irq(&pcpu_lock); chunk = pcpu_create_chunk(gfp); - cond_resched(); spin_lock_irq(&pcpu_lock); if (chunk) { pcpu_chunk_relocate(chunk, -1); @@ -2186,7 +2183,6 @@ static void pcpu_reclaim_populated(void) spin_unlock_irq(&pcpu_lock); pcpu_depopulate_chunk(chunk, i + 1, end + 1); - cond_resched(); spin_lock_irq(&pcpu_lock); pcpu_chunk_depopulated(chunk, i + 1, end + 1); @@ -2203,7 +2199,6 @@ static void pcpu_reclaim_populated(void) pcpu_post_unmap_tlb_flush(chunk, freed_page_start, freed_page_end); - cond_resched(); spin_lock_irq(&pcpu_lock); } diff --git a/mm/rmap.c b/mm/rmap.c index 9f795b93cf40..c7aec4516309 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2434,7 +2434,6 @@ static void rmap_walk_anon(struct folio *folio, unsigned long address = vma_address(&folio->page, vma); VM_BUG_ON_VMA(address == -EFAULT, vma); - cond_resched(); if (rwc->invalid_vma && rwc->invalid_vma(vma, rwc->arg)) continue; @@ -2495,7 +2494,6 @@ static void rmap_walk_file(struct folio *folio, unsigned long address = vma_address(&folio->page, vma); VM_BUG_ON_VMA(address == -EFAULT, vma); - cond_resched(); if (rwc->invalid_vma && rwc->invalid_vma(vma, rwc->arg)) continue; diff --git a/mm/shmem.c b/mm/shmem.c index 112172031b2c..0280fe449ad8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -939,7 +939,6 @@ void shmem_unlock_mapping(struct address_space *mapping) filemap_get_folios(mapping, &index, ~0UL, &fbatch)) { check_move_unevictable_folios(&fbatch); folio_batch_release(&fbatch); - cond_resched(); } } @@ -1017,7 +1016,6 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, } folio_batch_remove_exceptionals(&fbatch); folio_batch_release(&fbatch); - cond_resched(); } /* @@ -1058,8 +1056,6 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend, index = start; while (index < end) { - cond_resched(); - if (!find_get_entries(mapping, &index, end - 1, &fbatch, indices)) { /* If all gone or hole-punch or unfalloc, we're done */ @@ -1394,7 +1390,6 @@ int shmem_unuse(unsigned int type) mutex_unlock(&shmem_swaplist_mutex); error = shmem_unuse_inode(&info->vfs_inode, type); - cond_resched(); mutex_lock(&shmem_swaplist_mutex); next = list_next_entry(info, swaplist); @@ -2832,7 +2827,6 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to) error = -EFAULT; break; } - cond_resched(); } *ppos = ((loff_t) index << PAGE_SHIFT) + offset; @@ -2986,8 +2980,6 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos, in->f_ra.prev_pos = *ppos; if (pipe_full(pipe->head, pipe->tail, pipe->max_usage)) break; - - cond_resched(); } while (len); if (folio) @@ -3155,7 +3147,6 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset, folio_mark_dirty(folio); folio_unlock(folio); folio_put(folio); - cond_resched(); } if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) diff --git a/mm/shuffle.c b/mm/shuffle.c index fb1393b8b3a9..f78f201c773b 100644 --- a/mm/shuffle.c +++ b/mm/shuffle.c @@ -136,10 +136,12 @@ void __meminit __shuffle_zone(struct zone *z) pr_debug("%s: swap: %#lx -> %#lx\n", __func__, i, j); - /* take it easy on the zone lock */ + /* + * Drop the zone lock occasionally to allow the scheduler to + * preempt us if needed. + */ if ((i % (100 * order_pages)) == 0) { spin_unlock_irqrestore(&z->lock, flags); - cond_resched(); spin_lock_irqsave(&z->lock, flags); } } diff --git a/mm/slab.c b/mm/slab.c index 9ad3d0f2d1a5..7681d2cb5e64 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -2196,8 +2196,6 @@ static int drain_freelist(struct kmem_cache *cache, raw_spin_unlock_irq(&n->list_lock); slab_destroy(cache, slab); nr_freed++; - - cond_resched(); } out: return nr_freed; @@ -3853,7 +3851,6 @@ static void cache_reap(struct work_struct *w) STATS_ADD_REAPED(searchp, freed); } next: - cond_resched(); } check_irq_on(); mutex_unlock(&slab_mutex); diff --git a/mm/swap_cgroup.c b/mm/swap_cgroup.c index db6c4a26cf59..20d2aefbefd6 100644 --- a/mm/swap_cgroup.c +++ b/mm/swap_cgroup.c @@ -50,8 +50,6 @@ static int swap_cgroup_prepare(int type) goto not_enough_page; ctrl->map[idx] = page; - if (!(idx % SWAP_CLUSTER_MAX)) - cond_resched(); } return 0; not_enough_page: @@ -223,8 +221,6 @@ void swap_cgroup_swapoff(int type) struct page *page = map[i]; if (page) __free_page(page); - if (!(i % SWAP_CLUSTER_MAX)) - cond_resched(); } vfree(map); } diff --git a/mm/swapfile.c b/mm/swapfile.c index e52f486834eb..27db3dcec1a2 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -190,7 +190,6 @@ static int discard_swap(struct swap_info_struct *si) nr_blocks, GFP_KERNEL); if (err) return err; - cond_resched(); } for (se = next_se(se); se; se = next_se(se)) { @@ -201,8 +200,6 @@ static int discard_swap(struct swap_info_struct *si) nr_blocks, GFP_KERNEL); if (err) break; - - cond_resched(); } return err; /* That will often be -EOPNOTSUPP */ } @@ -864,7 +861,6 @@ static int scan_swap_map_slots(struct swap_info_struct *si, goto checks; } if (unlikely(--latency_ration < 0)) { - cond_resched(); latency_ration = LATENCY_LIMIT; } } @@ -931,7 +927,6 @@ static int scan_swap_map_slots(struct swap_info_struct *si, if (n_ret) goto done; spin_unlock(&si->lock); - cond_resched(); spin_lock(&si->lock); latency_ration = LATENCY_LIMIT; } @@ -974,7 +969,6 @@ static int scan_swap_map_slots(struct swap_info_struct *si, spin_unlock(&si->lock); while (++offset <= READ_ONCE(si->highest_bit)) { if (unlikely(--latency_ration < 0)) { - cond_resched(); latency_ration = LATENCY_LIMIT; scanned_many = true; } @@ -984,7 +978,6 @@ static int scan_swap_map_slots(struct swap_info_struct *si, offset = si->lowest_bit; while (offset < scan_base) { if (unlikely(--latency_ration < 0)) { - cond_resched(); latency_ration = LATENCY_LIMIT; scanned_many = true; } @@ -1099,7 +1092,6 @@ int get_swap_pages(int n_goal, swp_entry_t swp_entries[], int entry_size) spin_unlock(&si->lock); if (n_ret || size == SWAPFILE_CLUSTER) goto check_out; - cond_resched(); spin_lock(&swap_avail_lock); nextsi: @@ -1914,7 +1906,6 @@ static inline int unuse_pmd_range(struct vm_area_struct *vma, pud_t *pud, pmd = pmd_offset(pud, addr); do { - cond_resched(); next = pmd_addr_end(addr, end); ret = unuse_pte_range(vma, pmd, addr, next, type); if (ret) @@ -1997,8 +1988,6 @@ static int unuse_mm(struct mm_struct *mm, unsigned int type) if (ret) break; } - - cond_resched(); } mmap_read_unlock(mm); return ret; @@ -2025,8 +2014,6 @@ static unsigned int find_next_to_unuse(struct swap_info_struct *si, count = READ_ONCE(si->swap_map[i]); if (count && swap_count(count) != SWAP_MAP_BAD) break; - if ((i % LATENCY_LIMIT) == 0) - cond_resched(); } if (i == si->max) @@ -2079,7 +2066,6 @@ static int try_to_unuse(unsigned int type) * Make sure that we aren't completely killing * interactive performance. */ - cond_resched(); spin_lock(&mmlist_lock); } spin_unlock(&mmlist_lock); diff --git a/mm/truncate.c b/mm/truncate.c index 8e3aa9e8618e..9efcec90f24d 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -369,7 +369,6 @@ void truncate_inode_pages_range(struct address_space *mapping, for (i = 0; i < folio_batch_count(&fbatch); i++) folio_unlock(fbatch.folios[i]); folio_batch_release(&fbatch); - cond_resched(); } same_folio = (lstart >> PAGE_SHIFT) == (lend >> PAGE_SHIFT); @@ -399,7 +398,6 @@ void truncate_inode_pages_range(struct address_space *mapping, index = start; while (index < end) { - cond_resched(); if (!find_get_entries(mapping, &index, end - 1, &fbatch, indices)) { /* If all gone from start onwards, we're done */ @@ -533,7 +531,6 @@ unsigned long mapping_try_invalidate(struct address_space *mapping, } folio_batch_remove_exceptionals(&fbatch); folio_batch_release(&fbatch); - cond_resched(); } return count; } @@ -677,7 +674,6 @@ int invalidate_inode_pages2_range(struct address_space *mapping, } folio_batch_remove_exceptionals(&fbatch); folio_batch_release(&fbatch); - cond_resched(); } /* * For DAX we invalidate page tables after invalidating page cache. We diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 96d9eae5c7cc..89127f6b8bd7 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c @@ -459,8 +459,6 @@ static __always_inline ssize_t mfill_atomic_hugetlb( hugetlb_vma_unlock_read(dst_vma); mutex_unlock(&hugetlb_fault_mutex_table[hash]); - cond_resched(); - if (unlikely(err == -ENOENT)) { mmap_read_unlock(dst_mm); BUG_ON(!folio); @@ -677,7 +675,6 @@ static __always_inline ssize_t mfill_atomic(struct mm_struct *dst_mm, err = mfill_atomic_pte(dst_pmd, dst_vma, dst_addr, src_addr, flags, &folio); - cond_resched(); if (unlikely(err == -ENOENT)) { void *kaddr; diff --git a/mm/util.c b/mm/util.c index 8cbbfd3a3d59..3bc08be921fa 100644 --- a/mm/util.c +++ b/mm/util.c @@ -796,7 +796,6 @@ void folio_copy(struct folio *dst, struct folio *src) copy_highpage(folio_page(dst, i), folio_page(src, i)); if (++i == nr) break; - cond_resched(); } } diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a3fedb3ee0db..7d2b76cde1a7 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -351,8 +351,6 @@ static void vunmap_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, if (pmd_none_or_clear_bad(pmd)) continue; vunmap_pte_range(pmd, addr, next, mask); - - cond_resched(); } while (pmd++, addr = next, addr != end); } @@ -2840,7 +2838,6 @@ void vfree(const void *addr) * can be freed as an array of order-0 allocations */ __free_page(page); - cond_resched(); } atomic_long_sub(vm->nr_pages, &nr_vmalloc_pages); kvfree(vm->pages); @@ -3035,7 +3032,6 @@ vm_area_alloc_pages(gfp_t gfp, int nid, pages + nr_allocated); nr_allocated += nr; - cond_resched(); /* * If zero or pages were obtained partly, @@ -3091,7 +3087,6 @@ vm_area_alloc_pages(gfp_t gfp, int nid, for (i = 0; i < (1U << order); i++) pages[nr_allocated + i] = page + i; - cond_resched(); nr_allocated += 1U << order; } diff --git a/mm/vmscan.c b/mm/vmscan.c index 6f13394b112e..e12f9fd27002 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -905,8 +905,6 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl, count_vm_events(SLABS_SCANNED, shrinkctl->nr_scanned); total_scan -= shrinkctl->nr_scanned; scanned += shrinkctl->nr_scanned; - - cond_resched(); } /* @@ -1074,7 +1072,6 @@ static unsigned long shrink_slab(gfp_t gfp_mask, int nid, up_read(&shrinker_rwsem); out: - cond_resched(); return freed; } @@ -1204,7 +1201,6 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason) */ if (!current_is_kswapd() && current->flags & (PF_USER_WORKER|PF_KTHREAD)) { - cond_resched(); return; } @@ -1232,7 +1228,6 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason) fallthrough; case VMSCAN_THROTTLE_NOPROGRESS: if (skip_throttle_noprogress(pgdat)) { - cond_resched(); return; } @@ -1715,7 +1710,6 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, struct swap_iocb *plug = NULL; memset(stat, 0, sizeof(*stat)); - cond_resched(); do_demote_pass = can_demote(pgdat->node_id, sc); retry: @@ -1726,8 +1720,6 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, bool dirty, writeback; unsigned int nr_pages; - cond_resched(); - folio = lru_to_folio(folio_list); list_del(&folio->lru); @@ -2719,7 +2711,6 @@ static void shrink_active_list(unsigned long nr_to_scan, while (!list_empty(&l_hold)) { struct folio *folio; - cond_resched(); folio = lru_to_folio(&l_hold); list_del(&folio->lru); @@ -4319,8 +4310,6 @@ static void walk_mm(struct lruvec *lruvec, struct mm_struct *mm, struct lru_gen_ reset_batch_size(lruvec, walk); spin_unlock_irq(&lruvec->lru_lock); } - - cond_resched(); } while (err == -EAGAIN); } @@ -4455,7 +4444,6 @@ static void inc_max_seq(struct lruvec *lruvec, bool can_swap, bool force_scan) continue; spin_unlock_irq(&lruvec->lru_lock); - cond_resched(); goto restart; } @@ -4616,8 +4604,6 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc) mem_cgroup_iter_break(NULL, memcg); return; } - - cond_resched(); } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL))); /* @@ -5378,8 +5364,6 @@ static bool try_to_shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) if (sc->nr_reclaimed >= nr_to_reclaim) break; - - cond_resched(); } /* whether try_to_inc_max_seq() was successful */ @@ -5718,14 +5702,11 @@ static void lru_gen_change_state(bool enabled) while (!(enabled ? fill_evictable(lruvec) : drain_evictable(lruvec))) { spin_unlock_irq(&lruvec->lru_lock); - cond_resched(); spin_lock_irq(&lruvec->lru_lock); } spin_unlock_irq(&lruvec->lru_lock); } - - cond_resched(); } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL))); unlock: mutex_unlock(&state_mutex); @@ -6026,8 +6007,6 @@ static int run_eviction(struct lruvec *lruvec, unsigned long seq, struct scan_co if (!evict_folios(lruvec, sc, swappiness)) return 0; - - cond_resched(); } return -EINTR; @@ -6321,8 +6300,6 @@ static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) } } - cond_resched(); - if (nr_reclaimed < nr_to_reclaim || proportional_reclaim) continue; @@ -6473,10 +6450,9 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc) * This loop can become CPU-bound when target memcgs * aren't eligible for reclaim - either because they * don't have any reclaimable pages, or because their - * memory is explicitly protected. Avoid soft lockups. + * memory is explicitly protected. We don't disable + * preemption, so expect to be preempted. */ - cond_resched(); - mem_cgroup_calculate_protection(target_memcg, memcg); if (mem_cgroup_below_min(target_memcg, memcg)) { @@ -8024,7 +8000,6 @@ static int __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned in trace_mm_vmscan_node_reclaim_begin(pgdat->node_id, order, sc.gfp_mask); - cond_resched(); psi_memstall_enter(&pflags); fs_reclaim_acquire(sc.gfp_mask); /* diff --git a/mm/vmstat.c b/mm/vmstat.c index 00e81e99c6ee..de61cc004865 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -835,7 +835,6 @@ static int refresh_cpu_vm_stats(bool do_pagesets) #ifdef CONFIG_NUMA if (do_pagesets) { - cond_resched(); /* * Deal with draining the remote pageset of this * processor @@ -1525,7 +1524,6 @@ static void pagetypeinfo_showfree_print(struct seq_file *m, } seq_printf(m, "%s%6lu ", overflow ? ">" : "", freecount); spin_unlock_irq(&zone->lock); - cond_resched(); spin_lock_irq(&zone->lock); } seq_putc(m, '\n'); @@ -2041,8 +2039,6 @@ static void vmstat_shepherd(struct work_struct *w) if (!delayed_work_pending(dw) && need_update(cpu)) queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0); - - cond_resched(); } cpus_read_unlock(); diff --git a/mm/workingset.c b/mm/workingset.c index da58a26d0d4d..ba94e5fb8390 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -750,7 +750,6 @@ static enum lru_status shadow_lru_isolate(struct list_head *item, } ret = LRU_REMOVED_RETRY; out: - cond_resched(); spin_lock_irq(lru_lock); return ret; } diff --git a/mm/z3fold.c b/mm/z3fold.c index 7c76b396b74c..2614236c2212 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -175,7 +175,7 @@ enum z3fold_handle_flags { /* * Forward declarations */ -static struct z3fold_header *__z3fold_alloc(struct z3fold_pool *, size_t, bool); +static struct z3fold_header *__z3fold_alloc(struct z3fold_pool *, size_t); static void compact_page_work(struct work_struct *w); /***************** @@ -504,7 +504,6 @@ static void free_pages_work(struct work_struct *w) spin_unlock(&pool->stale_lock); cancel_work_sync(&zhdr->work); free_z3fold_page(page, false); - cond_resched(); spin_lock(&pool->stale_lock); } spin_unlock(&pool->stale_lock); @@ -629,7 +628,7 @@ static struct z3fold_header *compact_single_buddy(struct z3fold_header *zhdr) short chunks = size_to_chunks(sz); void *q; - new_zhdr = __z3fold_alloc(pool, sz, false); + new_zhdr = __z3fold_alloc(pool, sz); if (!new_zhdr) return NULL; @@ -783,7 +782,7 @@ static void compact_page_work(struct work_struct *w) /* returns _locked_ z3fold page header or NULL */ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, - size_t size, bool can_sleep) + size_t size) { struct z3fold_header *zhdr = NULL; struct page *page; @@ -811,8 +810,6 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, spin_unlock(&pool->lock); zhdr = NULL; migrate_enable(); - if (can_sleep) - cond_resched(); goto lookup; } list_del_init(&zhdr->buddy); @@ -825,8 +822,6 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, z3fold_page_unlock(zhdr); zhdr = NULL; migrate_enable(); - if (can_sleep) - cond_resched(); goto lookup; } @@ -869,8 +864,6 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool, test_bit(PAGE_CLAIMED, &page->private)) { z3fold_page_unlock(zhdr); zhdr = NULL; - if (can_sleep) - cond_resched(); continue; } kref_get(&zhdr->refcount); @@ -1016,7 +1009,7 @@ static int z3fold_alloc(struct z3fold_pool *pool, size_t size, gfp_t gfp, bud = HEADLESS; else { retry: - zhdr = __z3fold_alloc(pool, size, can_sleep); + zhdr = __z3fold_alloc(pool, size); if (zhdr) { bud = get_free_buddy(zhdr, chunks); if (bud == HEADLESS) { diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index b58f957429f0..e6fe6522c845 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -2029,7 +2029,6 @@ static unsigned long __zs_compact(struct zs_pool *pool, dst_zspage = NULL; spin_unlock(&pool->lock); - cond_resched(); spin_lock(&pool->lock); } } diff --git a/mm/zswap.c b/mm/zswap.c index 37d2b1cb2ecb..ad6d67ebbf70 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -704,7 +704,6 @@ static void shrink_worker(struct work_struct *w) if (++failures == MAX_RECLAIM_RETRIES) break; } - cond_resched(); } while (!zswap_can_accept()); zswap_pool_put(pool); } From patchwork Tue Nov 7 23:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53262C4167B for ; Tue, 7 Nov 2023 23:09:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D41A6440187; Tue, 7 Nov 2023 18:09:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CC969440186; Tue, 7 Nov 2023 18:09:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A332B440187; Tue, 7 Nov 2023 18:09:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8877F440186 for ; Tue, 7 Nov 2023 18:09:33 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 502E7B4F37 for ; Tue, 7 Nov 2023 23:09:33 +0000 (UTC) X-FDA: 81432701826.08.5FC3283 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf04.hostedemail.com (Postfix) with ESMTP id 113C44001C for ; Tue, 7 Nov 2023 23:09:29 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=EhwtlKrL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=v1L7Z2Rg; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398570; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2jD7WozsO3sS0iyfqYqPRu/00V2ZOC6HVnfrprImW20=; b=GV0OYEbBXFRgMN4M5s4vozbGN74/HCqZAMKpxBc1r/3H3HHlsjHbOUGyPNR9xgucQx4BOv syw6TG/oxNiOyjXO3ffJXSoET/oz1L1sbFZpz2ZuExMrsjhek/SodWHnQ0rCgrA0rK07nb TN4PLLLFDguQgvH9qbMTVZsQo2/Jl2k= ARC-Authentication-Results: i=2; imf04.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=EhwtlKrL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=v1L7Z2Rg; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf04.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398570; a=rsa-sha256; cv=pass; b=0hQwGOp2KwpLE463UHjfo8I49lGtb4J0FdSdvFJHQMughHp9h5G+JAoZXfg90rMIqzh57i 4Z0GSkcJFh9vp7k3raeqgBYybix0gt+dORW0OYgw3MLk8gxah8y4Q89FV6vQfJWynaCDIo lE9VzlSaxwCq97ie5aWOJL86HZIGgqE= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJlMc022696; Tue, 7 Nov 2023 23:09:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=2jD7WozsO3sS0iyfqYqPRu/00V2ZOC6HVnfrprImW20=; b=EhwtlKrLrvd6cEVBar6TXc5IuLxYWIuN+x2cBO2h+r8Wu7owtWz7dHDm//PSwE31y2Up XDi7Ajq9aYVAWGv6iJ/dm+V9rGN77YLGKXvqhah/ivzncbsVvxQQFolwh4pBM8o0AGii gf5WS8R7C53tW1lZ2ceMXNNm23KMrkwaN4BDi0M4jUx4qRQFtUQ0IYF6oG3IBCoDEoki 0gDU6QQLN2UTxGc61PbPZA7uWa3/UpzyOokCAGKTzHiVDVLu1I/XVwjxv7Bxk9MU/O0n gjbw87d9UY8qK5lv0kDO566AVuElq6OenxbXStLu+47l5iHVa6DlnvaBuDkPZ2cww7VC TQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2006f4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:09 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N31DE000659; Tue, 7 Nov 2023 23:09:08 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wvdcg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KhxaafEh1PxEsEmewSzicAsbTGYBbS+qTrbhCbG/9jJ7RrCdsT/rSq3qb6XzTvBWG5jDUE6EiDvFFHBaEv6dh/OvJRLQ+XTAemPniidqSHbNxCTOe+QJ553ZkCuw7WhwnRBk0Q29BgqfdF4ZL81tFGvrTgupmCyyPEUdZOIjvW5j13huHY7ntLa1mQu+4gMCxN8UDwx0tUR/ZpHfyQ6pt97aocSctpKHBEPi6EwmjHDlbt2sTBtuq8sA2zCgP+on4ieX3Afyu0lv/zuVz+yVZWSphMQqR8iq7YBzqC+bsziGBOY+ZpHZqYUmZqPWFje0wj/HEiTckT0WV/2xZvlm9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2jD7WozsO3sS0iyfqYqPRu/00V2ZOC6HVnfrprImW20=; b=guFr1ZxJsjNTzH2F8PPl2IrSJHHVztZsWCytv/OMyw3h4NGAMJalEN43ulsjfMuwv2vWMr4PwNAsmh/XNnC1mnBaQnnhb1CWbMDMxR6VZfZUNUNfNqLAv5PViMEOQkyiF2sy5FfM9f+sF/g5Xfj8gJ0aNOgEMF6c92ixeRhESH77D+aRE7+5IcKgIbimXfvoDjXuzOhPkcRAiBv50ZD4+XL/EzNIPJY6rnjCDO99o3jwMnPOVMa65IDqQu3jM+1PIneOGMD9sGH0lBcqdI9vIywMDvMwjgYCyo+WFVF8IpGtLVEd8MpVZA0nnNPXNZsA+MtwpE+FgOyLK+6RG7W4Qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2jD7WozsO3sS0iyfqYqPRu/00V2ZOC6HVnfrprImW20=; b=v1L7Z2RgmWsKziVrnAm6MU0E93ZHJvV3mOQYd75DwXWKDLmX1gqWExTiSMOlfP0NE/qRK9X1J/fZtKY/jUo1uiDu5nkksTvC5YTp4ZoPtZ1TbKECL57/VhojSRIEBa/Yo9aQUVYWo3lLgxQbltD7iYryXQE2llJQ1aod67CH8a4= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:05 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:05 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Jens Axboe , Pavel Begunkov Subject: [RFC PATCH 69/86] treewide: io_uring: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:05 -0800 Message-Id: <20231107230822.371443-13-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR11CA0038.namprd11.prod.outlook.com (2603:10b6:a03:80::15) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 037a34cc-5da8-46f7-22ef-08dbdfe689e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6HAp59nF5hzeS0imqUZMsnhLBbyHRKlOz/Fm8KHZfM89LujnA66rZb2grngam+KCaaTGNkXs3goCMupTPfJbbT0A0MEvS3GtWn3dGq3yU0KqBCBvyze0Np0Dod/JmdIW8QTQ4Wv52uWLjkfsGXVnuo/hDfOi+yDJ/QuBKd6b2Ae385FIi0jv3Q8KAGbcGgiGS7paXMHSvWMdYfFJkesBA2BkhUfNqX4hp/Gsh9wG+6PGHdAkY1RoYvxwBOXASvDlGIFE5F6zZLfWrwjjEdeQ8t0b6g/suHxyDNJJ8WD5U3XkoOlLuuGGBc9Y/wp8OBsS+AHVC0jazjCB8s0W+Vs/aDIz/QrmYzxhlAp9PPFeh2P6Nm6hlxFxDQksNe6GS0cygM5RNAv50Z3BQ/PA85WQXhL4EMY7s+/F2ZpSKPvMlS/+0pWFgTxzujJ2tLfsQ6QC99PQxgtI+PUJ0l2RXSUg5amunqDJ2qyNqtpckbmA9GM/oekjC3LL7fw45JjbO0IpQrd+kL9hlZOIQrqYY5EbXB1k8lz6reAx1sFRjZ0pHz0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 07RocDaw0M+5QCCN1Q+HwGsucKRA6Xk9wKBG3KgpT/PmB0K3NnKl53C9ydqWX+3nqgAyK7935NvVlRICoen6V4YwnP0/2CIxdtfGhg3tjcuZ8t6UA/wOnTLFDIEq/sA1g65u+FS+buXFL6P1LzF9i4BbkHAUdtIS5Le1jhkWTCcqvLuuHL1P2a7zHR17jIU2I5uUy6f2pHTou9EpeyohkLiaUD/XQHcby8zxqqe+h/CPoXJtrZFRzbbmc8y+KlTA+xWdQg5QVxpX4RoSRC56scrdSwgrPPTmL217go1KPUhfPMRVlI/r3rwamhtg1yZUzsxEA2/YiyISOnemwaGd11FpwB+z4u6s68ViIyReWK9HNOQIGwVDOU+Ku5J+7CoRNus6moaghZ6X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hI3xmXZ5Lv257O7vmMIIimmdpuyLm0AviFdgRTbzRfXMsIdz2wotzupFWo241YdAA+mxm9n4M5QaSwL6X9e1VrYsJ0B+1yhARNO5cGOIdCPsHq/Sldk9TqfWcudVfCcu//Le3wZRM7eSMqk9TtpyA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: uxEVwVFJMv3ahOu6AXyroYuJ9Mw5ND5OZBRQIxNO9dFvjBZPELh3jJMKOVAsIm/muYE0ILQYMrDh3eD2IFLfsA3AdNX6x5DSrd1w8GPYhOM9s9NVOT7By13ZkEAgNazmrmrfhwz36CLsgGfBma7HlZP/X199mR0jMxU371vW1mFeeCyOMYbXw6l+wzWorApIA/LwnFYFGgJxSwjH57wxeUJzg5byhfucA1TkUZF4/sBI0s/+2CM1S9UcD1GW09HbyMm4V3F1J7B337PZJ45Ve3dINpEs0WbbFAIevyvrHqQtilSuL2DwRZYVrranTDSmRh1El791v5lZdiUzWymjiu55O0zU8JUON3E8RJ1X/IQXofHGWXVv9kIQA9hhaIfgYeAEH1NgFuHKCxUWYwRVv3MHnF9j+lWOiLwHNrFwbgp7/o767HukAWPxVq8na9tYK4D+dEXqB84r7jhsHyJUJyEf8pZbsgCliT5iNaU8tlWaoWaxmD/hMz+LHNrgoXO5x/B9Td1pEDyLejXdMf2fyd2iQLOVxvmoi+RiRIOlWvokNAJwqEZuWmId2cFBN9A8gmEeYRBG/h0BuOGC1S2HcUndHFQLwSjUHqdWff2ow++AFEY1bSLopzxF+JU9xnvCjopO6jj9mWPaWeq+u8Pdlf9pFwmPeZCubedrJkQF7CMoS8vdiP1pT6uRybp7/QVY9yVYYK+yEgfCTto8Mb7pho+X08mBUXFparMJ9ox622rebabeQStGT5f9X7vdO02KrDJjj9yM0rEXpsartyUiSpKf2CNTgvqPKK0joWX3Np86oC54VmcEvVvvFJLH+kI5lfIdTBLf3SRe9e8GtMv0NvEylr7cuGykKP0HoB1odqyDQf5hb0pDTmx2y/14PLDLoGKf/BMFSxCGC/O8epDpGdDSfYSoPOXJiYWkHr/ymccHqwMrCkxrnI38iYsvL8ar8mZKUwTjXL8IXyADfngA6kL82Yi/lvX57EUzrXSi77wS1RzpKjDL1+Z6VpjLQRuKLJ3R6DrrkCJg6W3x6knsvXrK7EsdWv4eNgYlc8itlzCNZq8+YoHEPakYZL7JfGqD7k4wHPplR6A3T53DamZAaARUxYCv4jXxmEdNYgpMGQEnSDvFWRcyOSYXaO005684kQHji9aJcGltfaOlMsciU9aAg7du+eRg9Qg1isnTAe2ajgKNwV/QqCkMUV8j99+RDqByjbnUIphLNdMVxGLnwCwfZUWUmwBs/wmqDJQsO2+oni5NtIS4W1zKCF3iF09fj77cndPIZ2mEJM1PXJoOzRcSySPadyiFeUNi7ZjoGP0FtVkAC3GcBQLUsvF2LmYgmDxUCvmKCEDjzz0JO0UQA/MpeEbrsrlTE5tmY7TuOvsaGm7styHgFnq963XaO+qKejuWJaBDD46SpXEBJuqZ0Ot0CMjQHJAHTVRQ2fOLa3mGKqbi3UwRMM/wgmuqbrfsRP71gQ8BnTsz2BIZjfLopQRBh2Skb+v6+FUC3sKnr8JQmpeTlm5lDNa6QnoEbBo/w45fUJXc43Gvmo1YFRE4ASOllFrwCtO0mAfd8EAJ2CY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 037a34cc-5da8-46f7-22ef-08dbdfe689e9 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:05.4180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eYrSngIXJnnJKtafpAIa0RwpROW+Bgot+DXJbLp9pZEgvkLm+5VUR1w1OcJAunB3ehHRUteZIYIVQq/ogOFl9R6acaX1FsZtdafbUSM6yg0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: ZIktjL8K13Zfb5YT99yWNidmuPLZEr1J X-Proofpoint-GUID: ZIktjL8K13Zfb5YT99yWNidmuPLZEr1J X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 113C44001C X-Stat-Signature: musn791jsp5crcypyn4y113ui9mxu17p X-Rspam-User: X-HE-Tag: 1699398569-651707 X-HE-Meta: U2FsdGVkX188Y1l47s/rUpa3yl5Pacjc+KnT5baxCknyx6dYiup59o1MMA+TKMm3B/j92R7OKu0MaS8HEg6iloWqXxba0j+uz5notlT51MdnW3CTWYypOKAXEA63aB5a16qNvZbRIx7x1FFSrS79z6CksJP8BlQzF8kuas7rNHb5R7HEMJGgteLUGKDpq7ISI2HlN1HXxhN3VQgfXurBK3clSeBHRC67DuKD6hzbTU57TMVpkxhkfdPcqJVlz09HtZNFZa9GyBlvaCufHv96yWcz7E+saPN9Z67IG5Ytji2MTYt62Va4+FuJN/9FHo3PKtaD0SveA+WIgV55f4g9TkNURQDz4GxlyWBTbB1huzdgHamgIzpSnrJFoiNXIOUJk+U+XzzA4ufHfbRnPfAb+z6/ZG0kNTQ2V4fKuPopWcjV5HizMRDU1MINTlcIFNcDzfc1WzsI/RPXvGf4yuBczHRxHHZq+Y+rh1g61CEfILT4pZRi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KbPXSt2j9ZsXg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All of the uses of cond_resched() are from set-1 or set-2. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Jens Axboe Cc: Pavel Begunkov Signed-off-by: Ankur Arora --- io_uring/io-wq.c | 4 +--- io_uring/io_uring.c | 21 ++++++++++++--------- io_uring/kbuf.c | 2 -- io_uring/sqpoll.c | 6 ++++-- io_uring/tctx.c | 4 +--- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 522196dfb0ff..fcaf9161be03 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -532,10 +532,8 @@ static struct io_wq_work *io_get_next_work(struct io_wq_acct *acct, static void io_assign_current_work(struct io_worker *worker, struct io_wq_work *work) { - if (work) { + if (work) io_run_task_work(); - cond_resched(); - } raw_spin_lock(&worker->lock); worker->cur_work = work; diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 8d1bc6cdfe71..547b7c6bdc68 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1203,9 +1203,14 @@ static unsigned int handle_tw_list(struct llist_node *node, node = next; count++; if (unlikely(need_resched())) { + + /* + * Depending on whether we have PREEMPT_RCU or not, the + * mutex_unlock() or percpu_ref_put() should cause us to + * reschedule. + */ ctx_flush_and_put(*ctx, ts); *ctx = NULL; - cond_resched(); } } @@ -1611,7 +1616,6 @@ static __cold void io_iopoll_try_reap_events(struct io_ring_ctx *ctx) */ if (need_resched()) { mutex_unlock(&ctx->uring_lock); - cond_resched(); mutex_lock(&ctx->uring_lock); } } @@ -1977,7 +1981,6 @@ void io_wq_submit_work(struct io_wq_work *work) break; if (io_wq_worker_stopped()) break; - cond_resched(); continue; } @@ -2649,7 +2652,6 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events, ret = 0; break; } - cond_resched(); } while (1); if (!(ctx->flags & IORING_SETUP_DEFER_TASKRUN)) @@ -3096,8 +3098,12 @@ static __cold void io_ring_exit_work(struct work_struct *work) if (ctx->flags & IORING_SETUP_DEFER_TASKRUN) io_move_task_work_from_local(ctx); + /* + * io_uring_try_cancel_requests() will reschedule when needed + * in the mutex_unlock(). + */ while (io_uring_try_cancel_requests(ctx, NULL, true)) - cond_resched(); + ; if (ctx->sq_data) { struct io_sq_data *sqd = ctx->sq_data; @@ -3313,7 +3319,6 @@ static __cold bool io_uring_try_cancel_requests(struct io_ring_ctx *ctx, while (!wq_list_empty(&ctx->iopoll_list)) { io_iopoll_try_reap_events(ctx); ret = true; - cond_resched(); } } @@ -3382,10 +3387,8 @@ __cold void io_uring_cancel_generic(bool cancel_all, struct io_sq_data *sqd) cancel_all); } - if (loop) { - cond_resched(); + if (loop) continue; - } prepare_to_wait(&tctx->wait, &wait, TASK_INTERRUPTIBLE); io_run_task_work(); diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index 9123138aa9f4..ef94a7c76d9a 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -246,7 +246,6 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx, list_move(&nxt->list, &ctx->io_buffers_cache); if (++i == nbufs) return i; - cond_resched(); } return i; @@ -421,7 +420,6 @@ static int io_add_buffers(struct io_ring_ctx *ctx, struct io_provide_buf *pbuf, buf->bgid = pbuf->bgid; addr += pbuf->len; bid++; - cond_resched(); } return i ? 0 : -ENOMEM; diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c index bd6c2c7959a5..b297b7b8047e 100644 --- a/io_uring/sqpoll.c +++ b/io_uring/sqpoll.c @@ -212,7 +212,6 @@ static bool io_sqd_handle_event(struct io_sq_data *sqd) mutex_unlock(&sqd->lock); if (signal_pending(current)) did_sig = get_signal(&ksig); - cond_resched(); mutex_lock(&sqd->lock); } return did_sig || test_bit(IO_SQ_THREAD_SHOULD_STOP, &sqd->state); @@ -258,8 +257,11 @@ static int io_sq_thread(void *data) if (sqt_spin) timeout = jiffies + sqd->sq_thread_idle; if (unlikely(need_resched())) { + /* + * Drop the mutex and reacquire so a reschedule can + * happen on unlock. + */ mutex_unlock(&sqd->lock); - cond_resched(); mutex_lock(&sqd->lock); } continue; diff --git a/io_uring/tctx.c b/io_uring/tctx.c index c043fe93a3f2..1bf58f01e50c 100644 --- a/io_uring/tctx.c +++ b/io_uring/tctx.c @@ -181,10 +181,8 @@ __cold void io_uring_clean_tctx(struct io_uring_task *tctx) struct io_tctx_node *node; unsigned long index; - xa_for_each(&tctx->xa, index, node) { + xa_for_each(&tctx->xa, index, node) io_uring_del_tctx_node(index); - cond_resched(); - } if (wq) { /* * Must be after io_uring_del_tctx_node() (removes nodes under From patchwork Tue Nov 7 23:08:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449434 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51545C4332F for ; Tue, 7 Nov 2023 23:09:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7511440188; Tue, 7 Nov 2023 18:09:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CF41E440186; Tue, 7 Nov 2023 18:09:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5B71440188; Tue, 7 Nov 2023 18:09:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 897FC440186 for ; Tue, 7 Nov 2023 18:09:34 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6760C140121 for ; Tue, 7 Nov 2023 23:09:34 +0000 (UTC) X-FDA: 81432701868.30.DFC0E2A Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf18.hostedemail.com (Postfix) with ESMTP id 10CD31C0008 for ; Tue, 7 Nov 2023 23:09:30 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MH0HRCoy; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JA4xJtbb; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398571; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=e+4zv7VYR1UlX5N5Hx/yjD4vss2V14z/S60uvxadF9s=; b=l9XXj7cTSSOQBsda2KNubj5BSkIP3IwbIzNtzXiy2ntQeDUsUF2AQhu4gD8Rs7DwIlW8aU gi9HTzin5knkVS/iX2T5BYBYmoiP6WUpaMcVziWbSPBI414ObI3HV8a6isJcoqmYx3GMFO ceB3BqMPUtTq4/a3pgcSo7hh5hj9mMI= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MH0HRCoy; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JA4xJtbb; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf18.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398571; a=rsa-sha256; cv=pass; b=mFo+FYYiB/mk492ZPTTHbIYCLV2GKmrans/RzElwH6l1yN0aGK4UoIR/hHo/szKFeb2WOP ErYwIP+oGDzj8Db2osPvsTQqUB75D4inLYbufadXc22CFt9y3TFqiJLsUAfYNz+XY+RMsk Fkw79OrT3O9uEz3dqQuycM/SHM+RiPQ= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJmFg022703; Tue, 7 Nov 2023 23:09:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=e+4zv7VYR1UlX5N5Hx/yjD4vss2V14z/S60uvxadF9s=; b=MH0HRCoym72SZAN8Tu9Vh9LhzwbAgRU5qvdLEfB3A0KXa/X29pyzRJTYzT5HnYPY64ow 3NitHrWaEZLtKWSfMthSvzZ7vrJSLfsWThzJmWqX3piUAZyO53OpyLKVtldRF5c54z7u VdZ3RvbqGT/kuIq0DobDDk69e1B6jEpvHKPO34ECk+SPt4/wqcIvKUIWpLx5l3+EIC1z jgtf6N74dgaMGiXhSXgshnIxJZuHUYPNiJdDM7kKQHa+nHUX+/HpkIK+bhuB8LLIx9L+ K/TMkBAw1lcjpVm7BgwsENUx80c6E2g8XudJPBzB7kbMqT0vczy1NEJ23tdT90K/ybeB KQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2006f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:10 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N31DG000659; Tue, 7 Nov 2023 23:09:09 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wvdcg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DD6u/XlDjYAr/AlZclfsW70HO1R4Pdf9SNyFpSgk9zy12mvL9ToniGe6KmMptJi5IM4eweJKCDSbuxv065C7bPmKTjY/CcnyxnO0Zb4mzrZpgcfrFruSEDeTcSRW3VBQBXZm8l3YzyiNRLnjRwCU44mZK/Q4j8ezfNo6Ww/OismXwOxExdzyrJbbPt47ZVMZUyFYn0EOa5IOqwpNELbsQDjBLelr/mw1ECOh8HLoiikUDpfGdTWEKgLkIMcfEt6DdbyhgVLtaC5zza8eJ/XarygPMaTuoyXqjnLfer7HTWWPxgjc1a4OeIki3mCzdgxzN35aylZ6H+jRtIVl2witfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=e+4zv7VYR1UlX5N5Hx/yjD4vss2V14z/S60uvxadF9s=; b=XF7av1PbQNVUuG49QD9ANOViMTD4q74ShtfgKiK1/c5ydW5Sb4JY2XxEKkwVNlUIf4/1QnOjhZD2d6I8jCyKmOEnN/XdSgQ41dcSBVCfBsLmqbkxYBnMQEgxCAYXLTmXu8uT55eH5cI7JrAf0w0FVDqtm+MeJn8fvfyK4emLkiRO5Sd2SgHzdxy+Mcz3U5Ck0F5naJ3m2mpjwnoERqi1kwti5wOxsK/h32G0TZksP6L/9iU5XQoLVji/jQLyBfYbG+F6cRYBsTYKsWIOIBhXC8ajq0hK/vUKEO+MJ6BG55wKUB6fCpTpNMFDeEsdhiTvpk/c02p6gbh0Kf+6wRYGTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e+4zv7VYR1UlX5N5Hx/yjD4vss2V14z/S60uvxadF9s=; b=JA4xJtbb1YlHwQyM9B9xspn9pzjVIMq/0yqQiPh3DZYeO8dvHyIQIatYLwAMYFBU3JCOBBwPyPpf3DdVgzOmUNGuF9vD1Y7UsXt4uHXHEmCi/IrdZk2MoT1St6dj8jCsnTjgT0w0IE08zxfpGpUv/YqvnfppfCJkqXpPQfi+vGo= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:07 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:07 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Davidlohr Bueso , Christophe JAILLET , Manfred Spraul , Jann Horn Subject: [RFC PATCH 70/86] treewide: ipc: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:06 -0800 Message-Id: <20231107230822.371443-14-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR07CA0095.namprd07.prod.outlook.com (2603:10b6:a03:12b::36) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a39acdc-a74f-4b56-a18c-08dbdfe68b09 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 67sYNLUr9GcqGGEGR6e6inROk8JB8QB/vU9y1Cj4yo8DICoh6nj6HFb1e7yNY0d+h8QkFdPJ1EnRHy+3AM/Cnn84Q4Mx7Y2Xx86vBya1Qi3YFy65Z5YLbBTNGHdHWWY09mJB6Ztxd1Nb5EI/TVDQ87G5HjVmG9DjNlmOLlkqiDgnEKoo2+ey04WjiR61Psr0TokBIGHDSS4nEsnAEbH2gb+88gpRu6hz75Mt36vy0mQwtZkOdWPB7frEmeFv3B6nA0Sb9MgKQosB5yH5NsNq+v3VVJBeQbfbpLQH2MDUlJhscq8ldlB/5TDDJpHAxaEOs7u2vrq8krhppk+BK1oExeRywI/AyuQ3NP+N/+SQxKc8ppajyt3NaBrPC0LxePdos1/bgkjm2q48hgOHw7K+AnhkYXaS4hzMTVZAsOMhhIH57GDkyg9ihptJg7UCKrLrFYBoA4GSQ0iaVsHNerT93zXqDi7mT4Gd23B2Im2uwwfaUM7co7WitQUrFkrhg1LK3HTYW4Mzpz6ao83nSiFAoubgONTi0SQSTWToDxOZK4s= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BiwhxQ420BiPPR0xiVv2/tYF+aU1vmlyFai9QBoY8LQcVCzs2DV4eg2J+QLBJn2omzbX9sQnKmodzOD0wqR7v24Ld8d/5lt+IIAb8eZq132/3IfHADuj0aXSQeJKGfC9feJH6uU0z62mZhaYnZEDNLzk7VxNRgIQOBCnVQXVGbNAV5Bo+BaHyEhAmAh9H28XtVzUmnTtAGAropXvsZC+Mt/jB39uB3ABe+1+RUwZLhYTSKJ8q/lwvr7yqYeqvIwWFZCcDEzmwwjdCTh+JhwEPfLgqMyqo33aWaJQyuxVUVrPsEPvGWJg6p5r27t2K/niO8uqeChApgTQHAGqjyikhV3z9z/d/EmlkdEYffPMgdNHk8yqvO26K7YE82shBLcHVOa7pM+MOjWKfjLNzTEBQ0lwJG3oZ2ap/dO2ldusNfjQyIjAOJV+10y5FN05+1YJCjHqPfkZGTrvXcsfjYdY5OjWyXBcU5cCXepOLuBVOPu7f7TYdD1AoLKIN3Ng5yFt51ZkoQI5E9jlDp01vpLJZBtPsx3OSKLrQoa7RlnjmZQ5lKgqTzMq2EZGZEL9J7XkBPr6DxuX3CDckGPxxXzNG+TFrLY5Z0DMeNe1XoEAei/Mvo45NXn+q/mWGYJ2Zwm/YZtHILfLvaJ9lIouvG0YJZQDlnBw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ooj0eZ8xdW0MAMMPgXwheVzJt56lsTXn1Y3NCD5BjTCvM+D6EvmnJ94KiTeW+t7jR5B4FTkpGL3IKe4JKEbL9rZ2Ud1BG9vvxr/RxV8NZHcZ35ffrvD5OAdi/GTFfwymZ0geREh8MVBMLkJLzbPOft/Apo1RrKYQtbHQDCi8sl8495juk1+xHS6N5aq+OxtkbfdyUE/XBFVZOeU1SYzvsPFhT+Gb8350GQT2eDJF0/QSLjwnB+P05uDcIT+bul2ANcdtBJ/JXWyul/dScDpvk0vXbn8TST06QuoH0UgB+Lesr2wnrdjEsyOWxI56ecmh7R+vU5hCxND6AHsjQNG5xquw5AITQ0Nl70sdu61htZfOPoOTutknpy7JrAuNGDnEd7uzX3pi9KyH5vRqdaIzqbBvLau52CjTddJ1zRdPKQlRNcYJH3Ivik44P73NXVJ57IFvaOMxSEU6Z9hyJ5j9ez+0HmdvSdT8qKDavR1gHeLn3nL6JbR9HIW4d+seknwClpQ1qGLaOHpf9DwGcUVuWk/p6pE57sjdZyVmUU5qgR58nhlhKwT3ycmoMTTrYkk+JKG0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a39acdc-a74f-4b56-a18c-08dbdfe68b09 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:07.2693 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2MEch8ecFh4HeNg33Ct4s36+ZLMe1t0SuQTKRjg4GG8JVCH6SF2iZSR4Hu874kCGvubN8VTOOPFATtrymsNNUdVxFhreR89J8keUZb59QX8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: C9IHtMc2wAq6gYbN3RiMg5Y7H7mH9JjU X-Proofpoint-GUID: C9IHtMc2wAq6gYbN3RiMg5Y7H7mH9JjU X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 10CD31C0008 X-Stat-Signature: zmpq1brx75tf65y5p5eta69h36uw8ia3 X-Rspam-User: X-HE-Tag: 1699398570-808839 X-HE-Meta: U2FsdGVkX19UHAnCis6Jpkv8zZ6YdFPGWB0w2UNuneSBk8oOr+KuZaEXrpB22wJGPwr0+KpFKbvHhzAtQFnZ+kQnlgJZUUapdEs1JB9xRZaPYADtLNR5KOWBja0NY+muUbjCbuq/AZY30R6qvXVMA3UyIDmwYs+66c70GMIvitWFz6b9mr6TYLL8lwegfdJeAwi3e/ZByWRyyTNFZsBm1VkOeUNVUVmsY8xuYOEpmuG3AfJfGPGPmYTh5mY8Q6DXY70AAf47sqw4C0IrRKyMf3BBj5VklR4bd4b76AXxvMGa4w/1hRNikw36ld27nhzecIS8tIRuuUP4bHQG4ehQrkuiNPmjcYmhroynJd8cesd4akFv4/QVrDoCN+JslxhXoNIHj2nW65ZEucK9PiQ9qPmOpQFiQ6CuYsCZvNf7fPriNQlY7GtWlntf2qjI7Mltohzy6vER+QI372uQv0yq1rLV/lBXYU2cNI2QFNVSBXUnL3XV0Nob/d1TpAehF2Kd4fvVyeGVzxT4ahYZ18QQvNbPM0Myxod8C6FtSIUiWp3WOUUfvqS7mLfNrKuIAiF9WDpW6mpfMX0SMDfJpk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N+vKLQMB6+aEW/x+GheejSkjT+jiymMNWuL1UT3Z5gvMC5kb6QE+1DVK4gX4iiq3XMqJ3dEwBU X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All calls to cond_resched() are from set-1, from potentially long running loops. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Davidlohr Bueso Cc: Christophe JAILLET Cc: Manfred Spraul Cc: Andrew Morton Cc: Jann Horn Signed-off-by: Ankur Arora --- ipc/msgutil.c | 3 --- ipc/sem.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/ipc/msgutil.c b/ipc/msgutil.c index d0a0e877cadd..d9d1b7957bb6 100644 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c @@ -62,8 +62,6 @@ static struct msg_msg *alloc_msg(size_t len) while (len > 0) { struct msg_msgseg *seg; - cond_resched(); - alen = min(len, DATALEN_SEG); seg = kmalloc(sizeof(*seg) + alen, GFP_KERNEL_ACCOUNT); if (seg == NULL) @@ -177,7 +175,6 @@ void free_msg(struct msg_msg *msg) while (seg != NULL) { struct msg_msgseg *tmp = seg->next; - cond_resched(); kfree(seg); seg = tmp; } diff --git a/ipc/sem.c b/ipc/sem.c index a39cdc7bf88f..e12ab01161f6 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -2350,8 +2350,6 @@ void exit_sem(struct task_struct *tsk) int semid, i; DEFINE_WAKE_Q(wake_q); - cond_resched(); - rcu_read_lock(); un = list_entry_rcu(ulp->list_proc.next, struct sem_undo, list_proc); From patchwork Tue Nov 7 23:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2370DC4332F for ; Tue, 7 Nov 2023 23:09:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 46BD54401A8; Tue, 7 Nov 2023 18:09:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F018440186; Tue, 7 Nov 2023 18:09:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1800C4401A8; Tue, 7 Nov 2023 18:09:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id ED7D5440186 for ; Tue, 7 Nov 2023 18:09:48 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C0D8A160B63 for ; Tue, 7 Nov 2023 23:09:48 +0000 (UTC) X-FDA: 81432702456.25.6076E15 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf29.hostedemail.com (Postfix) with ESMTP id 4F2B2120011 for ; Tue, 7 Nov 2023 23:09:45 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=u7MBgR4U; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=I56sJIul; spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398585; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=Fu4vRmpeAbKXOqy65IBqQU+tAihFbqXA/UDAK2KmhFOFg2f2MyrNxmQhK3FKwEpCQmZTRT zUeHWKzwooIQYihShhF87UQg7Do1JuuB+5rWookX769qGI28Zn73dfKeE9uMBjfWhD/vWk mu/XRbzv8z/H8BUpkdb/mleuGpiR4Gg= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398585; a=rsa-sha256; cv=pass; b=ywKaUgpUUhCkjpgAWvxh2jzlyHf2KwdKMpaquGZGDRkaub5YrcMpgE931yoZthA0LQ0y66 zqjXt8dgYdNPAbapU8lO9vpq+kpx7p6qD0hqwd4fVNS8gqTWPyt0j0/lRkzc7bLME+GKf7 LE5LAo6qP0JYfGV5fW7uV3iAwJTyykY= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=u7MBgR4U; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=I56sJIul; spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJjWV020343; Tue, 7 Nov 2023 23:09:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=u7MBgR4UQvF+/g6JUw6+6ToTDQO9e//6BZrr5klVjb3xiszIhD02E9V/U/OkrilQo3Nm WZzm0PJVjuJ/GVadytw5IH/DN1DntY8/B8dkFwZSwMfsSburwcI8erQTKR+pbBIIhvsx N4D5bwtucQFureuONcP5L8mx3jtQF/R/t8+c22ZIB8bPAaJ3N7nLzkXx3eb2f+GQHH/K rO+mO/uwcl4WzkkUmh3RWRAtqiwydNGG1bkaSQMCPUtEaYRjkARSTTpCeBnB1k9bfRMe FowVHss+WK++nUPGNzvyFPGVzDakOnslIPoQ93+TcIvnH4TC69LNK220tAbCtogH5myl mQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22079r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:18 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2f9w000483; Tue, 7 Nov 2023 23:09:17 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=laL5aznsEvVmy8FlMXRx5wgpxaxzxQL5mtiLT/FmZ3aP+u5Gt74uQhu0HUlFsSW5Qd0S/VzToDOsFlgMThF+aHqoxOeLmCWCVSO7O8OEj5zeiUq5l3QTRvTt+22AmvrSEc9TJ0P4nu74yfMXz+tOYmcQj+Ye1m20zNiCPMhKssz/9GmeecWLrIjY6mVW8mqcTpHt46YW/Y9y5HBrYhLE3vCytWQUk8Ep8jjf0KDe79H/p47vJWRqsy2zdLplW8OcGmogVF0Rmi6r6jKVUedezeRlnWgeSrfHu1El0avMISIytECF8DJHPE7Yh6QZ63h072V5pNJ9RQNeTCda0dSk5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=RxVvDoPLLcxQSdYYYi5NMH1uYSsz6uuEfXQ/hGz314bEMHbfI2b9NnP3QYChvG6An2Rh+1mch5gGKH14KnhPKA6q0RrlTVKeXGeLlveiK1jEJbGdPOA45DwvVtshgfVh6xJEkdF0B6ULs4QNgvP+3922XfY+wyapPXReEKoOvKWGChUiXld3k1J0XJLMbD+RdZIJhLr5a97ZzQWp6FVh2Unvd7nZUvH3fNJ/A3vUImqTESZtCtl6HEQpk+WMaQDRBY3hmueTD90Ek58p+TtCsbKN8ybSUtoi8fcIRf9H92o08X3vovC13r+jWQelXXmmrTET9ZwfT/iV48WBo3o9vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=I56sJIulWLv3+R2HYBWCDMUoZAqJui/toFecbpvoZwixWQe42LpmRENxuo8hpg1gJrt8rJI3FouwL2DNsarICnG5j07m1aLzU+/V1MOF1Y0yf9+uyLywOgbKnzTAb1Y4b2xjGHyDihL7pIMsPhW5UAXdcQK2vyafvlNPKeTcI/E= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:09 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:09 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Herbert Xu , "David S. Miller" , Kees Cook , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Thomas Graf Subject: [RFC PATCH 71/86] treewide: lib: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:07 -0800 Message-Id: <20231107230822.371443-15-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR07CA0072.namprd07.prod.outlook.com (2603:10b6:a03:60::49) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 06eef8ff-3c42-4f22-f839-08dbdfe68c22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5b6ndjvFNZ12a8FLLiTuTTeurMj+7agXLbCv9NZqrnpHP2apYak3ha+J1ktgxkUKUdFM8E0AO7lqU1XWemk8obU68G0aPtddrHXffrCfA3C8OP1LVtRrD4RDoOIvyXxfWIioOkYFAKMZf/llg1J6vweSlsKwtgShVYMzPgw0bSBLMNmBZhKzwjy4FNuHcw2SYhaOdGZe/ZEMMzJwQpf9IGAeYwnfRi2j0fPN2PlnXucuJ3upYcgK5nTYp6ZB7fNoKKU8vUe8EQIwdhSWKMfSHnDincEdlchqlYUT7rtUlWvd28a3aCU1Kh5qOGa7H7CZq4EqkcXBg3KbCMUdp3RcAbif2Pp1l7rZx4Rymehmj8sP1Z0TUV1QcGGawewMkcl2Bbxr9nGsBIf1Oqy5jAHw98amj1ThNmyG4et6ZMwfGeZKLA1aDcHcEBGwt2u3vOZlyTvUb+VkF64LhYldtWz0mD8DBxuF1vYNjmg6c+esQ2QRjMDzyYkD5Z8/F4BQ36GV6m23GWyMIytBG36i+963aPPjB9QjkiPAcS9K9v8U+bozXD2NgEJhzzVJhbl2oqM6QPN1P3gSrA9la6R3tI9ZQaIpthBH4fkPeTIUrDGtg93dH9oms4xTE3CK5BgF2KhS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230273577357003)(230922051799003)(230173577357003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UbVIk3FFL8hR3V+fDBbKSeAWt+vl7deyfLAdKIcHrZ7A6k3H9dV+A/Tfjyg6KPQgW6/boe0qUNRvsoh6K36GOF5s5Vq8fmhNsJKx5WN4WIHm/xBOu5RpfpCu9oMwiDPp6pG6npEWFH9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nsOYeId1mFElzAHIZw6rNPl07qdK1L81wvQd0zwgcsEKw9QWj6w X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06eef8ff-3c42-4f22-f839-08dbdfe68c22 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:09.1725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qA10gzwCS5oTLgPqxHZ97iB4/H5sWmiHZdXJmUkE8W9xFzDE1rwssg248Fp14mEVlaxlnaf8jBhKpUXT1Nm34Huvzk7kBoNW94fpyX8/hMM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: RzcFPeLiSUCbGfj62VwIpN318D3a2pCv X-Proofpoint-ORIG-GUID: RzcFPeLiSUCbGfj62VwIpN318D3a2pCv X-Rspamd-Queue-Id: 4F2B2120011 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: kpdh4d9ohqgg86ooiamp6xdpa9fbthzf X-HE-Tag: 1699398585-948084 X-HE-Meta: U2FsdGVkX1/66xhV9GQ3FX7PDkcGfkh6pp/nTYxMv++j/IoePWfnBHVZD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Ui6UGnEv68z6N+2yLSAoY9LI0c6bZKd7PgTKxBgzbxfPuhNVeUfSuQazA1nccU9yasE2cqDblo3Odfigq66B09nQ5mBuTehlvtCnHk5/vy1krflfSs3b+LcggrC89A3lT1ysAdSQayfIm3YV8mw63RvjtNxhb7q+aeh7s3gPW1zydJvIzdiWY5qV/sK9AFlNf5sbciR4h8bupEZJZ8yh9nEiAsGFNKeKWxqKwRK8ZvRD9GEuCjAesyafZSyLg9MR+Lz/h6/oU5nHv/x/28lHnZTJ86f0xm3keyxmnySbNdar5KvHGGZuN0uMDbm8whc51KGaOS71pLCYpPDZB0YU0PWWSPDC3P8Z0IovayrewU4wBpEWkDM7wXjbNL9i5a5V2k2v42lEYOnNGbCYaLHUz9jvZPVdEi1bJApJgbfHoDm+wFhcac5hRO6cZZtdt16dkmli59ShaFYkQCv7JTTbSm4//MKfPKqWBB0+xLflznbZDbaXfQQ2U0eMhVR4fLGVfsLLfQMP5Xs3sJyn5PkCmtUrRN8tOYLLd5jWXK68ByyAZ/tYCanlMKWvX+pN99kJJVNVy7f7Bg3ia2OU15c4MCv7fXoJYQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Almost all the cond_resched() calls are from set-1. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Herbert Xu Cc: "David S. Miller" Cc: Kees Cook Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Thomas Graf Signed-off-by: Ankur Arora Acked-by: Kees Cook # for lib/memcpy_kunit.c --- lib/crc32test.c | 2 -- lib/crypto/mpi/mpi-pow.c | 1 - lib/memcpy_kunit.c | 5 ----- lib/random32.c | 1 - lib/rhashtable.c | 2 -- lib/test_bpf.c | 3 --- lib/test_lockup.c | 2 +- lib/test_maple_tree.c | 8 -------- lib/test_rhashtable.c | 10 ---------- 9 files changed, 1 insertion(+), 33 deletions(-) diff --git a/lib/crc32test.c b/lib/crc32test.c index 9b4af79412c4..3eee90482e9a 100644 --- a/lib/crc32test.c +++ b/lib/crc32test.c @@ -729,7 +729,6 @@ static int __init crc32c_combine_test(void) crc_full == test[i].crc32c_le)) errors++; runs++; - cond_resched(); } } @@ -817,7 +816,6 @@ static int __init crc32_combine_test(void) crc_full == test[i].crc_le)) errors++; runs++; - cond_resched(); } } diff --git a/lib/crypto/mpi/mpi-pow.c b/lib/crypto/mpi/mpi-pow.c index 2fd7a46d55ec..074534900b7e 100644 --- a/lib/crypto/mpi/mpi-pow.c +++ b/lib/crypto/mpi/mpi-pow.c @@ -242,7 +242,6 @@ int mpi_powm(MPI res, MPI base, MPI exp, MPI mod) } e <<= 1; c--; - cond_resched(); } i--; diff --git a/lib/memcpy_kunit.c b/lib/memcpy_kunit.c index 440aee705ccc..c2a6b09fe93a 100644 --- a/lib/memcpy_kunit.c +++ b/lib/memcpy_kunit.c @@ -361,8 +361,6 @@ static void copy_large_test(struct kunit *test, bool use_memmove) /* Zero out what we copied for the next cycle. */ memset(large_dst + offset, 0, bytes); } - /* Avoid stall warnings if this loop gets slow. */ - cond_resched(); } } @@ -489,9 +487,6 @@ static void memmove_overlap_test(struct kunit *test) for (int s_off = s_start; s_off < s_end; s_off = next_step(s_off, s_start, s_end, window_step)) inner_loop(test, bytes, d_off, s_off); - - /* Avoid stall warnings. */ - cond_resched(); } } } diff --git a/lib/random32.c b/lib/random32.c index 32060b852668..10bc804d99d6 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -287,7 +287,6 @@ static int __init prandom_state_selftest(void) errors++; runs++; - cond_resched(); } if (errors) diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 6ae2ba8e06a2..5ff0f521bf29 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -328,7 +328,6 @@ static int rhashtable_rehash_table(struct rhashtable *ht) err = rhashtable_rehash_chain(ht, old_hash); if (err) return err; - cond_resched(); } /* Publish the new table pointer. */ @@ -1147,7 +1146,6 @@ void rhashtable_free_and_destroy(struct rhashtable *ht, for (i = 0; i < tbl->size; i++) { struct rhash_head *pos, *next; - cond_resched(); for (pos = rht_ptr_exclusive(rht_bucket(tbl, i)), next = !rht_is_a_nulls(pos) ? rht_dereference(pos->next, ht) : NULL; diff --git a/lib/test_bpf.c b/lib/test_bpf.c index ecde4216201e..15b4d32712d8 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -14758,7 +14758,6 @@ static __init int test_skb_segment(void) for (i = 0; i < ARRAY_SIZE(skb_segment_tests); i++) { const struct skb_segment_test *test = &skb_segment_tests[i]; - cond_resched(); if (exclude_test(i)) continue; @@ -14787,7 +14786,6 @@ static __init int test_bpf(void) struct bpf_prog *fp; int err; - cond_resched(); if (exclude_test(i)) continue; @@ -15171,7 +15169,6 @@ static __init int test_tail_calls(struct bpf_array *progs) u64 duration; int ret; - cond_resched(); if (exclude_test(i)) continue; diff --git a/lib/test_lockup.c b/lib/test_lockup.c index c3fd87d6c2dd..9af5d34c98f6 100644 --- a/lib/test_lockup.c +++ b/lib/test_lockup.c @@ -381,7 +381,7 @@ static void test_lockup(bool master) touch_nmi_watchdog(); if (call_cond_resched) - cond_resched(); + cond_resched_stall(); test_wait(cooldown_secs, cooldown_nsecs); diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c index 464eeb90d5ad..321fd5d8aef3 100644 --- a/lib/test_maple_tree.c +++ b/lib/test_maple_tree.c @@ -2672,7 +2672,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Check with a value at zero, no gap */ for (i = 1000; i < 2000; i++) { @@ -2682,7 +2681,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Check with a value at zero and unreasonably large */ for (i = big_start; i < big_start + 10; i++) { @@ -2692,7 +2690,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Small to medium size not starting at zero*/ for (i = 200; i < 1000; i++) { @@ -2702,7 +2699,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Unreasonably large not starting at zero*/ for (i = big_start; i < big_start + 10; i++) { @@ -2710,7 +2706,6 @@ static noinline void __init check_dup(struct maple_tree *mt) check_dup_gaps(mt, i, false, 5); mtree_destroy(mt); rcu_barrier(); - cond_resched(); mt_cache_shrink(); } @@ -2720,7 +2715,6 @@ static noinline void __init check_dup(struct maple_tree *mt) check_dup_gaps(mt, i, false, 5); mtree_destroy(mt); rcu_barrier(); - cond_resched(); if (i % 2 == 0) mt_cache_shrink(); } @@ -2732,7 +2726,6 @@ static noinline void __init check_dup(struct maple_tree *mt) check_dup_gaps(mt, i, true, 5); mtree_destroy(mt); rcu_barrier(); - cond_resched(); } mt_cache_shrink(); @@ -2743,7 +2736,6 @@ static noinline void __init check_dup(struct maple_tree *mt) mtree_destroy(mt); rcu_barrier(); mt_cache_shrink(); - cond_resched(); } } diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index c20f6cb4bf55..e5d1f272f2c6 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -119,7 +119,6 @@ static int insert_retry(struct rhashtable *ht, struct test_obj *obj, do { retries++; - cond_resched(); err = rhashtable_insert_fast(ht, &obj->node, params); if (err == -ENOMEM && enomem_retry) { enomem_retries++; @@ -253,8 +252,6 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array, rhashtable_remove_fast(ht, &obj->node, test_rht_params); } - - cond_resched(); } end = ktime_get_ns(); @@ -371,8 +368,6 @@ static int __init test_rhltable(unsigned int entries) u32 i = get_random_u32_below(entries); u32 prand = get_random_u32_below(4); - cond_resched(); - err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params); if (test_bit(i, obj_in_table)) { clear_bit(i, obj_in_table); @@ -412,7 +407,6 @@ static int __init test_rhltable(unsigned int entries) } for (i = 0; i < entries; i++) { - cond_resched(); err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params); if (test_bit(i, obj_in_table)) { if (WARN(err, "cannot remove element at slot %d", i)) @@ -607,8 +601,6 @@ static int thread_lookup_test(struct thread_data *tdata) obj->value.tid, obj->value.id, key.tid, key.id); err++; } - - cond_resched(); } return err; } @@ -660,8 +652,6 @@ static int threadfunc(void *data) goto out; } tdata->objs[i].value.id = TEST_INSERT_FAIL; - - cond_resched(); } err = thread_lookup_test(tdata); if (err) { From patchwork Tue Nov 7 23:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38C91C4332F for ; Tue, 7 Nov 2023 23:09:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 181B44401A7; Tue, 7 Nov 2023 18:09:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 10F4F440186; Tue, 7 Nov 2023 18:09:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D67754401A7; Tue, 7 Nov 2023 18:09:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id BEA95440186 for ; Tue, 7 Nov 2023 18:09:46 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 89151120B92 for ; Tue, 7 Nov 2023 23:09:46 +0000 (UTC) X-FDA: 81432702372.15.1D9FDF0 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf28.hostedemail.com (Postfix) with ESMTP id 44048C001A for ; Tue, 7 Nov 2023 23:09:43 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=YZjjhSx8; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pxPQE8wE; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf28.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398583; a=rsa-sha256; cv=pass; b=tAK8I4Qsebx5y9y48mxghPt4NpwhFCdUJdmMWKEoqcjyox1FlOaJNueG+lTkEXEPBwz14I 6NunXX1xHjDxN98zs5M81D3ehLr+4xnC8HAk95vwUjS52KB0KUm9WdCb6tgOSKlO3Jc/RF XkCucnriaL5YvnFkmCmSlv9jjGP8uc0= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=YZjjhSx8; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=pxPQE8wE; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf28.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398583; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ubSSabi1DkbNzk7JOVGv3+ttjgZ4hE49pYPgn/BH2nQ=; b=YrXhp21oZvYQzgnSeoR90m9TYKfbrco4/Komi9/nN22uBNU/LeZCHFDzDU2lQEWj5g9IuB iqrmXxzplMn+0D3QV0MUipYrVj+8TpteogwNe/LIF8WYk3hIc5HvHtbq47Z0WFZdU/+WeW W0n/ila++/GE9jA6008M94UxiE7rSeU= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LKAVx026491; Tue, 7 Nov 2023 23:09:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=ubSSabi1DkbNzk7JOVGv3+ttjgZ4hE49pYPgn/BH2nQ=; b=YZjjhSx8kkRvxB9s78H2tZHxAShvX/ZVJyaNjWdT873N8ifA4Yrp1yrNDKVy91F2nvl6 XjEUQBiXjlcZkNzqx6qP2kYm5xyHwEe3lHeCYuuHeSM+IDRAMWQZKZGlJ/Pwb+Ltccld yiVnqaNgTpMRYjPffVbp7JC7TiwEzkZ2KqdVWE4DppHj9vvr4bYjzlnhYRQlnHh4jLcO 8UvxSRmsjn7I509835LemL5HgNaCCL0pWRocFxPBtX62shQRr4uU5xO0Or8rlEcjIa3W m1X3sZFZU0BpL3a6R+zHtYjSwErMPsrL5UKaHf1ih8bsK4Ilz5My/2hw+XNlQuPFa1tE Qg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106w1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:19 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2f9x000483; Tue, 7 Nov 2023 23:09:18 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbqc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m2zdv+YFWtQCr/TRto4loLkbexHHc5IzGQRGnEtcDLSnKdnkuW3QYmY/hRjAHOCpGI55YU41yS0yADb1GdVEdCpY59tKkvEJy81NTinkxLMXvupvMwHj/2JHwVdOalDv5jTnz9VZIu0VFYk9hKqtZR2V1nvVpU1zd0yyVP3MwWoNGoA0AlI09uFWsHkBZcGKZZZR1y0ostyy3TJt+t7ONgknLk83I5fFtB1y06Gf0F7oCwJ+WHD8ZvGVI6Kr2bZRcvkxT4IzqUspwPM+ex1rzBIpKdeu4Utk3sx4PwZRHpZP22dV/nigvFOod27qmrQ8YjREr3A6jo/Tk5Vu6G3VRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ubSSabi1DkbNzk7JOVGv3+ttjgZ4hE49pYPgn/BH2nQ=; b=XetBG/cUle5n9GjqczmVVV0OEJF0epfVWHb4Oz2wCHv5lhwPtcok9bA2QhzrlWn5Cw+NvpeQGp6qNlymSCa5WImcnQavnsxW7HJbwbsRdFFZNhWcajuBuY8SZ9j5pyfTsnF0Mi/Fjvki6mYRZMO3Y3e4RKTpQ9sCms3y03oxCP3HlVroKODwegr9ChYGQ+GnU2qr52sSHSHJBgXUA8c4XoP3ieuGUS3FQTgnszuqBbxDc4RaVNl8J0c7EQWg3AChPE9dOQi56dSccqUMrsZ6TnD4snnx6JSaotM5rKSeqB4C0n4C5ugJALhUtbdX1ke+6jvg+/murPiyekS9Fd2Qfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ubSSabi1DkbNzk7JOVGv3+ttjgZ4hE49pYPgn/BH2nQ=; b=pxPQE8wEo4d/9INiPqiX194CoOLmCWRjKN/7lr21dfW14Rf897vbhI/1/0xr+0yxotBsz+b84lqMvpuOOXVUz00hQ1ohZh7uUowE1LGeYmUy1LHMjvgVCJjYTfJLPO1EIHB1h9FR8bV4AFdjjjhvk08+zxIuhy22e0pHUhVlnJs= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:15 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:15 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org Subject: [RFC PATCH 72/86] treewide: crypto: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:08 -0800 Message-Id: <20231107230822.371443-16-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW3PR06CA0030.namprd06.prod.outlook.com (2603:10b6:303:2a::35) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: a0685657-119b-4024-0c99-08dbdfe68fdf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hibqIQmikvZLwNkxQY4XS+5+SO+jl4xJxbRXH4cFnkdaKgM5Q0t8V0b+US/7x9RV+5ZY8ZN17yN0FXS2waFxSwIa4dlcNy2z8bQPEwTKJC2Dy6tkpNNJNFoNiISAzqoGJuc7gJl79rozI3XtJAc+pA3MlDBPxnNTzOW+fbwnulTqHFpKfJUFuaKT5u44UcVz4I7XYsqM0xkRoe3QzdH/XgD+Y8CJ/JIw9lA1zGtrJs6vs+mmpewj9uXF4DjEk0FjyotZEIrT6U4sBo/chq2D+t//jc2Qi6Z0shWkD7O6bihx9QAnc2CYLYQ04Ej1Zc6YsrqX3GEv59GFMwPdPqMBHem6ixirHGNJVPzfkwN/T9YV+qiAUM185f5diqw2Nph5/M2Wa0GyX3S2x3muSx78ckeJ+wS+t/0DXa/rekv+zvj7ql8wtz8lJC0DUpo9MxQT6ntg+hJ+cy74Qpaf+ZPXSxLySHBwtwi8n9J52LlIxjVw99sdNI/8Qmw/J9W0Cdjxq8PX2b6TfWl2HGHO9ZOqofI9YDhl5GHUqFRjE8FUQys= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QmFaoxhvLBr2vpNs+/NpvQkDp9gX+RETONYKJ+9C3SRAMCYDuqsJXdICA8HujOSmNETNiODgZrnuDhpzhhT4H/0fkFWVteTOl8hEZDoAhNUZqjsWHOCI8KHdTmlMvbBuo2Evf67viojuqS+fogHKFuHcjNBKvh44Q0L/9WgOyRUoeCsfjdq93Iz+gGIzhIwM7idlDSU3Ne6h4Pbx4va1gHF143X9dAY3Rb9fyi/4xQcpPmF1FS6Jzzc6jEXVHKVxtSesSphhWvNHN9VD1n62HWufOqQjetIa1hRlLV+SfYdMD88DJOt/C2kuLvJFs2rjwgshQd3JBmX29MtuyNDqAHP0LhdXHG3ENG41FuRTaHS611xD2UDwVLEKnsDUqmFZp2kExFZIraQnO5S/b2OLrCpEVMVHl9CcUgROLH1N/E7T9YmL0ItpFiFL+7GMiA8IsGacxyPp3/owj46vrnHKzP/py/P5ycBFZvt+8qAWycxFm9+vs3Y4osHT7Eav0uZmpF0qvhbYMjH9g0em08PjHxl26kHSx/io6WjjQC3lYCueAh4DE9tpfSPAx1v1U+P3fiX/ZJbpN7vvFBT7mewJw+wr0RKi3UMIcX2tjn7Gfkgnuk9dhQ2+MWNQyB0KBkqQH8CwUoV2Zw7k5G2n6AgGoIYOpRMsMDyAdkeFn1DylWIIbHtcE1OTWkkmbUSJf13h57pVa5BbAE/g/xHsLYI0XRytkDFw9vAfWzjD674Z9SRd6fbo+MX3c45lhkWCoijLJ9/zrbS7c8AKYrT2T74My+hOD44rRqIQEDk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NbOr3LA/PQQz6jqBSufMMKrdY5vSzVJd8ncT1281QuPiMGFoXVgM7xXr+wiIzjg6tUDUSOizsCiFazCmRcMug+oSaBrEAiUjDGaZa1vDjQgVqstnBngXoKzSKu39XA29ypDQW9Wdxrzla528wYgsQ4P8lO9iH+pIBR7kxDY/W8WwNW52nJLW/1dFIRw0BLhGdcNHnrUPHpy+d9qfIrsOK1j4Yc0Jbk8e7a7QL+P8dgpQ9E+Njw8D+rDtKSirMwOcK+8pxioei84zdnTTMZpOoqE1cEBX7Gktvxj8JuYwMf4TsPwQsb3Kwjxi2tYfwBzNcj37/nAtbJEde2oTzPUquLaAkgsxjGEY31XwtPXlEbqRcY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0685657-119b-4024-0c99-08dbdfe68fdf X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:15.4081 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2NtKdShpCoQXoEBFJxwexWGscaOH2LbU/az3HIrsmxnJiWIvK5khdqb6hfxzH6htdX231YkmrA1dhirZsquaXJQeJddPaHFOtKY67eCFKuI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: 9yKLveNn3SwzMjm7TqkA5NJ6G5vwuK7o X-Proofpoint-ORIG-GUID: 9yKLveNn3SwzMjm7TqkA5NJ6G5vwuK7o X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 44048C001A X-Stat-Signature: ipipo1pd9r47m581cdz95883xpcu4cjp X-HE-Tag: 1699398583-682833 X-HE-Meta: U2FsdGVkX190eAr8uhvu9ETcj5wAcGNo8popC6iAlH+E/a9YApqkWXSk7Fb7r5yQVpnzZi0EDsjSVtTc8ScLClMk+v2ajEf0X9EE1da8l+RL+bukQOGdqnT4BC+KmGvUu1aZAgwPKczFyQ8L+ns8UlTtdTK3vyXuH74NxdnY1YXLM51BtUmHe+u4/koBOsbXpI6VgL1OKstBRamkGqQEjYkcAKcLFwPMh/SuSbU1UEwAOOWyrIexWsEZq8Yg9TxTerkAWqQ8f0709UQmIDuh+xlBvGeXRoK5QkoM3zBf4JZihafEjjFmGdSYsq9REyRxH/yYi65ry7c4TNE/sI6hxl1IrWbGvgjAZj4Xm88m17Upy/aml/VAyXA5C81Rnp6eEOmCQOAZYSDGezUnBTDJibozQvaZ9KMUwy2/MCusaUW3K6Ds2gK7WdwO1Zo2gdk+MAeSoXO5cKKR3SGjiXEBlq5AIF7DYPn7yo+0mFhHzMCt90RbAB9xs96n5KmJnKb86Zyyzq4LGcxj2ZUvvrBzWz87EXlX4MR+ZnTkSbJcATdf6tA4w2QHZSRGFXwwbuZyQJwVjbqWKhtCO2WagUbOQZL0sdqwmBlQeZa0Qfzg3SSyCf7F9gdIqbVkUFuuDSoxhkh2ODhwxn3IudmRx8RHAjs70YWZkOVDFE738rCS7RcPoYuyTh70cyFR/bNtvwYMDH4xDxHezY+AbADMRtMnzaOLI4QSJWmGkGWm3EEKVIQQfcAjipGggzHzffmiOt1Dlkd17JQCGFjQ+Mrcu5CWauLPWXqPsNLeMaPuyvKh917WIAFkiCqSFUFmsgRrLcPhwYqj+R946wQxNgk/OQRA8VjcLSfKgp1vb9MfyUZfDja7E2n9SejXmYTRaXpx5bjU4YrBgAwiVaAGKKx9eVXhQgW5BZUscwD8SEopeev51EhhwNZW2/+6vPJLc97mjeSE0e//prmxuf2obsO++XP W/qG17Aw 15bvL9bLBhb5bDaEHISOkPo4E2yxpshtzQltVNbEnobvSgiAPamFc/BgkYx46L205lKBOk04uqCtN1Q1b3H5ox/zjv6GDVJth53QZNPZqGOjbFiz785PuDT1TkD1/R79Iql0JU33eR1ZH0gQGy3YZu+6tZA640onUuWIEM9rWjTFv4AjM4wm3UgniNfi9vKk3uDDXn+2xMGVck2r9J/DFpaVuyGtd9LyKLdygRkdrQ5QcKyjRs3nW6NTca1dCoFQA/u8TXk99y3gnPD4bl0ZWU+J8JC+3JUFZFPusN1nFqt3CCxQ/wWt9fyg/H3AfwKNiTQ8EFv6xq/N0VZo54LuXwGc4vlo6TiW0ELMlYPoyVgIklThc7BmNC1QXKiDd05sKdmEz9g01y3UX6ak/myJbM2R12gd0tjryf9uWOB0dhT46lSXQxbGeo37ALkhqZF3YRTLmrwgNeH9vdvnNT2JGYo2EFaSrQYfCwm+j9vAZKMEDpq8PfLQc0uXwOwPHFsNeoLs56bshUzTaUPmpNQO8htKFI1Ks4HxLKbMSnsw9+DpRRSkZ1u0osHcvCLtVklM35N1dqAdkfPa2E/OamR5rpcx33zTtSXG3fKW3PLCBgHONHlSrVA3N7XBTjdDGk3yakV7m+smuPecfx7k= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the cond_resched() calls are from set-1. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Ankur Arora --- crypto/internal.h | 2 +- crypto/tcrypt.c | 5 ----- crypto/testmgr.c | 10 ---------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/crypto/internal.h b/crypto/internal.h index 63e59240d5fb..930f8f5fad39 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -203,7 +203,7 @@ static inline void crypto_notify(unsigned long val, void *v) static inline void crypto_yield(u32 flags) { if (flags & CRYPTO_TFM_REQ_MAY_SLEEP) - cond_resched(); + cond_resched_stall(); } static inline int crypto_is_test_larval(struct crypto_larval *larval) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 202ca1a3105d..9f33b9724a2e 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -414,7 +414,6 @@ static void test_mb_aead_speed(const char *algo, int enc, int secs, if (secs) { ret = test_mb_aead_jiffies(data, enc, bs, secs, num_mb); - cond_resched(); } else { ret = test_mb_aead_cycles(data, enc, bs, num_mb); @@ -667,7 +666,6 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, if (secs) { ret = test_aead_jiffies(req, enc, bs, secs); - cond_resched(); } else { ret = test_aead_cycles(req, enc, bs); } @@ -923,7 +921,6 @@ static void test_ahash_speed_common(const char *algo, unsigned int secs, if (secs) { ret = test_ahash_jiffies(req, speed[i].blen, speed[i].plen, output, secs); - cond_resched(); } else { ret = test_ahash_cycles(req, speed[i].blen, speed[i].plen, output); @@ -1182,7 +1179,6 @@ static void test_mb_skcipher_speed(const char *algo, int enc, int secs, ret = test_mb_acipher_jiffies(data, enc, bs, secs, num_mb); - cond_resched(); } else { ret = test_mb_acipher_cycles(data, enc, bs, num_mb); @@ -1397,7 +1393,6 @@ static void test_skcipher_speed(const char *algo, int enc, unsigned int secs, if (secs) { ret = test_acipher_jiffies(req, enc, bs, secs); - cond_resched(); } else { ret = test_acipher_cycles(req, enc, bs); diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 216878c8bc3d..2909c5aa4b8b 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -1676,7 +1676,6 @@ static int test_hash_vec(const struct hash_testvec *vec, unsigned int vec_num, req, desc, tsgl, hashstate); if (err) return err; - cond_resched(); } } #endif @@ -1837,7 +1836,6 @@ static int test_hash_vs_generic_impl(const char *generic_driver, req, desc, tsgl, hashstate); if (err) goto out; - cond_resched(); } err = 0; out: @@ -1966,7 +1964,6 @@ static int __alg_test_hash(const struct hash_testvec *vecs, err = test_hash_vec(&vecs[i], i, req, desc, tsgl, hashstate); if (err) goto out; - cond_resched(); } err = test_hash_vs_generic_impl(generic_driver, maxkeysize, req, desc, tsgl, hashstate); @@ -2246,7 +2243,6 @@ static int test_aead_vec(int enc, const struct aead_testvec *vec, &cfg, req, tsgls); if (err) return err; - cond_resched(); } } #endif @@ -2476,7 +2472,6 @@ static int test_aead_inauthentic_inputs(struct aead_extra_tests_ctx *ctx) if (err) return err; } - cond_resched(); } return 0; } @@ -2580,7 +2575,6 @@ static int test_aead_vs_generic_impl(struct aead_extra_tests_ctx *ctx) if (err) goto out; } - cond_resched(); } err = 0; out: @@ -2659,7 +2653,6 @@ static int test_aead(int enc, const struct aead_test_suite *suite, err = test_aead_vec(enc, &suite->vecs[i], i, req, tsgls); if (err) return err; - cond_resched(); } return 0; } @@ -3006,7 +2999,6 @@ static int test_skcipher_vec(int enc, const struct cipher_testvec *vec, &cfg, req, tsgls); if (err) return err; - cond_resched(); } } #endif @@ -3203,7 +3195,6 @@ static int test_skcipher_vs_generic_impl(const char *generic_driver, cfg, req, tsgls); if (err) goto out; - cond_resched(); } err = 0; out: @@ -3236,7 +3227,6 @@ static int test_skcipher(int enc, const struct cipher_test_suite *suite, err = test_skcipher_vec(enc, &suite->vecs[i], i, req, tsgls); if (err) return err; - cond_resched(); } return 0; } From patchwork Tue Nov 7 23:08:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD72EC4167D for ; Tue, 7 Nov 2023 23:09:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D91BB44018C; Tue, 7 Nov 2023 18:09:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D1956440186; Tue, 7 Nov 2023 18:09:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA7FA44018C; Tue, 7 Nov 2023 18:09:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 91088440186 for ; Tue, 7 Nov 2023 18:09:42 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 6F5BF1A0B5A for ; Tue, 7 Nov 2023 23:09:42 +0000 (UTC) X-FDA: 81432702204.16.17F8D53 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 222FAC000D for ; Tue, 7 Nov 2023 23:09:38 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="nJNbGz/c"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ECFjFb+W; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf22.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398579; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=R/hYm+6UpgYu2D4nwV1EzaFtgcD5UvZV9N+HgAKvyLg=; b=7wvsgqBfuKcZMXwfgXkiA2iGQxod5kG0JhNIlmotniv4/HQOycET3/51I78pcxl8edXj9k 9be3a5+kEtrLLQI4lMtMDN7SRa6n08VbUh8je6PaBI0bc6aHaUAiVm/8rnOv/ED+MIFYQA D3bMjtgHSE4hM4jC5+wvT6ERxhoS7nw= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b="nJNbGz/c"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ECFjFb+W; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf22.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398579; a=rsa-sha256; cv=pass; b=ZvxZSUjU4dcvKM8Qf/mbdLrXzjUDOrcFsoImNPXYF8EHbETPR2caH8om1NMusM6cWceR4j T7U6pkhPvKSbxQ73VYEABpgyDWxAtojnZAM50pEsZb+WHPOhYvoOOiDpxFvUA9yWuI33eD lNke+bGdd6by4G8neYiVQwdkB4h8rsQ= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJmiC026251; Tue, 7 Nov 2023 23:09:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=R/hYm+6UpgYu2D4nwV1EzaFtgcD5UvZV9N+HgAKvyLg=; b=nJNbGz/cqGLOU2kfVKfE+weasjvj4t431B1oj2A6W+oxBG7M9GkQBArN6WnzlzYx6Ihe WvmhbqrMsRd0NbQy2vrJhgyX0bwhh6tXCskBmk8WzUek9DEgdtpQ74u+G10fFN67EbDC cuqwT/0kE9ZPNvOIjURu+p9GOZfLSuFctaonrLWVWQovsDMYOcQf6RDYku5nU1O+JTuT xqcPQJ8R77R1m/awnZGjJJsjVfu9wFOvDJJE8Ykuw+VefNOzsmYoPK3jxSvCGWTcaovI qz/oU9gCCIW1mADG/RHJiff6CMRmLYfhMRQo8iFi5FwZ5R/OnyXPqHsV7PkPyVYbLA8W Wg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106w3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:21 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N0wAE000486; Tue, 7 Nov 2023 23:09:20 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbu8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ou4zTEkBUYqNcsJ10prmzGTYTufFLVa7RuqqepPKLE/SuCH+wdU4jUu/WA4fcDs6V4Am+ZhJaptdhsPzowimAkFim/YDWwwMDHYpj0M+5z0/lqJqPfLFv8qEou7eb4H3cogVvDhIeqxFopf336fqG23mDKLuleVRIaHk+UjSQ6lcLvMj1VQoh26F1NeiR5X+31Qrir+eBhFEgzntmuWHKIae1j83ILHCTHFmuWxWtpKW1nLZYFtg6Ep6P9WNIKUKVmXTzj0tzr2F+NKUcKmZLb1UvUL+5scd6jPRg7IsGgneVwqCDrdmVwZG2kea2h8ivmM9MbLodSZPVjrjjXvRmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=R/hYm+6UpgYu2D4nwV1EzaFtgcD5UvZV9N+HgAKvyLg=; b=gI1eAxv/0UaSkn8DpLta3AhLoev0bknHxvuoRSfmetLn52w6Jh1AQV+TxNHHAlndDAY7SuGVLC4v8dmXNhUWFjormp2GW4+dkaYhES0+fUdmPKZOXeOETX0ne8YBssU4VCMVtKEMEDA2fF/2xk1dMjTwRsatdXsPW2QlGvC1C1LbJZYnuRU9SYrTXzYuvDzaXF9HRARB2jjqol8Lkl24BP5Om0DjpDQtrN30twhdghtpY1DGrF8QASKpjc+Hc36b7+AgRJfk9SSvwcNpifHeCEtDSoChdGlxkGstK9M8/yOD9uBD5dSuLSo52kdynVNY4/Lk6vYu0mBbStW3uw9rNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R/hYm+6UpgYu2D4nwV1EzaFtgcD5UvZV9N+HgAKvyLg=; b=ECFjFb+WiMoYuaB3bqn5C6b2+7HeWoM8cZclyJ1ieVC4ZCPiOrjOZ1JnTrQzOJXhJzFgGVK4WnvQpyNP8Rr0WWfXRbJOdY9MJIMuM1OGqvoawsVAUYfMbR3/WxlC/s7eJjkukqCxRrkZEQaMahK5I2+0xXF9UfVtbE0VMQBkAKw= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:17 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:17 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , David Howells , Jarkko Sakkinen Subject: [RFC PATCH 73/86] treewide: security: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:09 -0800 Message-Id: <20231107230822.371443-17-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0085.namprd03.prod.outlook.com (2603:10b6:303:b6::30) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: fc875e78-9314-4b48-fd66-08dbdfe69152 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o4WhzTLWPUetpvaKEHJrZq+FeoVKDic+D/DH0n+/ZOJXPKGpPC5rUemM6n6NPfbpI0MQFu7vtIvwbWsBpF9Qcz+N6qegBdtSLMZ7odQOI/ksnojpdSGhbHP3FCfZ4D9lXFG0X4WRkWxqJIEHdp2HpZhzAgrtlPYW29pVzUXP7MiMdEj+h/GhRMwembqIKmckKg4wdw5ftRBhaeGUuKHjcpebhV2x9NqguDiagpAvBdL9jrGEyeZE8KTGzaMvA4i0a6DD/6rKMmbZK+nWGq623VQ2ivcTNui5EHF9g0r/+l65RsrhoK1nIS3eiT4uCNwjyVA4G1Brp0uz110bEyciXf1+RAdYuk8YmzbVs/sI1JR09i/brPgYcQmQL7NRviqgE+SPnRfFgYQcRus/duP+x8z0D3riI22L7OH4HbyRZqB3IX+yycDEXzujjUlAUdP23brm4trNRmrLrn1suOVXqrO8Kxd5FQPHRdgEUS2UNEm/TMigM8lHdvFzfOmq+o/VDusstbFStQiJkNV79GlihwNeESWyN7ylpT4OXqLoDB0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(15650500001)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uiyCLqV2KF2iXVLezHeHzrLCaMu6cXcq27aWe93T+NoAMmlxOh40dFkViz1/ycMUZSZHyeZve4M4mUKTwC+DFS79AhDv2R1JVLmdA54o/rgj8WCCOc800IpkGMHuGqVmj/ezsXq89EdCPlpQFG9Ynq495EyYtOoJ4gRfvqtq7aUUdICdIhWaDGMLSDfaaABpTVH1ErClHJbf2XhMv1M0R9UaHdKmaZ1eT36kfRXtW3zho7t5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nxv27tJyXQvQRdYR+FG5tNbB3X66amk0VG0z96nKqJW4mT6CGI+dRlLy6TE4c1LGmsOdb9+2Z0omcypSh5sZMHi5cj7C7Oo27xC5Hz4NNAYouo1/lMrRCU13ofuTt8xqumPwO715AMiKyp9Y1Tb424tqEafNa4goWXv10OU/senU/6i5d5rCu5redNUr6S+wL8VqpM8xkppAYel4/dHs1fVZKi9KrB+HAC03r4nzUvJBAMF2pTOSXCxzMjZqCziVcpyF/4EmbGRF8OT9W47++ureDjOwzOuUJ3XqhbtBDOsOTEkZpD+6g== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: E0kmZaXaD8RqNN2HYwnjv2Ax5xITzQz9Etg4A2pGV2yvNtZrL91DIgA/XcEGGq41Ma45eNK8y9BNC8Pcr4FIR1GjY+2/ynE1DJpzkXSbTJyiJy8D1qHCaYJKBqPcnqeXSrdNkZoCoV2qV2Wp/y+5oREbmHFm0UUPwpFuN7NOiSnepkKWYKn6pE7mkiU3t0LXQoPA4oZV/5LWta2tm6AaClNPRu2YjFMMArnWnxebgYVCLenE+FbU6IodSHtran+EWIYH9uHKRvQYxAXkpDtVLZ4f3jvvILbR8NHSB3JlsF31J0wkin/f99lv9RBK8AkAEjbNRwQUZolhhg27fMkH3AhuKXVqJjmSEQCucOxzLRNmEFzqiKEz5WvOwG8eAJwNFzz9SEDR1t4xmrvyECERms8Elg0dVan5taBp2Dnrf2WGFk8Hx5l99KpuXTDWVL+kRpCK572aUm/kP6OrjuLPCFhodSnZTtZS2klku2K+Ue8STn1Dau9Zjgi33gTHO+qhjbrXudlLdP1DPpzO2LicygJNhA+Rf5aApm75odD0sMhNk7+4dqKP0j6UyUlM8Dit5pcKFVZLW1wFivT222KLIzfHMgHVV9B7Y6xDAgQ0jWOjNzBaDeORBUCv4iiLJ6yr+mtQzsYuvs5tQUKpS+KECmJzYC88i7AocGioz9J34R52IeF13SsUdXWv91+JJ/eBZ5lDmDA+iL6BltM8qNWuoCYCznZJgMo4cMCJF+fCu+XADAD1DQ+Ywpg8sqYZFdBIg8r7UrnA/BzR0cj7xZeiGfX6/GkqWf4DG0FJ/qjLONaLsrst6OFXbpYAAlANUDmxEdt9LsTzi1QtIlK3jHAxaGOah4gFUOyxz0a+7XOsuulF3XoAKVwl1qsIj4Knfua+Hnm17mtWjWalCQTZr1Um7dMh5iaNPH3YJRNnF26hWODX5CExDvbKA2Ob1FrUJWEvWs5k+EBtjRosOzFousrH4iGMLZAwLGBJX67ywHPw2C+hEequ7ixMHyrH68dxVedIFQiFmiBETatdj0403qGMq/KwYd/rz26IXihQuytkMmkbdkJptmvgAJ7lmTWz1Q+4Ka4xi3Ud3zDKrJs+Rq/UcoIIxIzxcKBp1BlzhpPUg8sPDawPkTB/78z/zYVa12aDwRc/DNA3anirjXvakI8k7dZFvYWVv0HDhz+MToAVCY15KdMxG8Y6rA5Uqbj7jYWAHZryLlZzSVo3YzppCtEtNw8lK49mKcLAmnVAHQr2+SroMO+tZHRJ6W6raAk0f27KLYYMtS+lBbNl7GIiBCGuHsfOfu2XyE+Mta8bK00VzjvKAOWnZ8pYNzaL/A3Bb/VvFNCJEWt8g4gPsmipet6P7N+OGoo+gUMlbzRS1gYnqTKsNu/dX3BjaHEMYL1cUs2NrIXw7oYoSrrgtOh9cmCwCTJIdzMgKVwMoMBKd6lWhISQ7y6mvtrU2YZORyhfJFJpcol/xS3ERYUw9VK+ArYtMokIrAgmzLqZopL2LBxBW6ZHGV0W37EMTdNIAwpcaPfHhHkHdYESg0xiplfbTiUgxw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc875e78-9314-4b48-fd66-08dbdfe69152 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:17.8153 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Mj/rDjxBkssStkl6KSCsYLj9aeF0B6kiBWH5xX+gAxm3FdofYqmMP2zLe43iIhgNt5RnNKGSnhJCwpixsEBDBf+311u/aob5evRRycymMyA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=979 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: FwqekP0cdJ5Cd5MSapeXtZ_AVs2DNsHW X-Proofpoint-ORIG-GUID: FwqekP0cdJ5Cd5MSapeXtZ_AVs2DNsHW X-Rspam-User: X-Stat-Signature: gbksypngjgdbu16x5hjqusx4oqtfr7ix X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 222FAC000D X-HE-Tag: 1699398578-192799 X-HE-Meta: U2FsdGVkX19ngEYZl/VNNGDvNzor98tMVwNYywOS/Rjvhupa2FC+kUT+Ydm6//nPyML1kTFxQdm67WnX8JecYxSFuHUH/wHWlk2cMaBgrM+ZQY/a64+exz/Eb00ErOJckP+vHDHfszQouZoPtgnLDOBm5V7MrJpqDPQPrLlHdunfgRXVhOya9Hb1ammOjRDPcW9vEbdv8WBc+xAO5dzCkYeleg7J5+z+QQtWRt98EgS/sOWBJaEis1/Xk1s5yi7Ib7pCMF/ezWNiUUPmIsiMpO5z3AeqtslUhRW87HpZIcdhKm9XM3WWmRpzigDl7Jz6o4QdGS5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XTZyJdqvZT1j9tdXYtTePjjb/nigpJAwOkNK+u6qrvy2ZmZ25vLcaSOKPkhXeEaWavlRWntvYSgw0/5mA+kDzwiBnNcbIC0jBQAlTVhuMFYffczp5t8fOpMa44hzaFV4McTTLhOJcSbk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the cond_resched() calls are to avoid monopolizing the CPU while executing in long loops (set-1 or set-2). Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: David Howells Cc: Jarkko Sakkinen Signed-off-by: Ankur Arora --- security/keys/gc.c | 1 - security/landlock/fs.c | 1 - security/selinux/ss/hashtab.h | 2 -- security/selinux/ss/policydb.c | 6 ------ security/selinux/ss/services.c | 1 - security/selinux/ss/sidtab.c | 1 - 6 files changed, 12 deletions(-) diff --git a/security/keys/gc.c b/security/keys/gc.c index 3c90807476eb..edb886df2d82 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c @@ -265,7 +265,6 @@ static void key_garbage_collector(struct work_struct *work) maybe_resched: if (cursor) { - cond_resched(); spin_lock(&key_serial_lock); goto continue_scanning; } diff --git a/security/landlock/fs.c b/security/landlock/fs.c index 1c0c198f6fdb..e7ecd8cca418 100644 --- a/security/landlock/fs.c +++ b/security/landlock/fs.c @@ -1013,7 +1013,6 @@ static void hook_sb_delete(struct super_block *const sb) * previous loop walk, which is not needed anymore. */ iput(prev_inode); - cond_resched(); spin_lock(&sb->s_inode_list_lock); } prev_inode = inode; diff --git a/security/selinux/ss/hashtab.h b/security/selinux/ss/hashtab.h index f9713b56d3d0..1e297dd83b3e 100644 --- a/security/selinux/ss/hashtab.h +++ b/security/selinux/ss/hashtab.h @@ -64,8 +64,6 @@ static inline int hashtab_insert(struct hashtab *h, void *key, void *datum, u32 hvalue; struct hashtab_node *prev, *cur; - cond_resched(); - if (!h->size || h->nel == HASHTAB_MAX_NODES) return -EINVAL; diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 2d528f699a22..2737b753d9da 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -336,7 +336,6 @@ static int filenametr_destroy(void *key, void *datum, void *p) kfree(d); d = next; } while (unlikely(d)); - cond_resched(); return 0; } @@ -348,7 +347,6 @@ static int range_tr_destroy(void *key, void *datum, void *p) ebitmap_destroy(&rt->level[0].cat); ebitmap_destroy(&rt->level[1].cat); kfree(datum); - cond_resched(); return 0; } @@ -786,7 +784,6 @@ void policydb_destroy(struct policydb *p) struct role_allow *ra, *lra = NULL; for (i = 0; i < SYM_NUM; i++) { - cond_resched(); hashtab_map(&p->symtab[i].table, destroy_f[i], NULL); hashtab_destroy(&p->symtab[i].table); } @@ -802,7 +799,6 @@ void policydb_destroy(struct policydb *p) avtab_destroy(&p->te_avtab); for (i = 0; i < OCON_NUM; i++) { - cond_resched(); c = p->ocontexts[i]; while (c) { ctmp = c; @@ -814,7 +810,6 @@ void policydb_destroy(struct policydb *p) g = p->genfs; while (g) { - cond_resched(); kfree(g->fstype); c = g->head; while (c) { @@ -834,7 +829,6 @@ void policydb_destroy(struct policydb *p) hashtab_destroy(&p->role_tr); for (ra = p->role_allow; ra; ra = ra->next) { - cond_resched(); kfree(lra); lra = ra; } diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 1eeffc66ea7d..0cb652456256 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -2790,7 +2790,6 @@ int security_get_user_sids(u32 fromsid, &dummy_avd); if (!rc) mysids2[j++] = mysids[i]; - cond_resched(); } kfree(mysids); *sids = mysids2; diff --git a/security/selinux/ss/sidtab.c b/security/selinux/ss/sidtab.c index d8ead463b8df..c5537cecb755 100644 --- a/security/selinux/ss/sidtab.c +++ b/security/selinux/ss/sidtab.c @@ -415,7 +415,6 @@ static int sidtab_convert_tree(union sidtab_entry_inner *edst, (*pos)++; i++; } - cond_resched(); } return 0; } From patchwork Tue Nov 7 23:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB889C4332F for ; Tue, 7 Nov 2023 23:10:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 61BA24401B0; Tue, 7 Nov 2023 18:10:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 59D70440186; Tue, 7 Nov 2023 18:10:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A8014401B0; Tue, 7 Nov 2023 18:10:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E7A7E440186 for ; Tue, 7 Nov 2023 18:10:06 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id B9831C0BB4 for ; Tue, 7 Nov 2023 23:10:06 +0000 (UTC) X-FDA: 81432703212.02.EC019E9 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 246CD18001D for ; Tue, 7 Nov 2023 23:10:02 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=pYadvMyq; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=f0exSD+t; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398603; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iI2Z3QGnF44r/VGe5kI4eNp8TGYVc1L19RakcS48BlU=; b=vKHK5FKs6LYYY1FHJgWxz/wUTdKHF4tO4XlBXPRn0CzaDJd1NBFXVzreu4oLnif6zJyZjz kAj5g7DLam2dBufJuJsQbZ+MJF7hnJcL/JpbtHB2z6L7TVg6HHOjs8b+jKdNk6dbGMt6mE jK5O++ITpyIfpZjgynclvc9MSljADAA= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=pYadvMyq; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=f0exSD+t; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398603; a=rsa-sha256; cv=pass; b=QRqKBxbX416inhuQPapwL10gM4ZifHqm046qL7jBNK3EYzdzY+9drAb4UO0w6c1GFG6MlR phajJZ/N4H5xH3Dw3XY3c92a21luc+2YLn3Tg/TbtEgck3RgtNQkORcVDKMEEHijICfKlk o22S3LzvrdUT5YlSYZv6Qp6fLuQ4A/s= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJmiE026251; Tue, 7 Nov 2023 23:09:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=iI2Z3QGnF44r/VGe5kI4eNp8TGYVc1L19RakcS48BlU=; b=pYadvMyqtrF0Ncsp1kbsZpldOPd3BhzqhQkwf3QGCWYhKHemV3kK338tweFb7QJQODYf pEhxHkz7nosUupobERyiNVki8REVg8UtMh/42rSdGOX7Jejon4m9jd3yYjnWaRP88xDd C0ka5I5eKCnPKvh9B46ZGpZjPuVS1VXPijLWN1RbjmaX0yhIsajij7HK7jlM1rEXRa9N WF4VRLXYUAu6t7iPxjsV3c6SGeZiiAOxAfhucArgxHGRYBZzw8nGfjdewrrOvR2MRv9d OuclhXR7sXfw8Zy4LsDsyp1G5nU+nwUWqWQmPqFYY/atacLijtr9fv4xlwSiCbfPtvdq 7g== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106we-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:29 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2B2A000412; Tue, 7 Nov 2023 23:09:29 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbxd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mZ5sUelAiCyFi5dQGV9cXxGARepXF9+g5/5ouGl6fmVg7bA/FXQoZrYhT8QmeuobToXgFdcu7x/nGBgUdBzL2VJN7Dk1pSHus9fGRfKWYc1B/J3nrD4fnL4gwtHHk0GfBo8V51BGHkeA/iOc0jpP55/WL/h/klex4uxuV3ancPvvujgltTODf9/iEuMn9zoc/SNhP/jGC6ofhhO78pLBdRkpue2/pXu0wdCUvlM7jLoEGevp8VqdJi/vgTAxOv1tg1DkBFZdgD3BS+gBc4I+n4+9mz3p+8xM9yvHsvTEAI1JocxcpHAc4MuMhgGSePIS1+zDD3nMyVvo2OKF+vzsbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=iI2Z3QGnF44r/VGe5kI4eNp8TGYVc1L19RakcS48BlU=; b=lg77OHjNczXROHfih1bKEsri5+u/OCVCxUgBW5/08AebtA5DvnRGQvmp90ayBTU/mMPJpZR9q6XfM06U4dkq48x4JSSKZW92QYsDCjQ1QQWa5zJu6DAYqDys914or/R9TLrwr0fmNBaqYVMgW+VA4urg/rJLT0DimCbvLhGRGBftKB0q9xJ/Z6aI9lOq9CO8jp0o7nTPsSUQuQpr5AUDeW0xPc342upaFlF49/gKaE3eKOFqYNHWngTu15/FiBZ+cQ6vUTaXeD3LnG+cp3Frr7zRoCNkEiJzEHyIm+w0obHfIqGP3MmPslrXhurFRO5LLxPllDhTMWyNPT3KoUnmdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iI2Z3QGnF44r/VGe5kI4eNp8TGYVc1L19RakcS48BlU=; b=f0exSD+toRJOGBMGO7t1lXxrXgQ67aTwLzP0Lo4Q3deIOt3GhDJZ3SdSLYn9hnaq/UuxJ9QkZrTKqgmXpM6rZI9Q1WxQmE/OQCzb547UPndIeVhXf3n7rUAee+TNZgDpS4U5vXfaDTxPLEUhJXRrZxz2KPtf3aK6fBMHxWS+s3A= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:20 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:20 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Chris Mason , Josef Bacik , David Sterba , Alexander Viro , Christian Brauner , Gao Xiang , Chao Yu , "Theodore Ts'o" , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Mikulas Patocka , Mike Kravetz , Muchun Song , Trond Myklebust , Anna Schumaker Subject: [RFC PATCH 74/86] treewide: fs: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:10 -0800 Message-Id: <20231107230822.371443-18-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0048.namprd16.prod.outlook.com (2603:10b6:907:1::25) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 1643603b-781b-4402-3c84-08dbdfe692d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vxkTOJJlyJLRBuU5Eeka5Fy8aebfmn7GodFPYqWIFwdUEwjGdNTwOqMuLelKM33md61AOJsxGnI1nLodd41mQT1VYyuVwzYco5M5oqth4KDpd8tt2N5uOIAPxvRRsAjV4xvWYsjo4OQ7OAGkt2Kuw3nWiIIP/Poo/6Z0QYqUXgtQZOQ+IJ5/7eiu0qGQ/1OobvrWNNa0cEyE5W4m7kVlxZvu9GJeJiQOsPp8H1eYhET93jWXY7B6Zko3cow6xVpPnf7knl/8bSlOK1cE++dLi+7DikA+LU5M3jtRpGRYTlvmxQMvKe72QF8cmb1MQep5oySJexsMVSSu6xpe2s5Vb4Q1eWuiSJugX5sxgM6SbQm7rOxfQKmou7UqfWV0aoYi76Fg+TNJuWZ1Vp4Pj8gEt//wZHhA7WusPM9o8RWL+ZRZRWM8PBRvca1NKrhUO4cacpA6mjABUP50Ngujz1Zllq5G/MV8xgi0XxfYN92HyWlTjCmMz6dk8p4FdyottCAGIzMCXvn7MpThcbFfhkjQfX8PgPTJ+M0OlljR3O+qsr0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002)(579004)(559001);DIR:OUT;SFP:1101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N4HPpOFSacvA/c5dGcyJI+xodhc9DZtP5ozbq/I8I4D3MR39GspU406OSMBTrm6jxK6NLA3N2AYZH0X8wF+JWZq/LewsVYEMMNRsv8Er1eoaCQluEJM8chWCcjfhJQ8JDnBcZ/1364darJledJW447J6kNTHVJvkm+WQyAzbjwjzn9HZP+SgEEj8NniT75sQeNSbEllOMQpvayKUzpyhngLDKHAn8lRmESxP63s1QI3rLc0S6IcywkcamuyzBzmJoaDFAtMfwvcR+pYT6V6DAxWTFTbo0ZAdJ1/1ijUTADOGb7Oy3AFPW6BXjILm1xYPAKTm22CV5n/yFCebn2vcEYMwLIZyBqMx/sT X-MS-Exchange-AntiSpam-ExternalHop-MessageData-1: BQauRdTe0rPrMMi+k6NO4sO4JLlu7hnvX54ozkjAUk87QQgC2kg1fkhWxf4L721V1pOIunIFPxh/Mvf87xN50Cg0cAa1fBy3rm0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1643603b-781b-4402-3c84-08dbdfe692d5 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:20.7166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jDGPCrVMOul0NDzE4gvATljGrg5qtYs2b80VluvkX2bTD5011jTIg6QgktmuHjAvS5D1uswhBWtA8u72wkx3MNBQjl9CBK26lmyNRkx3+Rk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: 3PFe85h7iLGwOPvpeoKH_wqGTfBhnMmn X-Proofpoint-ORIG-GUID: 3PFe85h7iLGwOPvpeoKH_wqGTfBhnMmn X-Rspam-User: X-Stat-Signature: nxp598z6897typs84piux6z1synez6wn X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 246CD18001D X-HE-Tag: 1699398602-474174 X-HE-Meta: U2FsdGVkX1/HG0g4fJqrMdFbD8nsT3NIFP42vf2Nla29ieJxoh6ketPonyluMBj2rAh7Fs1QJaSM8NSDvLyhxDL0Sqo1/x2AvPBaTWW5BiYDe0etUDpDrQBtlcVBHKBX9z/+2pq9m4DWZpn48v3M6bthXyfYTsNeME3Hl8YGuwLyZOD+WZpzeGkMwIVJFpOwFGii0TPwKbpNA9sLHKTMbmjNK8tTFuoAmlHqgIoyoCRY8rW377LmAmi1GlA6QUHdPdxZMnVTnQ5Hu5FLekvpFZDdOVmavI8NP+SzoVnvZDs9EzY1jvvxSGC7UUM1E7YwLqNt0RCc1WoDMbTsFPFS4eDD749264c+nwAQKPW3QFpRqsBuxyX+znVLuySRSRJBMQI5B5f+J8czHUeXdE9OV9mRBu+FMg/3X9er0cuBfNkNik9GVHsS/MAvvrqFR0dYzzRLZ4olZy4g8kSaWOpaGBhOq1beAJM7O5vNc4rEBD+FTgdPlqCuZ1qJb9oubsCYY+UmH3xwAGIChi223BK64WwCbYwvHltEldCp3TVMiDTk1K/45CJfgGU573qubNnHu19dvi49N+tqpOciAYb/As6tTeLKztGvxI8ZeAtzFW0UH0EEIcmOVR4NojYLxTL8kKbzjD3YD/2soTwD5ZhNPwC5hJtgQqY+x0TUzEU1S8j+I41YuNlUXAzRHZiWyY1A+xhHaYVgu+QderXhM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CldLKTTsn78MLJ1WOYPNeW2Io+0baykYKLPeDL5SYR9Scg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most uses here are from set-1 or ones that can be converted to set-2. And a few cases in retry loops where we replace cond_resched() with cpu_relax() or cond_resched_stall(). [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Cc: Alexander Viro Cc: Christian Brauner Cc: Gao Xiang Cc: Chao Yu Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: Jaegeuk Kim Cc: OGAWA Hirofumi Cc: Mikulas Patocka Cc: Mike Kravetz Cc: Muchun Song Cc: Trond Myklebust Cc: Anna Schumaker Signed-off-by: Ankur Arora --- fs/afs/write.c | 2 -- fs/btrfs/backref.c | 6 ------ fs/btrfs/block-group.c | 3 --- fs/btrfs/ctree.c | 1 - fs/btrfs/defrag.c | 1 - fs/btrfs/disk-io.c | 3 --- fs/btrfs/extent-io-tree.c | 5 ----- fs/btrfs/extent-tree.c | 8 -------- fs/btrfs/extent_io.c | 9 --------- fs/btrfs/file-item.c | 1 - fs/btrfs/file.c | 4 ---- fs/btrfs/free-space-cache.c | 4 ---- fs/btrfs/inode.c | 9 --------- fs/btrfs/ordered-data.c | 2 -- fs/btrfs/qgroup.c | 1 - fs/btrfs/reflink.c | 2 -- fs/btrfs/relocation.c | 9 --------- fs/btrfs/scrub.c | 3 --- fs/btrfs/send.c | 1 - fs/btrfs/space-info.c | 1 - fs/btrfs/tests/extent-io-tests.c | 1 - fs/btrfs/transaction.c | 3 --- fs/btrfs/tree-log.c | 12 ------------ fs/btrfs/uuid-tree.c | 1 - fs/btrfs/volumes.c | 2 -- fs/buffer.c | 1 - fs/cachefiles/cache.c | 4 +--- fs/cachefiles/namei.c | 1 - fs/cachefiles/volume.c | 1 - fs/ceph/addr.c | 1 - fs/dax.c | 1 - fs/dcache.c | 2 -- fs/dlm/ast.c | 1 - fs/dlm/dir.c | 2 -- fs/dlm/lock.c | 3 --- fs/dlm/lowcomms.c | 3 --- fs/dlm/recover.c | 1 - fs/drop_caches.c | 1 - fs/erofs/utils.c | 1 - fs/erofs/zdata.c | 8 ++++++-- fs/eventpoll.c | 3 --- fs/exec.c | 4 ---- fs/ext4/block_validity.c | 2 -- fs/ext4/dir.c | 1 - fs/ext4/extents.c | 1 - fs/ext4/ialloc.c | 1 - fs/ext4/inode.c | 1 - fs/ext4/mballoc.c | 12 ++++-------- fs/ext4/namei.c | 3 --- fs/ext4/orphan.c | 1 - fs/ext4/super.c | 2 -- fs/f2fs/checkpoint.c | 16 ++++++---------- fs/f2fs/compress.c | 1 - fs/f2fs/data.c | 3 --- fs/f2fs/dir.c | 1 - fs/f2fs/extent_cache.c | 1 - fs/f2fs/f2fs.h | 6 +++++- fs/f2fs/file.c | 3 --- fs/f2fs/node.c | 4 ---- fs/f2fs/super.c | 1 - fs/fat/fatent.c | 2 -- fs/file.c | 7 +------ fs/fs-writeback.c | 3 --- fs/gfs2/aops.c | 1 - fs/gfs2/bmap.c | 2 -- fs/gfs2/glock.c | 2 +- fs/gfs2/log.c | 1 - fs/gfs2/ops_fstype.c | 1 - fs/hpfs/buffer.c | 8 -------- fs/hugetlbfs/inode.c | 3 --- fs/inode.c | 3 --- fs/iomap/buffered-io.c | 7 +------ fs/jbd2/checkpoint.c | 2 -- fs/jbd2/commit.c | 3 --- fs/jbd2/recovery.c | 2 -- fs/jffs2/build.c | 6 +----- fs/jffs2/erase.c | 3 --- fs/jffs2/gc.c | 2 -- fs/jffs2/nodelist.c | 1 - fs/jffs2/nodemgmt.c | 11 ++++++++--- fs/jffs2/readinode.c | 2 -- fs/jffs2/scan.c | 4 ---- fs/jffs2/summary.c | 2 -- fs/jfs/jfs_txnmgr.c | 14 ++++---------- fs/libfs.c | 5 ++--- fs/mbcache.c | 1 - fs/namei.c | 1 - fs/netfs/io.c | 1 - fs/nfs/delegation.c | 3 --- fs/nfs/pnfs.c | 2 -- fs/nfs/write.c | 4 ---- fs/nilfs2/btree.c | 1 - fs/nilfs2/inode.c | 1 - fs/nilfs2/page.c | 4 ---- fs/nilfs2/segment.c | 4 ---- fs/notify/fanotify/fanotify_user.c | 1 - fs/notify/fsnotify.c | 1 - fs/ntfs/attrib.c | 3 --- fs/ntfs/file.c | 2 -- fs/ntfs3/file.c | 9 --------- fs/ntfs3/frecord.c | 2 -- fs/ocfs2/alloc.c | 4 +--- fs/ocfs2/cluster/tcp.c | 8 ++++++-- fs/ocfs2/dlm/dlmthread.c | 7 +++---- fs/ocfs2/file.c | 10 ++++------ fs/proc/base.c | 1 - fs/proc/fd.c | 1 - fs/proc/kcore.c | 1 - fs/proc/page.c | 6 ------ fs/proc/task_mmu.c | 7 ------- fs/quota/dquot.c | 1 - fs/reiserfs/journal.c | 2 -- fs/select.c | 1 - fs/smb/client/file.c | 2 -- fs/splice.c | 1 - fs/ubifs/budget.c | 1 - fs/ubifs/commit.c | 1 - fs/ubifs/debug.c | 5 ----- fs/ubifs/dir.c | 1 - fs/ubifs/gc.c | 5 ----- fs/ubifs/io.c | 2 -- fs/ubifs/lprops.c | 2 -- fs/ubifs/lpt_commit.c | 3 --- fs/ubifs/orphan.c | 1 - fs/ubifs/recovery.c | 4 ---- fs/ubifs/replay.c | 7 ------- fs/ubifs/scan.c | 2 -- fs/ubifs/shrinker.c | 1 - fs/ubifs/super.c | 2 -- fs/ubifs/tnc_commit.c | 2 -- fs/ubifs/tnc_misc.c | 1 - fs/userfaultfd.c | 9 --------- fs/verity/enable.c | 1 - fs/verity/read_metadata.c | 1 - fs/xfs/scrub/common.h | 7 ------- fs/xfs/scrub/xfarray.c | 7 ------- fs/xfs/xfs_aops.c | 1 - fs/xfs/xfs_icache.c | 2 -- fs/xfs/xfs_iwalk.c | 1 - 139 files changed, 54 insertions(+), 396 deletions(-) diff --git a/fs/afs/write.c b/fs/afs/write.c index e1c45341719b..6b2bc1dad8e0 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -568,7 +568,6 @@ static void afs_extend_writeback(struct address_space *mapping, } folio_batch_release(&fbatch); - cond_resched(); } while (!stop); *_len = len; @@ -790,7 +789,6 @@ static int afs_writepages_region(struct address_space *mapping, } folio_batch_release(&fbatch); - cond_resched(); } while (wbc->nr_to_write > 0); *_next = start; diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index a4a809efc92f..2adaabd18b6e 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -823,7 +823,6 @@ static int resolve_indirect_refs(struct btrfs_backref_walk_ctx *ctx, prelim_ref_insert(ctx->fs_info, &preftrees->direct, ref, NULL); ulist_reinit(parents); - cond_resched(); } out: /* @@ -879,7 +878,6 @@ static int add_missing_keys(struct btrfs_fs_info *fs_info, btrfs_tree_read_unlock(eb); free_extent_buffer(eb); prelim_ref_insert(fs_info, &preftrees->indirect, ref, NULL); - cond_resched(); } return 0; } @@ -1676,7 +1674,6 @@ static int find_parent_nodes(struct btrfs_backref_walk_ctx *ctx, */ ref->inode_list = NULL; } - cond_resched(); } out: @@ -1784,7 +1781,6 @@ static int btrfs_find_all_roots_safe(struct btrfs_backref_walk_ctx *ctx) if (!node) break; ctx->bytenr = node->val; - cond_resched(); } ulist_free(ctx->refs); @@ -1993,7 +1989,6 @@ int btrfs_is_data_extent_shared(struct btrfs_inode *inode, u64 bytenr, } shared.share_count = 0; shared.have_delayed_delete_refs = false; - cond_resched(); } /* @@ -3424,7 +3419,6 @@ int btrfs_backref_add_tree_node(struct btrfs_trans_handle *trans, struct btrfs_key key; int type; - cond_resched(); eb = btrfs_backref_get_eb(iter); key.objectid = iter->bytenr; diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index b2e5107b7cec..fe9f0a23dbb2 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -769,7 +769,6 @@ static int load_extent_tree_free(struct btrfs_caching_control *caching_ctl) btrfs_release_path(path); up_read(&fs_info->commit_root_sem); mutex_unlock(&caching_ctl->mutex); - cond_resched(); mutex_lock(&caching_ctl->mutex); down_read(&fs_info->commit_root_sem); goto next; @@ -4066,8 +4065,6 @@ int btrfs_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags, wait_for_alloc = false; spin_unlock(&space_info->lock); } - - cond_resched(); } while (wait_for_alloc); mutex_lock(&fs_info->chunk_mutex); diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 617d4827eec2..09b70b271cd2 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -5052,7 +5052,6 @@ int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, */ free_extent_buffer(next); btrfs_release_path(path); - cond_resched(); goto again; } if (!ret) diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c index f2ff4cbe8656..2219c3ccb863 100644 --- a/fs/btrfs/defrag.c +++ b/fs/btrfs/defrag.c @@ -1326,7 +1326,6 @@ int btrfs_defrag_file(struct inode *inode, struct file_ra_state *ra, ret = 0; break; } - cond_resched(); } if (ra_allocated) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 68f60d50e1fd..e9d1cef7d030 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -4561,7 +4561,6 @@ static void btrfs_destroy_all_ordered_extents(struct btrfs_fs_info *fs_info) spin_unlock(&fs_info->ordered_root_lock); btrfs_destroy_ordered_extents(root); - cond_resched(); spin_lock(&fs_info->ordered_root_lock); } spin_unlock(&fs_info->ordered_root_lock); @@ -4643,7 +4642,6 @@ static void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, } btrfs_cleanup_ref_head_accounting(fs_info, delayed_refs, head); btrfs_put_delayed_ref_head(head); - cond_resched(); spin_lock(&delayed_refs->lock); } btrfs_qgroup_destroy_extent_records(trans); @@ -4759,7 +4757,6 @@ static void btrfs_destroy_pinned_extent(struct btrfs_fs_info *fs_info, free_extent_state(cached_state); btrfs_error_unpin_extent_range(fs_info, start, end); mutex_unlock(&fs_info->unused_bg_unpin_mutex); - cond_resched(); } } diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index ff8e117a1ace..39aa803cbb13 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -695,8 +695,6 @@ int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (start > end) goto out; spin_unlock(&tree->lock); - if (gfpflags_allow_blocking(mask)) - cond_resched(); goto again; out: @@ -1189,8 +1187,6 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (start > end) goto out; spin_unlock(&tree->lock); - if (gfpflags_allow_blocking(mask)) - cond_resched(); goto again; out: @@ -1409,7 +1405,6 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (start > end) goto out; spin_unlock(&tree->lock); - cond_resched(); first_iteration = false; goto again; diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index fc313fce5bbd..33be7bb96872 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -1996,7 +1996,6 @@ static int btrfs_run_delayed_refs_for_head(struct btrfs_trans_handle *trans, } btrfs_put_delayed_ref(ref); - cond_resched(); spin_lock(&locked_ref->lock); btrfs_merge_delayed_refs(fs_info, delayed_refs, locked_ref); @@ -2074,7 +2073,6 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, */ locked_ref = NULL; - cond_resched(); } while ((nr != -1 && count < nr) || locked_ref); return 0; @@ -2183,7 +2181,6 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, mutex_unlock(&head->mutex); btrfs_put_delayed_ref_head(head); - cond_resched(); goto again; } out: @@ -2805,7 +2802,6 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans) unpin_extent_range(fs_info, start, end, true); mutex_unlock(&fs_info->unused_bg_unpin_mutex); free_extent_state(cached_state); - cond_resched(); } if (btrfs_test_opt(fs_info, DISCARD_ASYNC)) { @@ -4416,7 +4412,6 @@ static noinline int find_free_extent(struct btrfs_root *root, goto have_block_group; } release_block_group(block_group, ffe_ctl, ffe_ctl->delalloc); - cond_resched(); } up_read(&space_info->groups_sem); @@ -5037,7 +5032,6 @@ static noinline void reada_walk_down(struct btrfs_trans_handle *trans, if (nread >= wc->reada_count) break; - cond_resched(); bytenr = btrfs_node_blockptr(eb, slot); generation = btrfs_node_ptr_generation(eb, slot); @@ -6039,8 +6033,6 @@ static int btrfs_trim_free_extents(struct btrfs_device *device, u64 *trimmed) ret = -ERESTARTSYS; break; } - - cond_resched(); } return ret; diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index caccd0376342..209911d0e873 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -227,7 +227,6 @@ static void __process_pages_contig(struct address_space *mapping, page_ops, start, end); } folio_batch_release(&fbatch); - cond_resched(); } } @@ -291,7 +290,6 @@ static noinline int lock_delalloc_pages(struct inode *inode, processed_end = page_offset(page) + PAGE_SIZE - 1; } folio_batch_release(&fbatch); - cond_resched(); } return 0; @@ -401,7 +399,6 @@ noinline_for_stack bool find_lock_delalloc_range(struct inode *inode, &cached_state); __unlock_for_delalloc(inode, locked_page, delalloc_start, delalloc_end); - cond_resched(); goto again; } free_extent_state(cached_state); @@ -1924,7 +1921,6 @@ int btree_write_cache_pages(struct address_space *mapping, nr_to_write_done = wbc->nr_to_write <= 0; } folio_batch_release(&fbatch); - cond_resched(); } if (!scanned && !done) { /* @@ -2116,7 +2112,6 @@ static int extent_write_cache_pages(struct address_space *mapping, wbc->nr_to_write <= 0); } folio_batch_release(&fbatch); - cond_resched(); } if (!scanned && !done) { /* @@ -2397,8 +2392,6 @@ int try_release_extent_mapping(struct page *page, gfp_t mask) /* once for us */ free_extent_map(em); - - cond_resched(); /* Allow large-extent preemption. */ } } return try_release_extent_state(tree, page, mask); @@ -2698,7 +2691,6 @@ static int fiemap_process_hole(struct btrfs_inode *inode, last_delalloc_end = delalloc_end; cur_offset = delalloc_end + 1; extent_offset += cur_offset - delalloc_start; - cond_resched(); } /* @@ -2986,7 +2978,6 @@ int extent_fiemap(struct btrfs_inode *inode, struct fiemap_extent_info *fieinfo, /* No more file extent items for this inode. */ break; } - cond_resched(); } check_eof_delalloc: diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 1ce5dd154499..12cc0cfde0ff 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -1252,7 +1252,6 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, btrfs_mark_buffer_dirty(path->nodes[0]); if (total_bytes < sums->len) { btrfs_release_path(path); - cond_resched(); goto again; } out: diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 361535c71c0f..541b6c87ddf3 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1405,8 +1405,6 @@ static noinline ssize_t btrfs_buffered_write(struct kiocb *iocb, btrfs_drop_pages(fs_info, pages, num_pages, pos, copied); - cond_resched(); - pos += copied; num_written += copied; } @@ -3376,7 +3374,6 @@ bool btrfs_find_delalloc_in_range(struct btrfs_inode *inode, u64 start, u64 end, prev_delalloc_end = delalloc_end; cur_offset = delalloc_end + 1; - cond_resched(); } return ret; @@ -3654,7 +3651,6 @@ static loff_t find_desired_extent(struct file *file, loff_t offset, int whence) ret = -EINTR; goto out; } - cond_resched(); } /* We have an implicit hole from the last extent found up to i_size. */ diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 27fad70451aa..c9606fcdc310 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -3807,8 +3807,6 @@ static int trim_no_bitmap(struct btrfs_block_group *block_group, ret = -ERESTARTSYS; break; } - - cond_resched(); } return ret; @@ -4000,8 +3998,6 @@ static int trim_bitmaps(struct btrfs_block_group *block_group, ret = -ERESTARTSYS; break; } - - cond_resched(); } if (offset >= end) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7814b9d654ce..789569e135cf 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1021,7 +1021,6 @@ static void compress_file_range(struct btrfs_work *work) nr_pages, compress_type); if (start + total_in < end) { start += total_in; - cond_resched(); goto again; } return; @@ -3376,7 +3375,6 @@ void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info) run_delayed_iput_locked(fs_info, inode); if (need_resched()) { spin_unlock_irq(&fs_info->delayed_iput_lock); - cond_resched(); spin_lock_irq(&fs_info->delayed_iput_lock); } } @@ -4423,7 +4421,6 @@ static void btrfs_prune_dentries(struct btrfs_root *root) * cache when its usage count hits zero. */ iput(inode); - cond_resched(); spin_lock(&root->inode_lock); goto again; } @@ -5135,7 +5132,6 @@ static void evict_inode_truncate_pages(struct inode *inode) EXTENT_CLEAR_ALL_BITS | EXTENT_DO_ACCOUNTING, &cached_state); - cond_resched(); spin_lock(&io_tree->lock); } spin_unlock(&io_tree->lock); @@ -7209,8 +7205,6 @@ static int lock_extent_direct(struct inode *inode, u64 lockstart, u64 lockend, if (ret) break; - - cond_resched(); } return ret; @@ -9269,7 +9263,6 @@ static int start_delalloc_inodes(struct btrfs_root *root, if (ret || wbc->nr_to_write <= 0) goto out; } - cond_resched(); spin_lock(&root->delalloc_lock); } spin_unlock(&root->delalloc_lock); @@ -10065,7 +10058,6 @@ ssize_t btrfs_encoded_read(struct kiocb *iocb, struct iov_iter *iter, break; btrfs_put_ordered_extent(ordered); unlock_extent(io_tree, start, lockend, &cached_state); - cond_resched(); } em = btrfs_get_extent(inode, NULL, 0, start, lockend - start + 1); @@ -10306,7 +10298,6 @@ ssize_t btrfs_do_encoded_write(struct kiocb *iocb, struct iov_iter *from, if (ordered) btrfs_put_ordered_extent(ordered); unlock_extent(io_tree, start, end, &cached_state); - cond_resched(); } /* diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 345c449d588c..58463c479c91 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -715,7 +715,6 @@ u64 btrfs_wait_ordered_extents(struct btrfs_root *root, u64 nr, list_add_tail(&ordered->work_list, &works); btrfs_queue_work(fs_info->flush_workers, &ordered->flush_work); - cond_resched(); spin_lock(&root->ordered_extent_lock); if (nr != U64_MAX) nr--; @@ -729,7 +728,6 @@ u64 btrfs_wait_ordered_extents(struct btrfs_root *root, u64 nr, list_del_init(&ordered->work_list); wait_for_completion(&ordered->completion); btrfs_put_ordered_extent(ordered); - cond_resched(); } mutex_unlock(&root->ordered_extent_mutex); diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index b99230db3c82..c483648be366 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1926,7 +1926,6 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans, if (ret) return ret; } - cond_resched(); return 0; } diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index 65d2bd6910f2..6f599c275dc7 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -569,8 +569,6 @@ static int btrfs_clone(struct inode *src, struct inode *inode, ret = -EINTR; goto out; } - - cond_resched(); } ret = 0; diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index c6d4bb8cbe29..7e16a6d953d9 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1094,7 +1094,6 @@ int replace_file_extents(struct btrfs_trans_handle *trans, for (i = 0; i < nritems; i++) { struct btrfs_ref ref = { 0 }; - cond_resched(); btrfs_item_key_to_cpu(leaf, &key, i); if (key.type != BTRFS_EXTENT_DATA_KEY) continue; @@ -1531,7 +1530,6 @@ static int invalidate_extent_cache(struct btrfs_root *root, while (1) { struct extent_state *cached_state = NULL; - cond_resched(); iput(inode); if (objectid > max_key->objectid) @@ -2163,7 +2161,6 @@ struct btrfs_root *select_reloc_root(struct btrfs_trans_handle *trans, next = node; while (1) { - cond_resched(); next = walk_up_backref(next, edges, &index); root = next->root; @@ -2286,7 +2283,6 @@ struct btrfs_root *select_one_root(struct btrfs_backref_node *node) next = node; while (1) { - cond_resched(); next = walk_up_backref(next, edges, &index); root = next->root; @@ -2331,7 +2327,6 @@ u64 calcu_metadata_size(struct reloc_control *rc, BUG_ON(reserve && node->processed); while (next) { - cond_resched(); while (1) { if (next->processed && (reserve || next != node)) break; @@ -2426,8 +2421,6 @@ static int do_relocation(struct btrfs_trans_handle *trans, list_for_each_entry(edge, &node->upper, list[LOWER]) { struct btrfs_ref ref = { 0 }; - cond_resched(); - upper = edge->node[UPPER]; root = select_reloc_root(trans, rc, upper, edges); if (IS_ERR(root)) { @@ -2609,7 +2602,6 @@ static void update_processed_blocks(struct reloc_control *rc, int index = 0; while (next) { - cond_resched(); while (1) { if (next->processed) break; @@ -3508,7 +3500,6 @@ int find_next_extent(struct reloc_control *rc, struct btrfs_path *path, while (1) { bool block_found; - cond_resched(); if (rc->search_start >= last) { ret = 1; break; diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index b877203f1dc5..4dba0e3b6887 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -2046,9 +2046,6 @@ static int scrub_simple_mirror(struct scrub_ctx *sctx, break; cur_logical = found_logical + BTRFS_STRIPE_LEN; - - /* Don't hold CPU for too long time */ - cond_resched(); } return ret; } diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 3a566150c531..503782af0b35 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -7778,7 +7778,6 @@ static int btrfs_compare_trees(struct btrfs_root *left_root, if (need_resched() || rwsem_is_contended(&fs_info->commit_root_sem)) { up_read(&fs_info->commit_root_sem); - cond_resched(); down_read(&fs_info->commit_root_sem); } diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index d7e8cd4f140c..e597c5365c71 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -1211,7 +1211,6 @@ static void btrfs_preempt_reclaim_metadata_space(struct work_struct *work) if (!to_reclaim) to_reclaim = btrfs_calc_insert_metadata_size(fs_info, 1); flush_space(fs_info, space_info, to_reclaim, flush, true); - cond_resched(); spin_lock(&space_info->lock); } diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c index 1cc86af97dc6..7021025d8535 100644 --- a/fs/btrfs/tests/extent-io-tests.c +++ b/fs/btrfs/tests/extent-io-tests.c @@ -45,7 +45,6 @@ static noinline int process_page_range(struct inode *inode, u64 start, u64 end, folio_put(folio); } folio_batch_release(&fbatch); - cond_resched(); loops++; if (loops > 100000) { printk(KERN_ERR diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c780d3729463..ce5cbc12e041 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1115,7 +1115,6 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, werr = filemap_fdatawait_range(mapping, start, end); free_extent_state(cached_state); cached_state = NULL; - cond_resched(); start = end + 1; } return werr; @@ -1157,7 +1156,6 @@ static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info, werr = err; free_extent_state(cached_state); cached_state = NULL; - cond_resched(); start = end + 1; } if (err) @@ -1507,7 +1505,6 @@ int btrfs_defrag_root(struct btrfs_root *root) btrfs_end_transaction(trans); btrfs_btree_balance_dirty(info); - cond_resched(); if (btrfs_fs_closing(info) || ret != -EAGAIN) break; diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index cbb17b542131..3c215762a07f 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -2657,11 +2657,9 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans, path->nodes[*level-1] = next; *level = btrfs_header_level(next); path->slots[*level] = 0; - cond_resched(); } path->slots[*level] = btrfs_header_nritems(path->nodes[*level]); - cond_resched(); return 0; } @@ -3898,7 +3896,6 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, } if (need_resched()) { btrfs_release_path(path); - cond_resched(); goto search; } } @@ -5037,7 +5034,6 @@ static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, ins_nr++; path->slots[0]++; found_xattrs = true; - cond_resched(); } if (ins_nr > 0) { ret = copy_items(trans, inode, dst_path, path, @@ -5135,7 +5131,6 @@ static int btrfs_log_holes(struct btrfs_trans_handle *trans, prev_extent_end = btrfs_file_extent_end(path); path->slots[0]++; - cond_resched(); } if (prev_extent_end < i_size) { @@ -5919,13 +5914,6 @@ static int copy_inode_items_to_log(struct btrfs_trans_handle *trans, } else { break; } - - /* - * We may process many leaves full of items for our inode, so - * avoid monopolizing a cpu for too long by rescheduling while - * not holding locks on any tree. - */ - cond_resched(); } if (ins_nr) { ret = copy_items(trans, inode, dst_path, path, ins_start_slot, diff --git a/fs/btrfs/uuid-tree.c b/fs/btrfs/uuid-tree.c index 7c7001f42b14..98890e0d7b24 100644 --- a/fs/btrfs/uuid-tree.c +++ b/fs/btrfs/uuid-tree.c @@ -324,7 +324,6 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info) ret = -EINTR; goto out; } - cond_resched(); leaf = path->nodes[0]; slot = path->slots[0]; btrfs_item_key_to_cpu(leaf, &key, slot); diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index b9ef6f54635c..ceda63fcc721 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1689,7 +1689,6 @@ static int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes, search_start = extent_end; next: path->slots[0]++; - cond_resched(); } /* @@ -4756,7 +4755,6 @@ int btrfs_uuid_scan_kthread(void *data) } else { break; } - cond_resched(); } out: diff --git a/fs/buffer.c b/fs/buffer.c index 12e9a71c693d..a362b42bc63d 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1743,7 +1743,6 @@ void clean_bdev_aliases(struct block_device *bdev, sector_t block, sector_t len) folio_unlock(folio); } folio_batch_release(&fbatch); - cond_resched(); /* End of range already reached? */ if (index > end || !index) break; diff --git a/fs/cachefiles/cache.c b/fs/cachefiles/cache.c index 7077f72e6f47..7f078244cc0a 100644 --- a/fs/cachefiles/cache.c +++ b/fs/cachefiles/cache.c @@ -299,9 +299,7 @@ static void cachefiles_withdraw_objects(struct cachefiles_cache *cache) fscache_withdraw_cookie(object->cookie); count++; if ((count & 63) == 0) { - spin_unlock(&cache->object_list_lock); - cond_resched(); - spin_lock(&cache->object_list_lock); + cond_resched_lock(&cache->object_list_lock); } } diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 7bf7a5fcc045..3fa8a2ecb299 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -353,7 +353,6 @@ int cachefiles_bury_object(struct cachefiles_cache *cache, unlock_rename(cache->graveyard, dir); dput(grave); grave = NULL; - cond_resched(); goto try_again; } diff --git a/fs/cachefiles/volume.c b/fs/cachefiles/volume.c index 89df0ba8ba5e..6a4d9d87c68c 100644 --- a/fs/cachefiles/volume.c +++ b/fs/cachefiles/volume.c @@ -62,7 +62,6 @@ void cachefiles_acquire_volume(struct fscache_volume *vcookie) cachefiles_bury_object(cache, NULL, cache->store, vdentry, FSCACHE_VOLUME_IS_WEIRD); cachefiles_put_directory(volume->dentry); - cond_resched(); goto retry; } } diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index f4863078f7fe..f2be2adf5d41 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1375,7 +1375,6 @@ static int ceph_writepages_start(struct address_space *mapping, wait_on_page_writeback(page); } folio_batch_release(&fbatch); - cond_resched(); } } diff --git a/fs/dax.c b/fs/dax.c index 93cf6e8d8990..f68e026e6ec4 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -986,7 +986,6 @@ static int dax_writeback_one(struct xa_state *xas, struct dax_device *dax_dev, i_mmap_lock_read(mapping); vma_interval_tree_foreach(vma, &mapping->i_mmap, index, end) { pfn_mkclean_range(pfn, count, index, vma); - cond_resched(); } i_mmap_unlock_read(mapping); diff --git a/fs/dcache.c b/fs/dcache.c index 25ac74d30bff..3f5b4adba111 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -619,7 +619,6 @@ static void __dentry_kill(struct dentry *dentry) spin_unlock(&dentry->d_lock); if (likely(can_free)) dentry_free(dentry); - cond_resched(); } static struct dentry *__lock_parent(struct dentry *dentry) @@ -1629,7 +1628,6 @@ void shrink_dcache_parent(struct dentry *parent) continue; } - cond_resched(); if (!data.found) break; data.victim = NULL; diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c index 1f2f70a1b824..d6f36527814f 100644 --- a/fs/dlm/ast.c +++ b/fs/dlm/ast.c @@ -261,7 +261,6 @@ void dlm_callback_resume(struct dlm_ls *ls) sum += count; if (!empty) { count = 0; - cond_resched(); goto more; } diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c index f6acba4310a7..d8b24f9bb744 100644 --- a/fs/dlm/dir.c +++ b/fs/dlm/dir.c @@ -94,8 +94,6 @@ int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq) if (error) goto out_free; - cond_resched(); - /* * pick namelen/name pairs out of received buffer */ diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 652c51fbbf76..6bf02cbc5550 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -1713,7 +1713,6 @@ void dlm_scan_rsbs(struct dlm_ls *ls) shrink_bucket(ls, i); if (dlm_locking_stopped(ls)) break; - cond_resched(); } } @@ -5227,7 +5226,6 @@ void dlm_recover_purge(struct dlm_ls *ls) } unlock_rsb(r); unhold_rsb(r); - cond_resched(); } up_write(&ls->ls_root_sem); @@ -5302,7 +5300,6 @@ void dlm_recover_grant(struct dlm_ls *ls) confirm_master(r, 0); unlock_rsb(r); put_rsb(r); - cond_resched(); } if (lkb_count) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index f7bc22e74db2..494ede3678d6 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -562,7 +562,6 @@ int dlm_lowcomms_connect_node(int nodeid) up_read(&con->sock_lock); srcu_read_unlock(&connections_srcu, idx); - cond_resched(); return 0; } @@ -1504,7 +1503,6 @@ static void process_recv_sockets(struct work_struct *work) /* CF_RECV_PENDING cleared */ break; case DLM_IO_RESCHED: - cond_resched(); queue_work(io_workqueue, &con->rwork); /* CF_RECV_PENDING not cleared */ break; @@ -1650,7 +1648,6 @@ static void process_send_sockets(struct work_struct *work) break; case DLM_IO_RESCHED: /* CF_SEND_PENDING not cleared */ - cond_resched(); queue_work(io_workqueue, &con->swork); break; default: diff --git a/fs/dlm/recover.c b/fs/dlm/recover.c index 53917c0aa3c0..6d9b074631ff 100644 --- a/fs/dlm/recover.c +++ b/fs/dlm/recover.c @@ -545,7 +545,6 @@ int dlm_recover_masters(struct dlm_ls *ls, uint64_t seq) else error = recover_master(r, &count, seq); unlock_rsb(r); - cond_resched(); total++; if (error) { diff --git a/fs/drop_caches.c b/fs/drop_caches.c index b9575957a7c2..3409677acfae 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c @@ -41,7 +41,6 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused) iput(toput_inode); toput_inode = inode; - cond_resched(); spin_lock(&sb->s_inode_list_lock); } spin_unlock(&sb->s_inode_list_lock); diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c index cc6fb9e98899..f32ff29392d1 100644 --- a/fs/erofs/utils.c +++ b/fs/erofs/utils.c @@ -93,7 +93,6 @@ struct erofs_workgroup *erofs_insert_workgroup(struct super_block *sb, } else if (!erofs_workgroup_get(pre)) { /* try to legitimize the current in-tree one */ xa_unlock(&sbi->managed_pslots); - cond_resched(); goto repeat; } lockref_put_return(&grp->lockref); diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 036f610e044b..20ae6af8a9d6 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -697,8 +697,13 @@ static void z_erofs_cache_invalidate_folio(struct folio *folio, DBG_BUGON(stop > folio_size(folio) || stop < length); if (offset == 0 && stop == folio_size(folio)) + /* + * We are in a seemingly tight loop here. Though, if needed, + * preemption can happen in z_erofs_cache_release_folio() + * via the spin_unlock() call. + */ while (!z_erofs_cache_release_folio(folio, GFP_NOFS)) - cond_resched(); + ; } static const struct address_space_operations z_erofs_cache_aops = { @@ -1527,7 +1532,6 @@ static struct page *pickup_page_for_submission(struct z_erofs_pcluster *pcl, if (oldpage != cmpxchg(&pcl->compressed_bvecs[nr].page, oldpage, page)) { erofs_pagepool_add(pagepool, page); - cond_resched(); goto repeat; } out_tocache: diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 1d9a71a0c4c1..45794a9da768 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -801,7 +801,6 @@ static void ep_clear_and_put(struct eventpoll *ep) epi = rb_entry(rbp, struct epitem, rbn); ep_unregister_pollwait(ep, epi); - cond_resched(); } /* @@ -816,7 +815,6 @@ static void ep_clear_and_put(struct eventpoll *ep) next = rb_next(rbp); epi = rb_entry(rbp, struct epitem, rbn); ep_remove_safe(ep, epi); - cond_resched(); } dispose = ep_refcount_dec_and_test(ep); @@ -1039,7 +1037,6 @@ static struct epitem *ep_find_tfd(struct eventpoll *ep, int tfd, unsigned long t else toff--; } - cond_resched(); } return NULL; diff --git a/fs/exec.c b/fs/exec.c index 6518e33ea813..ca3b25054e3f 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -451,7 +451,6 @@ static int count(struct user_arg_ptr argv, int max) if (fatal_signal_pending(current)) return -ERESTARTNOHAND; - cond_resched(); } } return i; @@ -469,7 +468,6 @@ static int count_strings_kernel(const char *const *argv) return -E2BIG; if (fatal_signal_pending(current)) return -ERESTARTNOHAND; - cond_resched(); } return i; } @@ -562,7 +560,6 @@ static int copy_strings(int argc, struct user_arg_ptr argv, ret = -ERESTARTNOHAND; goto out; } - cond_resched(); offset = pos % PAGE_SIZE; if (offset == 0) @@ -661,7 +658,6 @@ static int copy_strings_kernel(int argc, const char *const *argv, return ret; if (fatal_signal_pending(current)) return -ERESTARTNOHAND; - cond_resched(); } return 0; } diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index 6fe3c941b565..1a7baca041cf 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c @@ -162,7 +162,6 @@ static int ext4_protect_reserved_inode(struct super_block *sb, return PTR_ERR(inode); num = (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits; while (i < num) { - cond_resched(); map.m_lblk = i; map.m_len = num - i; n = ext4_map_blocks(NULL, inode, &map, 0); @@ -224,7 +223,6 @@ int ext4_setup_system_zone(struct super_block *sb) for (i=0; i < ngroups; i++) { unsigned int meta_blks = ext4_num_base_meta_blocks(sb, i); - cond_resched(); if (meta_blks != 0) { ret = add_system_zone(system_blks, ext4_group_first_block_no(sb, i), diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 3985f8c33f95..cb7d2427be8b 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -174,7 +174,6 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) err = -ERESTARTSYS; goto errout; } - cond_resched(); offset = ctx->pos & (sb->s_blocksize - 1); map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); map.m_len = 1; diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 202c76996b62..79851e582c7d 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3001,7 +3001,6 @@ int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start, } /* Yield here to deal with large extent trees. * Should be a no-op if we did IO above. */ - cond_resched(); if (WARN_ON(i + 1 > depth)) { err = -EFSCORRUPTED; break; diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b65058d972f9..25d78953eec9 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -1482,7 +1482,6 @@ unsigned long ext4_count_free_inodes(struct super_block *sb) if (!gdp) continue; desc_count += ext4_free_inodes_count(sb, gdp); - cond_resched(); } return desc_count; #endif diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 4ce35f1c8b0a..1c3af3a8fe2e 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2491,7 +2491,6 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd) } } folio_batch_release(&fbatch); - cond_resched(); } mpd->scanned_until_end = 1; if (handle) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 1e599305d85f..074b5cdea363 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2843,7 +2843,6 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) ext4_mb_choose_next_group(ac, &new_cr, &group, ngroups)) { int ret = 0; - cond_resched(); if (new_cr != cr) { cr = new_cr; goto repeat; @@ -3387,7 +3386,6 @@ static int ext4_mb_init_backend(struct super_block *sb) sbi->s_buddy_cache->i_ino = EXT4_BAD_INO; EXT4_I(sbi->s_buddy_cache)->i_disksize = 0; for (i = 0; i < ngroups; i++) { - cond_resched(); desc = ext4_get_group_desc(sb, i, NULL); if (desc == NULL) { ext4_msg(sb, KERN_ERR, "can't read descriptor %u", i); @@ -3746,7 +3744,6 @@ int ext4_mb_release(struct super_block *sb) if (sbi->s_group_info) { for (i = 0; i < ngroups; i++) { - cond_resched(); grinfo = ext4_get_group_info(sb, i); if (!grinfo) continue; @@ -6034,7 +6031,6 @@ static int ext4_mb_discard_preallocations(struct super_block *sb, int needed) ret = ext4_mb_discard_group_preallocations(sb, i, &busy); freed += ret; needed -= ret; - cond_resched(); } if (needed > 0 && busy && ++retry < 3) { @@ -6173,8 +6169,6 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, while (ar->len && ext4_claim_free_clusters(sbi, ar->len, ar->flags)) { - /* let others to free the space */ - cond_resched(); ar->len = ar->len >> 1; } if (!ar->len) { @@ -6720,7 +6714,6 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, int is_metadata = flags & EXT4_FREE_BLOCKS_METADATA; for (i = 0; i < count; i++) { - cond_resched(); if (is_metadata) bh = sb_find_get_block(inode->i_sb, block + i); ext4_forget(handle, is_metadata, inode, bh, block + i); @@ -6959,8 +6952,11 @@ __releases(ext4_group_lock_ptr(sb, e4b->bd_group)) return count; if (need_resched()) { + /* + * Rescheduling can implicitly happen after the + * unlock. + */ ext4_unlock_group(sb, e4b->bd_group); - cond_resched(); ext4_lock_group(sb, e4b->bd_group); } diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index bbda587f76b8..2ab27008c4dd 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1255,7 +1255,6 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash, err = -ERESTARTSYS; goto errout; } - cond_resched(); block = dx_get_block(frame->at); ret = htree_dirblock_to_tree(dir_file, dir, block, &hinfo, start_hash, start_minor_hash); @@ -1341,7 +1340,6 @@ static int dx_make_map(struct inode *dir, struct buffer_head *bh, map_tail->size = ext4_rec_len_from_disk(de->rec_len, blocksize); count++; - cond_resched(); } de = ext4_next_entry(de, blocksize); } @@ -1658,7 +1656,6 @@ static struct buffer_head *__ext4_find_entry(struct inode *dir, /* * We deal with the read-ahead logic here. */ - cond_resched(); if (ra_ptr >= ra_max) { /* Refill the readahead buffer */ ra_ptr = 0; diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c index e5b47dda3317..fb04e8bccd3c 100644 --- a/fs/ext4/orphan.c +++ b/fs/ext4/orphan.c @@ -67,7 +67,6 @@ static int ext4_orphan_file_add(handle_t *handle, struct inode *inode) atomic_inc(&oi->of_binfo[i].ob_free_entries); return -ENOSPC; } - cond_resched(); } while (bdata[j]) { if (++j >= inodes_per_ob) { diff --git a/fs/ext4/super.c b/fs/ext4/super.c index dbebd8b3127e..170c75323300 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3861,7 +3861,6 @@ static int ext4_lazyinit_thread(void *arg) cur = jiffies; if ((time_after_eq(cur, next_wakeup)) || (MAX_JIFFY_OFFSET == next_wakeup)) { - cond_resched(); continue; } @@ -4226,7 +4225,6 @@ int ext4_calculate_overhead(struct super_block *sb) overhead += blks; if (blks) memset(buf, 0, PAGE_SIZE); - cond_resched(); } /* diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index b0597a539fc5..20ea41b5814c 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -45,7 +45,6 @@ struct page *f2fs_grab_meta_page(struct f2fs_sb_info *sbi, pgoff_t index) repeat: page = f2fs_grab_cache_page(mapping, index, false); if (!page) { - cond_resched(); goto repeat; } f2fs_wait_on_page_writeback(page, META, true, true); @@ -76,7 +75,6 @@ static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index, repeat: page = f2fs_grab_cache_page(mapping, index, false); if (!page) { - cond_resched(); goto repeat; } if (PageUptodate(page)) @@ -463,7 +461,6 @@ long f2fs_sync_meta_pages(struct f2fs_sb_info *sbi, enum page_type type, break; } folio_batch_release(&fbatch); - cond_resched(); } stop: if (nwritten) @@ -1111,9 +1108,13 @@ int f2fs_sync_dirty_inodes(struct f2fs_sb_info *sbi, enum inode_type type, F2FS_I(inode)->cp_task = NULL; iput(inode); - /* We need to give cpu to another writers. */ + /* + * We need to give cpu to other writers but cond_resched_stall() + * does not guarantee that. Perhaps we should explicitly wait on + * an event or a timeout? + */ if (ino == cur_ino) - cond_resched(); + cond_resched_stall(); else ino = cur_ino; } else { @@ -1122,7 +1123,6 @@ int f2fs_sync_dirty_inodes(struct f2fs_sb_info *sbi, enum inode_type type, * writebacking dentry pages in the freeing inode. */ f2fs_submit_merged_write(sbi, DATA); - cond_resched(); } goto retry; } @@ -1229,7 +1229,6 @@ static int block_operations(struct f2fs_sb_info *sbi) f2fs_quota_sync(sbi->sb, -1); if (locked) up_read(&sbi->sb->s_umount); - cond_resched(); goto retry_flush_quotas; } @@ -1240,7 +1239,6 @@ static int block_operations(struct f2fs_sb_info *sbi) err = f2fs_sync_dirty_inodes(sbi, DIR_INODE, true); if (err) return err; - cond_resched(); goto retry_flush_quotas; } @@ -1256,7 +1254,6 @@ static int block_operations(struct f2fs_sb_info *sbi) err = f2fs_sync_inode_meta(sbi); if (err) return err; - cond_resched(); goto retry_flush_quotas; } @@ -1273,7 +1270,6 @@ static int block_operations(struct f2fs_sb_info *sbi) f2fs_unlock_all(sbi); return err; } - cond_resched(); goto retry_flush_nodes; } diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index d820801f473e..39a2a974e087 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1941,7 +1941,6 @@ void f2fs_invalidate_compress_pages(struct f2fs_sb_info *sbi, nid_t ino) folio_unlock(folio); } folio_batch_release(&fbatch); - cond_resched(); } while (index < end); } diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 916e317ac925..dfde82cab326 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2105,7 +2105,6 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, } prep_next: - cond_resched(); if (fatal_signal_pending(current)) ret = -EINTR; else @@ -3250,7 +3249,6 @@ static int f2fs_write_cache_pages(struct address_space *mapping, goto readd; } release_pages(pages, nr_pages); - cond_resched(); } #ifdef CONFIG_F2FS_FS_COMPRESSION /* flush remained pages in compress cluster */ @@ -3981,7 +3979,6 @@ static int check_swap_activate(struct swap_info_struct *sis, while (cur_lblock < last_lblock && cur_lblock < sis->max) { struct f2fs_map_blocks map; retry: - cond_resched(); memset(&map, 0, sizeof(map)); map.m_lblk = cur_lblock; diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 8aa29fe2e87b..fc15a05fa807 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -1090,7 +1090,6 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx) err = -ERESTARTSYS; goto out_free; } - cond_resched(); /* readahead for multi pages of dir */ if (npages - n > 1 && !ra_has_index(ra, n)) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 0e2d49140c07..b87946f33a5f 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c @@ -936,7 +936,6 @@ static unsigned int __shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink if (node_cnt + tree_cnt >= nr_shrink) goto unlock_out; - cond_resched(); } mutex_unlock(&eti->extent_tree_lock); diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 6d688e42d89c..073e6fd1986d 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2849,8 +2849,12 @@ static inline bool is_idle(struct f2fs_sb_info *sbi, int type) static inline void f2fs_radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item) { + /* + * Insert in a tight loop. The scheduler will + * preempt when necessary. + */ while (radix_tree_insert(root, index, item)) - cond_resched(); + ; } #define RAW_IS_INODE(p) ((p)->footer.nid == (p)->footer.ino) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ca5904129b16..0ac3dc5dafee 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3922,7 +3922,6 @@ static int f2fs_sec_trim_file(struct file *filp, unsigned long arg) ret = -EINTR; goto out; } - cond_resched(); } if (len) @@ -4110,7 +4109,6 @@ static int f2fs_ioc_decompress_file(struct file *filp) count -= cluster_size; page_idx += cluster_size; - cond_resched(); if (fatal_signal_pending(current)) { ret = -EINTR; break; @@ -4188,7 +4186,6 @@ static int f2fs_ioc_compress_file(struct file *filp) count -= cluster_size; page_idx += cluster_size; - cond_resched(); if (fatal_signal_pending(current)) { ret = -EINTR; break; diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index ee2e1dd64f25..8187b6ad119a 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1579,7 +1579,6 @@ static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) unlock_page(page); } folio_batch_release(&fbatch); - cond_resched(); } return last_page; } @@ -1841,7 +1840,6 @@ int f2fs_fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, } } folio_batch_release(&fbatch); - cond_resched(); if (ret || marked) break; @@ -1944,7 +1942,6 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) unlock_page(page); } folio_batch_release(&fbatch); - cond_resched(); } } @@ -2046,7 +2043,6 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi, break; } folio_batch_release(&fbatch); - cond_resched(); if (wbc->nr_to_write == 0) { step = 2; diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index a8c8232852bb..09667bd8ecf7 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2705,7 +2705,6 @@ static ssize_t f2fs_quota_write(struct super_block *sb, int type, towrite -= tocopy; off += tocopy; data += tocopy; - cond_resched(); } if (len == towrite) diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index 1db348f8f887..96d9f1632f2a 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c @@ -741,7 +741,6 @@ int fat_count_free_clusters(struct super_block *sb) if (ops->ent_get(&fatent) == FAT_ENT_FREE) free++; } while (fat_ent_next(sbi, &fatent)); - cond_resched(); } sbi->free_clusters = free; sbi->free_clus_valid = 1; @@ -822,7 +821,6 @@ int fat_trim_fs(struct inode *inode, struct fstrim_range *range) if (need_resched()) { fatent_brelse(&fatent); unlock_fat(sbi); - cond_resched(); lock_fat(sbi); } } diff --git a/fs/file.c b/fs/file.c index 3e4a4dfa38fc..8ae2cec580a9 100644 --- a/fs/file.c +++ b/fs/file.c @@ -428,10 +428,8 @@ static struct fdtable *close_files(struct files_struct * files) while (set) { if (set & 1) { struct file * file = xchg(&fdt->fd[i], NULL); - if (file) { + if (file) filp_close(file, files); - cond_resched(); - } } i++; set >>= 1; @@ -708,11 +706,9 @@ static inline void __range_close(struct files_struct *files, unsigned int fd, if (file) { spin_unlock(&files->file_lock); filp_close(file, files); - cond_resched(); spin_lock(&files->file_lock); } else if (need_resched()) { spin_unlock(&files->file_lock); - cond_resched(); spin_lock(&files->file_lock); } } @@ -845,7 +841,6 @@ void do_close_on_exec(struct files_struct *files) __put_unused_fd(files, fd); spin_unlock(&files->file_lock); filp_close(file, files); - cond_resched(); spin_lock(&files->file_lock); } diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index c1af01b2c42d..bf311aeb058b 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1914,7 +1914,6 @@ static long writeback_sb_inodes(struct super_block *sb, * give up the CPU. */ blk_flush_plug(current->plug, false); - cond_resched(); } /* @@ -2621,8 +2620,6 @@ static void wait_sb_inodes(struct super_block *sb) */ filemap_fdatawait_keep_errors(mapping); - cond_resched(); - iput(inode); rcu_read_lock(); diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index c26d48355cc2..4d5bc99b6301 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -357,7 +357,6 @@ static int gfs2_write_cache_jdata(struct address_space *mapping, if (ret > 0) ret = 0; folio_batch_release(&fbatch); - cond_resched(); } if (!cycled && !done) { diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index ef7017fb6951..2eb057461023 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1592,7 +1592,6 @@ static int sweep_bh_for_rgrps(struct gfs2_inode *ip, struct gfs2_holder *rd_gh, buf_in_tr = false; } gfs2_glock_dq_uninit(rd_gh); - cond_resched(); goto more_rgrps; } out: @@ -1962,7 +1961,6 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length) if (current->journal_info) { up_write(&ip->i_rw_mutex); gfs2_trans_end(sdp); - cond_resched(); } gfs2_quota_unhold(ip); out_metapath: diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 4a280be229a6..a1eca3d9857c 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -2073,7 +2073,7 @@ static void glock_hash_walk(glock_examiner examiner, const struct gfs2_sbd *sdp) } rhashtable_walk_stop(&iter); - } while (cond_resched(), gl == ERR_PTR(-EAGAIN)); + } while (gl == ERR_PTR(-EAGAIN)); rhashtable_walk_exit(&iter); } diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index e5271ae87d1c..7567a29eeb21 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -143,7 +143,6 @@ __acquires(&sdp->sd_ail_lock) ret = write_cache_pages(mapping, wbc, __gfs2_writepage, mapping); if (need_resched()) { blk_finish_plug(plug); - cond_resched(); blk_start_plug(plug); } spin_lock(&sdp->sd_ail_lock); diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 33ca04733e93..8ae07f0871b1 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1774,7 +1774,6 @@ static void gfs2_evict_inodes(struct super_block *sb) iput(toput_inode); toput_inode = inode; - cond_resched(); spin_lock(&sb->s_inode_list_lock); } spin_unlock(&sb->s_inode_list_lock); diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c index d39246865c51..88459fea4548 100644 --- a/fs/hpfs/buffer.c +++ b/fs/hpfs/buffer.c @@ -77,8 +77,6 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head hpfs_prefetch_sectors(s, secno, ahead); - cond_resched(); - *bhp = bh = sb_bread(s, hpfs_search_hotfix_map(s, secno)); if (bh != NULL) return bh->b_data; @@ -97,8 +95,6 @@ void *hpfs_get_sector(struct super_block *s, unsigned secno, struct buffer_head hpfs_lock_assert(s); - cond_resched(); - if ((*bhp = bh = sb_getblk(s, hpfs_search_hotfix_map(s, secno))) != NULL) { if (!buffer_uptodate(bh)) wait_on_buffer(bh); set_buffer_uptodate(bh); @@ -118,8 +114,6 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe hpfs_lock_assert(s); - cond_resched(); - if (secno & 3) { pr_err("%s(): unaligned read\n", __func__); return NULL; @@ -168,8 +162,6 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe void *hpfs_get_4sectors(struct super_block *s, unsigned secno, struct quad_buffer_head *qbh) { - cond_resched(); - hpfs_lock_assert(s); if (secno & 3) { diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 316c4cebd3f3..21da053bdaaa 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -689,7 +689,6 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart, mutex_unlock(&hugetlb_fault_mutex_table[hash]); } folio_batch_release(&fbatch); - cond_resched(); } if (truncate_op) @@ -867,8 +866,6 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset, struct folio *folio; unsigned long addr; - cond_resched(); - /* * fallocate(2) manpage permits EINTR; we may have been * interrupted because we are using up too much memory. diff --git a/fs/inode.c b/fs/inode.c index 84bc3c76e5cc..f2898988bf40 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -695,7 +695,6 @@ static void dispose_list(struct list_head *head) list_del_init(&inode->i_lru); evict(inode); - cond_resched(); } } @@ -737,7 +736,6 @@ void evict_inodes(struct super_block *sb) */ if (need_resched()) { spin_unlock(&sb->s_inode_list_lock); - cond_resched(); dispose_list(&dispose); goto again; } @@ -778,7 +776,6 @@ void invalidate_inodes(struct super_block *sb) list_add(&inode->i_lru, &dispose); if (need_resched()) { spin_unlock(&sb->s_inode_list_lock); - cond_resched(); dispose_list(&dispose); goto again; } diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 2bc0aa23fde3..a76faf26b06e 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -927,7 +927,6 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i) if (unlikely(copied != status)) iov_iter_revert(i, copied - status); - cond_resched(); if (unlikely(status == 0)) { /* * A short copy made iomap_write_end() reject the @@ -1296,8 +1295,6 @@ static loff_t iomap_unshare_iter(struct iomap_iter *iter) if (WARN_ON_ONCE(bytes == 0)) return -EIO; - cond_resched(); - pos += bytes; written += bytes; length -= bytes; @@ -1533,10 +1530,8 @@ iomap_finish_ioends(struct iomap_ioend *ioend, int error) completions = iomap_finish_ioend(ioend, error); while (!list_empty(&tmp)) { - if (completions > IOEND_BATCH_SIZE * 8) { - cond_resched(); + if (completions > IOEND_BATCH_SIZE * 8) completions = 0; - } ioend = list_first_entry(&tmp, struct iomap_ioend, io_list); list_del_init(&ioend->io_list); completions += iomap_finish_ioend(ioend, error); diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 118699fff2f9..1f3c0813d0be 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -457,7 +457,6 @@ unsigned long jbd2_journal_shrink_checkpoint_list(journal_t *journal, } spin_unlock(&journal->j_list_lock); - cond_resched(); if (*nr_to_scan && next_tid) goto again; @@ -529,7 +528,6 @@ void jbd2_journal_destroy_checkpoint(journal_t *journal) } __jbd2_journal_clean_checkpoint_list(journal, true); spin_unlock(&journal->j_list_lock); - cond_resched(); } } diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 8d6f934c3d95..db7052ee0c62 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -729,7 +729,6 @@ void jbd2_journal_commit_transaction(journal_t *journal) bh->b_end_io = journal_end_buffer_io_sync; submit_bh(REQ_OP_WRITE | REQ_SYNC, bh); } - cond_resched(); /* Force a new descriptor to be generated next time round the loop. */ @@ -811,7 +810,6 @@ void jbd2_journal_commit_transaction(journal_t *journal) b_assoc_buffers); wait_on_buffer(bh); - cond_resched(); if (unlikely(!buffer_uptodate(bh))) err = -EIO; @@ -854,7 +852,6 @@ void jbd2_journal_commit_transaction(journal_t *journal) bh = list_entry(log_bufs.prev, struct buffer_head, b_assoc_buffers); wait_on_buffer(bh); - cond_resched(); if (unlikely(!buffer_uptodate(bh))) err = -EIO; diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index c269a7d29a46..fbc419d36cd0 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -509,8 +509,6 @@ static int do_one_pass(journal_t *journal, struct buffer_head * obh; struct buffer_head * nbh; - cond_resched(); - /* If we already know where to stop the log traversal, * check right now that we haven't gone past the end of * the log. */ diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c index 6ae9d6fefb86..4f9539211306 100644 --- a/fs/jffs2/build.c +++ b/fs/jffs2/build.c @@ -121,10 +121,8 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c) c->flags |= JFFS2_SB_FLAG_BUILDING; /* Now scan the directory tree, increasing nlink according to every dirent found. */ for_each_inode(i, c, ic) { - if (ic->scan_dents) { + if (ic->scan_dents) jffs2_build_inode_pass1(c, ic, &dir_hardlinks); - cond_resched(); - } } dbg_fsbuild("pass 1 complete\n"); @@ -141,7 +139,6 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c) continue; jffs2_build_remove_unlinked_inode(c, ic, &dead_fds); - cond_resched(); } dbg_fsbuild("pass 2a starting\n"); @@ -209,7 +206,6 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c) jffs2_free_full_dirent(fd); } ic->scan_dents = NULL; - cond_resched(); } ret = jffs2_build_xattr_subsystem(c); if (ret) diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index acd32f05b519..a2706246a68e 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -143,8 +143,6 @@ int jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count) BUG(); } - /* Be nice */ - cond_resched(); mutex_lock(&c->erase_free_sem); spin_lock(&c->erase_completion_lock); } @@ -387,7 +385,6 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl } } ofs += readlen; - cond_resched(); } ret = 0; fail: diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index 5c6602f3c189..3ba9054ac63c 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c @@ -923,8 +923,6 @@ static int jffs2_garbage_collect_deletion_dirent(struct jffs2_sb_info *c, struct for (raw = f->inocache->nodes; raw != (void *)f->inocache; raw = raw->next_in_ino) { - cond_resched(); - /* We only care about obsolete ones */ if (!(ref_obsolete(raw))) continue; diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index b86c78d178c6..7a56a5fb1637 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -578,7 +578,6 @@ void jffs2_kill_fragtree(struct rb_root *root, struct jffs2_sb_info *c) } jffs2_free_node_frag(frag); - cond_resched(); } } diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index a7bbe879cfc3..5f9ab75540f4 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -185,8 +185,6 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, } else if (ret) return ret; - cond_resched(); - if (signal_pending(current)) return -EINTR; @@ -227,7 +225,14 @@ int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, spin_unlock(&c->erase_completion_lock); if (ret == -EAGAIN) - cond_resched(); + /* + * The spin_unlock() above will implicitly reschedule + * if one is needed. + * + * In case we did not reschedule, take a breather here + * before retrying. + */ + cpu_relax(); else break; } diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 03b4f99614be..f9fc1f6451f8 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c @@ -1013,8 +1013,6 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf valid_ref = jffs2_first_valid_node(ref->next_in_ino); spin_unlock(&c->erase_completion_lock); - cond_resched(); - /* * At this point we don't know the type of the node we're going * to read, so we do not know the size of its header. In order diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 29671e33a171..aaf6b33ba200 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -143,8 +143,6 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) for (i=0; inr_blocks; i++) { struct jffs2_eraseblock *jeb = &c->blocks[i]; - cond_resched(); - /* reset summary info for next eraseblock scan */ jffs2_sum_reset_collected(s); @@ -621,8 +619,6 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo if (err) return err; - cond_resched(); - if (ofs & 3) { pr_warn("Eep. ofs 0x%08x not word-aligned!\n", ofs); ofs = PAD(ofs); diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index 4fe64519870f..5a4a6438a966 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c @@ -397,8 +397,6 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras for (i=0; isum_num); i++) { dbg_summary("processing summary index %d\n", i); - cond_resched(); - /* Make sure there's a spare ref for dirty space */ err = jffs2_prealloc_raw_node_refs(c, jeb, 2); if (err) diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index ce4b4760fcb1..d30011f3e935 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -2833,12 +2833,11 @@ void txQuiesce(struct super_block *sb) mutex_lock(&jfs_ip->commit_mutex); txCommit(tid, 1, &ip, 0); txEnd(tid); + /* + * The mutex_unlock() reschedules if needed. + */ mutex_unlock(&jfs_ip->commit_mutex); - /* - * Just to be safe. I don't know how - * long we can run without blocking - */ - cond_resched(); + TXN_LOCK(); } @@ -2912,11 +2911,6 @@ int jfs_sync(void *arg) mutex_unlock(&jfs_ip->commit_mutex); iput(ip); - /* - * Just to be safe. I don't know how - * long we can run without blocking - */ - cond_resched(); TXN_LOCK(); } else { /* We can't get the commit mutex. It may diff --git a/fs/libfs.c b/fs/libfs.c index 37f2d34ee090..c74cecca8557 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -125,9 +125,8 @@ static struct dentry *scan_positives(struct dentry *cursor, if (need_resched()) { list_move(&cursor->d_child, p); p = &cursor->d_child; - spin_unlock(&dentry->d_lock); - cond_resched(); - spin_lock(&dentry->d_lock); + + cond_resched_lock(&dentry->d_lock); } } spin_unlock(&dentry->d_lock); diff --git a/fs/mbcache.c b/fs/mbcache.c index 2a4b8b549e93..451d554d3f55 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -322,7 +322,6 @@ static unsigned long mb_cache_shrink(struct mb_cache *cache, spin_unlock(&cache->c_list_lock); __mb_cache_entry_free(cache, entry); shrunk++; - cond_resched(); spin_lock(&cache->c_list_lock); } spin_unlock(&cache->c_list_lock); diff --git a/fs/namei.c b/fs/namei.c index 94565bd7e73f..e911d7f15dad 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1781,7 +1781,6 @@ static const char *pick_link(struct nameidata *nd, struct path *link, if (!(nd->flags & LOOKUP_RCU)) { touch_atime(&last->link); - cond_resched(); } else if (atime_needs_update(&last->link, inode)) { if (!try_to_unlazy(nd)) return ERR_PTR(-ECHILD); diff --git a/fs/netfs/io.c b/fs/netfs/io.c index 7f753380e047..fe9487237b5d 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -641,7 +641,6 @@ int netfs_begin_read(struct netfs_io_request *rreq, bool sync) netfs_rreq_assess(rreq, false); if (!test_bit(NETFS_RREQ_IN_PROGRESS, &rreq->flags)) break; - cond_resched(); } ret = rreq->error; diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index cf7365581031..6b5b060b3658 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -650,7 +650,6 @@ static int nfs_server_return_marked_delegations(struct nfs_server *server, err = nfs_end_delegation_return(inode, delegation, 0); iput(inode); - cond_resched(); if (!err) goto restart; set_bit(NFS4CLNT_DELEGRETURN, &server->nfs_client->cl_state); @@ -1186,7 +1185,6 @@ static int nfs_server_reap_unclaimed_delegations(struct nfs_server *server, nfs_put_delegation(delegation); } iput(inode); - cond_resched(); goto restart; } rcu_read_unlock(); @@ -1318,7 +1316,6 @@ static int nfs_server_reap_expired_delegations(struct nfs_server *server, put_cred(cred); if (!nfs4_server_rebooted(server->nfs_client)) { iput(inode); - cond_resched(); goto restart; } nfs_inode_mark_test_expired_delegation(server,inode); diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 84343aefbbd6..10db43e1833a 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2665,14 +2665,12 @@ static int pnfs_layout_return_unused_byserver(struct nfs_server *server, spin_unlock(&inode->i_lock); rcu_read_unlock(); pnfs_put_layout_hdr(lo); - cond_resched(); goto restart; } spin_unlock(&inode->i_lock); rcu_read_unlock(); pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, false); pnfs_put_layout_hdr(lo); - cond_resched(); goto restart; } rcu_read_unlock(); diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 9d82d50ce0b1..eec3d641998b 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1053,7 +1053,6 @@ nfs_scan_commit_list(struct list_head *src, struct list_head *dst, ret++; if ((ret == max) && !cinfo->dreq) break; - cond_resched(); } return ret; } @@ -1890,8 +1889,6 @@ static void nfs_commit_release_pages(struct nfs_commit_data *data) atomic_long_inc(&NFS_I(data->inode)->redirtied_pages); next: nfs_unlock_and_release_request(req); - /* Latency breaker */ - cond_resched(); } nfss = NFS_SERVER(data->inode); if (atomic_long_read(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) @@ -1958,7 +1955,6 @@ static int __nfs_commit_inode(struct inode *inode, int how, } if (nscan < INT_MAX) break; - cond_resched(); } nfs_commit_end(cinfo.mds); if (ret || !may_wait) diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 13592e82eaf6..4ed6d5d23ade 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -2173,7 +2173,6 @@ static void nilfs_btree_lookup_dirty_buffers(struct nilfs_bmap *btree, } while ((bh = bh->b_this_page) != head); } folio_batch_release(&fbatch); - cond_resched(); } for (level = NILFS_BTREE_LEVEL_NODE_MIN; diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 1a8bd5993476..a5780f54ac6d 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -1280,7 +1280,6 @@ int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, } blkoff += n; } - cond_resched(); } while (true); /* If ret is 1 then we just hit the end of the extent array */ diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index b4e54d079b7d..71c5b6792e5f 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c @@ -277,7 +277,6 @@ int nilfs_copy_dirty_pages(struct address_space *dmap, folio_unlock(folio); } folio_batch_release(&fbatch); - cond_resched(); if (likely(!err)) goto repeat; @@ -346,7 +345,6 @@ void nilfs_copy_back_pages(struct address_space *dmap, folio_unlock(folio); } folio_batch_release(&fbatch); - cond_resched(); goto repeat; } @@ -382,7 +380,6 @@ void nilfs_clear_dirty_pages(struct address_space *mapping, bool silent) folio_unlock(folio); } folio_batch_release(&fbatch); - cond_resched(); } } @@ -539,7 +536,6 @@ unsigned long nilfs_find_uncommitted_extent(struct inode *inode, } while (++i < nr_folios); folio_batch_release(&fbatch); - cond_resched(); goto repeat; out_locked: diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 7ec16879756e..45c65b450119 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -361,7 +361,6 @@ static void nilfs_transaction_lock(struct super_block *sb, nilfs_segctor_do_immediate_flush(sci); up_write(&nilfs->ns_segctor_sem); - cond_resched(); } if (gcflag) ti->ti_flags |= NILFS_TI_GC; @@ -746,13 +745,11 @@ static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode, ndirties++; if (unlikely(ndirties >= nlimit)) { folio_batch_release(&fbatch); - cond_resched(); return ndirties; } } while (bh = bh->b_this_page, bh != head); } folio_batch_release(&fbatch); - cond_resched(); goto repeat; } @@ -785,7 +782,6 @@ static void nilfs_lookup_dirty_node_buffers(struct inode *inode, } while (bh != head); } folio_batch_release(&fbatch); - cond_resched(); } } diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 62fe0b679e58..64a66e1aeac4 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -805,7 +805,6 @@ static ssize_t fanotify_read(struct file *file, char __user *buf, * User can supply arbitrarily large buffer. Avoid softlockups * in case there are lots of available events. */ - cond_resched(); event = get_one_event(group, count); if (IS_ERR(event)) { ret = PTR_ERR(event); diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 7974e91ffe13..a6aff29204f6 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c @@ -79,7 +79,6 @@ static void fsnotify_unmount_inodes(struct super_block *sb) iput_inode = inode; - cond_resched(); spin_lock(&sb->s_inode_list_lock); } spin_unlock(&sb->s_inode_list_lock); diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index f79408f9127a..173f6fcfef54 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -2556,7 +2556,6 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) set_page_dirty(page); put_page(page); balance_dirty_pages_ratelimited(mapping); - cond_resched(); if (idx == end) goto done; idx++; @@ -2597,7 +2596,6 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) unlock_page(page); put_page(page); balance_dirty_pages_ratelimited(mapping); - cond_resched(); } /* If there is a last partial page, need to do it the slow way. */ if (end_ofs) { @@ -2614,7 +2612,6 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) set_page_dirty(page); put_page(page); balance_dirty_pages_ratelimited(mapping); - cond_resched(); } done: ntfs_debug("Done."); diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index cbc545999cfe..a03ad2d7faf7 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -259,7 +259,6 @@ static int ntfs_attr_extend_initialized(ntfs_inode *ni, const s64 new_init_size) * files. */ balance_dirty_pages_ratelimited(mapping); - cond_resched(); } while (++index < end_index); read_lock_irqsave(&ni->size_lock, flags); BUG_ON(ni->initialized_size != new_init_size); @@ -1868,7 +1867,6 @@ static ssize_t ntfs_perform_write(struct file *file, struct iov_iter *i, iov_iter_revert(i, copied); break; } - cond_resched(); if (unlikely(copied < bytes)) { iov_iter_revert(i, copied); if (copied) diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index 1f7a194983c5..cfb09f47a588 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -158,7 +158,6 @@ static int ntfs_extend_initialized_size(struct file *file, break; balance_dirty_pages_ratelimited(mapping); - cond_resched(); } return 0; @@ -241,7 +240,6 @@ static int ntfs_zero_range(struct inode *inode, u64 vbo, u64 vbo_to) unlock_page(page); put_page(page); - cond_resched(); } out: mark_inode_dirty(inode); @@ -1005,13 +1003,6 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from) if (err) goto out; - /* - * We can loop for a long time in here. Be nice and allow - * us to schedule out to avoid softlocking if preempt - * is disabled. - */ - cond_resched(); - pos += copied; written += copied; diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index dad976a68985..8fa4bb50b0b1 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -2265,8 +2265,6 @@ int ni_decompress_file(struct ntfs_inode *ni) if (err) goto out; - - cond_resched(); } remove_wof: diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index aef58f1395c8..2fccabc7aa51 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -7637,10 +7637,8 @@ int ocfs2_trim_mainbm(struct super_block *sb, struct fstrim_range *range) * main_bm related locks for avoiding the current IO starve, then go to * trim the next group */ - if (ret >= 0 && group <= last_group) { - cond_resched(); + if (ret >= 0 && group <= last_group) goto next_group; - } out: range->len = trimmed * sb->s_blocksize; return ret; diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 960080753d3b..7bf6f46bd429 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -951,7 +951,12 @@ static void o2net_sendpage(struct o2net_sock_container *sc, if (ret == (ssize_t)-EAGAIN) { mlog(0, "sendpage of size %zu to " SC_NODEF_FMT " returned EAGAIN\n", size, SC_NODEF_ARGS(sc)); - cond_resched(); + + /* + * Take a breather before retrying. Though maybe this + * should be a wait on an event or a timeout? + */ + cpu_relax(); continue; } mlog(ML_ERROR, "sendpage of size %zu to " SC_NODEF_FMT @@ -1929,7 +1934,6 @@ static void o2net_accept_many(struct work_struct *work) o2net_accept_one(sock, &more); if (!more) break; - cond_resched(); } } diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index eedf07ca23ca..271e0f7405e5 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c @@ -792,11 +792,10 @@ static int dlm_thread(void *data) spin_unlock(&dlm->spinlock); dlm_flush_asts(dlm); - /* yield and continue right away if there is more work to do */ - if (!n) { - cond_resched(); + /* An unlock above would have led to a yield if one was + * needed. Continue right away if there is more to do */ + if (!n) continue; - } wait_event_interruptible_timeout(dlm->dlm_thread_wq, !dlm_dirty_list_empty(dlm) || diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index c45596c25c66..f977337a33db 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -940,6 +940,10 @@ static int ocfs2_zero_extend_range(struct inode *inode, u64 range_start, BUG_ON(range_start >= range_end); while (zero_pos < range_end) { + /* + * If this is a very long extent, then we might be here + * awhile. We should expect the scheduler to preempt us. + */ next_pos = (zero_pos & PAGE_MASK) + PAGE_SIZE; if (next_pos > range_end) next_pos = range_end; @@ -949,12 +953,6 @@ static int ocfs2_zero_extend_range(struct inode *inode, u64 range_start, break; } zero_pos = next_pos; - - /* - * Very large extends have the potential to lock up - * the cpu for extended periods of time. - */ - cond_resched(); } return rc; diff --git a/fs/proc/base.c b/fs/proc/base.c index ffd54617c354..fec3dc6a887d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -3532,7 +3532,6 @@ int proc_pid_readdir(struct file *file, struct dir_context *ctx) char name[10 + 1]; unsigned int len; - cond_resched(); if (!has_pid_permissions(fs_info, iter.task, HIDEPID_INVISIBLE)) continue; diff --git a/fs/proc/fd.c b/fs/proc/fd.c index 6276b3938842..b014c44b96e9 100644 --- a/fs/proc/fd.c +++ b/fs/proc/fd.c @@ -272,7 +272,6 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx, name, len, instantiate, p, &data)) goto out; - cond_resched(); rcu_read_lock(); } rcu_read_unlock(); diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 23fc24d16b31..4625dea20bc6 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -491,7 +491,6 @@ static ssize_t read_kcore_iter(struct kiocb *iocb, struct iov_iter *iter) if (page_offline_frozen++ % MAX_ORDER_NR_PAGES == 0) { page_offline_thaw(); - cond_resched(); page_offline_freeze(); } diff --git a/fs/proc/page.c b/fs/proc/page.c index 195b077c0fac..14fd181baf57 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -80,8 +80,6 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, pfn++; out++; count -= KPMSIZE; - - cond_resched(); } *ppos += (char __user *)out - buf; @@ -258,8 +256,6 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf, pfn++; out++; count -= KPMSIZE; - - cond_resched(); } *ppos += (char __user *)out - buf; @@ -313,8 +309,6 @@ static ssize_t kpagecgroup_read(struct file *file, char __user *buf, pfn++; out++; count -= KPMSIZE; - - cond_resched(); } *ppos += (char __user *)out - buf; diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 3dd5be96691b..49c2ebcb5fd9 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -629,7 +629,6 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, smaps_pte_entry(pte, addr, walk); pte_unmap_unlock(pte - 1, ptl); out: - cond_resched(); return 0; } @@ -1210,7 +1209,6 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, ClearPageReferenced(page); } pte_unmap_unlock(pte - 1, ptl); - cond_resched(); return 0; } @@ -1554,8 +1552,6 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, } pte_unmap_unlock(orig_pte, ptl); - cond_resched(); - return err; } @@ -1605,8 +1601,6 @@ static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask, frame++; } - cond_resched(); - return err; } #else @@ -1899,7 +1893,6 @@ static int gather_pte_stats(pmd_t *pmd, unsigned long addr, } while (pte++, addr += PAGE_SIZE, addr != end); pte_unmap_unlock(orig_pte, ptl); - cond_resched(); return 0; } #ifdef CONFIG_HUGETLB_PAGE diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 31e897ad5e6a..994d69edf349 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1068,7 +1068,6 @@ static int add_dquot_ref(struct super_block *sb, int type) * later. */ old_inode = inode; - cond_resched(); spin_lock(&sb->s_inode_list_lock); } spin_unlock(&sb->s_inode_list_lock); diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 015bfe4e4524..74b503a46884 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -814,7 +814,6 @@ static int write_ordered_buffers(spinlock_t * lock, if (chunk.nr) write_ordered_chunk(&chunk); wait_on_buffer(bh); - cond_resched(); spin_lock(lock); goto loop_next; } @@ -1671,7 +1670,6 @@ static int write_one_transaction(struct super_block *s, } next: cn = cn->next; - cond_resched(); } return ret; } diff --git a/fs/select.c b/fs/select.c index 0ee55af1a55c..1d05de51c543 100644 --- a/fs/select.c +++ b/fs/select.c @@ -573,7 +573,6 @@ static int do_select(int n, fd_set_bits *fds, struct timespec64 *end_time) *routp = res_out; if (res_ex) *rexp = res_ex; - cond_resched(); } wait->_qproc = NULL; if (retval || timed_out || signal_pending(current)) diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 2108b3b40ce9..da3b31b02b45 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -2713,7 +2713,6 @@ static void cifs_extend_writeback(struct address_space *mapping, } folio_batch_release(&batch); - cond_resched(); } while (!stop); *_len = len; @@ -2951,7 +2950,6 @@ static int cifs_writepages_region(struct address_space *mapping, } folio_batch_release(&fbatch); - cond_resched(); } while (wbc->nr_to_write > 0); *_next = start; diff --git a/fs/splice.c b/fs/splice.c index d983d375ff11..0b43bedbf36f 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -604,7 +604,6 @@ ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, struct splice_desc *sd, splice_from_pipe_begin(sd); do { - cond_resched(); ret = splice_from_pipe_next(pipe, sd); if (ret > 0) ret = splice_from_pipe_feed(pipe, sd, actor); diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index d76eb7b39f56..b9100c713964 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c @@ -477,7 +477,6 @@ int ubifs_budget_space(struct ubifs_info *c, struct ubifs_budget_req *req) } err = make_free_space(c); - cond_resched(); if (err == -EAGAIN) { dbg_budg("try again"); goto again; diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index c4fc1047fc07..2fd6aef59b7d 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c @@ -309,7 +309,6 @@ int ubifs_bg_thread(void *info) ubifs_ro_mode(c, err); run_bg_commit(c); - cond_resched(); } ubifs_msg(c, "background thread \"%s\" stops", c->bgt_name); diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index eef9e527d9ff..add4b72fd52f 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -852,7 +852,6 @@ void ubifs_dump_leb(const struct ubifs_info *c, int lnum) sleb->nodes_cnt, sleb->endpt); list_for_each_entry(snod, &sleb->nodes, list) { - cond_resched(); pr_err("Dumping node at LEB %d:%d len %d\n", lnum, snod->offs, snod->len); ubifs_dump_node(c, snod->node, c->leb_size - snod->offs); @@ -1622,8 +1621,6 @@ int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb, while (1) { int idx; - cond_resched(); - if (znode_cb) { err = znode_cb(c, znode, priv); if (err) { @@ -2329,7 +2326,6 @@ int dbg_check_data_nodes_order(struct ubifs_info *c, struct list_head *head) ino_t inuma, inumb; uint32_t blka, blkb; - cond_resched(); sa = container_of(cur, struct ubifs_scan_node, list); sb = container_of(cur->next, struct ubifs_scan_node, list); @@ -2396,7 +2392,6 @@ int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head) ino_t inuma, inumb; uint32_t hasha, hashb; - cond_resched(); sa = container_of(cur, struct ubifs_scan_node, list); sb = container_of(cur->next, struct ubifs_scan_node, list); diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 2f48c58d47cd..7baa86efa471 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -683,7 +683,6 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx) kfree(file->private_data); ctx->pos = key_hash_flash(c, &dent->key); file->private_data = dent; - cond_resched(); } out: diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index 3134d070fcc0..d85bcb64e9a8 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c @@ -109,7 +109,6 @@ static int data_nodes_cmp(void *priv, const struct list_head *a, struct ubifs_info *c = priv; struct ubifs_scan_node *sa, *sb; - cond_resched(); if (a == b) return 0; @@ -153,7 +152,6 @@ static int nondata_nodes_cmp(void *priv, const struct list_head *a, struct ubifs_info *c = priv; struct ubifs_scan_node *sa, *sb; - cond_resched(); if (a == b) return 0; @@ -305,7 +303,6 @@ static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb, { int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used; - cond_resched(); err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len); if (err) return err; @@ -695,8 +692,6 @@ int ubifs_garbage_collect(struct ubifs_info *c, int anyway) /* Maybe continue after find and break before find */ lp.lnum = -1; - cond_resched(); - /* Give the commit an opportunity to run */ if (ubifs_gc_should_commit(c)) { ret = -EAGAIN; diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 01d8eb170382..4915ab97f7ce 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -683,8 +683,6 @@ int ubifs_bg_wbufs_sync(struct ubifs_info *c) for (i = 0; i < c->jhead_cnt; i++) { struct ubifs_wbuf *wbuf = &c->jheads[i].wbuf; - cond_resched(); - /* * If the mutex is locked then wbuf is being changed, so * synchronization is not necessary. diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index 6d6cd85c2b4c..57e4d001125a 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c @@ -1113,8 +1113,6 @@ static int scan_check_cb(struct ubifs_info *c, list_for_each_entry(snod, &sleb->nodes, list) { int found, level = 0; - cond_resched(); - if (is_idx == -1) is_idx = (snod->type == UBIFS_IDX_NODE) ? 1 : 0; diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index c4d079328b92..0cadd08f6304 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c @@ -1483,7 +1483,6 @@ static int dbg_is_nnode_dirty(struct ubifs_info *c, int lnum, int offs) for (; nnode; nnode = next_nnode(c, nnode, &hght)) { struct ubifs_nbranch *branch; - cond_resched(); if (nnode->parent) { branch = &nnode->parent->nbranch[nnode->iip]; if (branch->lnum != lnum || branch->offs != offs) @@ -1517,7 +1516,6 @@ static int dbg_is_pnode_dirty(struct ubifs_info *c, int lnum, int offs) struct ubifs_pnode *pnode; struct ubifs_nbranch *branch; - cond_resched(); pnode = ubifs_pnode_lookup(c, i); if (IS_ERR(pnode)) return PTR_ERR(pnode); @@ -1673,7 +1671,6 @@ int dbg_check_ltab(struct ubifs_info *c) pnode = ubifs_pnode_lookup(c, i); if (IS_ERR(pnode)) return PTR_ERR(pnode); - cond_resched(); } /* Check nodes */ diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c index 4909321d84cf..23572f418a8b 100644 --- a/fs/ubifs/orphan.c +++ b/fs/ubifs/orphan.c @@ -957,7 +957,6 @@ static int dbg_read_orphans(struct check_info *ci, struct ubifs_scan_leb *sleb) int i, n, err; list_for_each_entry(snod, &sleb->nodes, list) { - cond_resched(); if (snod->type != UBIFS_ORPH_NODE) continue; orph = snod->node; diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index f0d51dd21c9e..6b1bf684ec14 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -638,8 +638,6 @@ struct ubifs_scan_leb *ubifs_recover_leb(struct ubifs_info *c, int lnum, dbg_scan("look at LEB %d:%d (%d bytes left)", lnum, offs, len); - cond_resched(); - /* * Scan quietly until there is an error from which we cannot * recover @@ -999,8 +997,6 @@ static int clean_an_unclean_leb(struct ubifs_info *c, while (len >= 8) { int ret; - cond_resched(); - /* Scan quietly until there is an error */ ret = ubifs_scan_a_node(c, buf, len, lnum, offs, quiet); diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 4211e4456b1e..9a361d8f998e 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c @@ -305,7 +305,6 @@ static int replay_entries_cmp(void *priv, const struct list_head *a, struct ubifs_info *c = priv; struct replay_entry *ra, *rb; - cond_resched(); if (a == b) return 0; @@ -332,8 +331,6 @@ static int apply_replay_list(struct ubifs_info *c) list_sort(c, &c->replay_list, &replay_entries_cmp); list_for_each_entry(r, &c->replay_list, list) { - cond_resched(); - err = apply_replay_entry(c, r); if (err) return err; @@ -722,8 +719,6 @@ static int replay_bud(struct ubifs_info *c, struct bud_entry *b) u8 hash[UBIFS_HASH_ARR_SZ]; int deletion = 0; - cond_resched(); - if (snod->sqnum >= SQNUM_WATERMARK) { ubifs_err(c, "file system's life ended"); goto out_dump; @@ -1060,8 +1055,6 @@ static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) } list_for_each_entry(snod, &sleb->nodes, list) { - cond_resched(); - if (snod->sqnum >= SQNUM_WATERMARK) { ubifs_err(c, "file system's life ended"); goto out_dump; diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c index 84a9157dcc32..db3fc3297d1a 100644 --- a/fs/ubifs/scan.c +++ b/fs/ubifs/scan.c @@ -269,8 +269,6 @@ struct ubifs_scan_leb *ubifs_scan(const struct ubifs_info *c, int lnum, dbg_scan("look at LEB %d:%d (%d bytes left)", lnum, offs, len); - cond_resched(); - ret = ubifs_scan_a_node(c, buf, len, lnum, offs, quiet); if (ret > 0) { /* Padding bytes or a valid padding node */ diff --git a/fs/ubifs/shrinker.c b/fs/ubifs/shrinker.c index d00a6f20ac7b..f381f844c321 100644 --- a/fs/ubifs/shrinker.c +++ b/fs/ubifs/shrinker.c @@ -125,7 +125,6 @@ static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) zprev = znode; znode = ubifs_tnc_levelorder_next(c, c->zroot.znode, znode); - cond_resched(); } return total_freed; diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index b08fb28d16b5..0307d12d29d2 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -949,8 +949,6 @@ static int check_volume_empty(struct ubifs_info *c) c->empty = 0; break; } - - cond_resched(); } return 0; diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c index a55e04822d16..97218e7d380d 100644 --- a/fs/ubifs/tnc_commit.c +++ b/fs/ubifs/tnc_commit.c @@ -857,8 +857,6 @@ static int write_index(struct ubifs_info *c) while (1) { u8 hash[UBIFS_HASH_ARR_SZ]; - cond_resched(); - znode = cnext; idx = c->cbuf + used; diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c index 4d686e34e64d..b92d2ca00a0b 100644 --- a/fs/ubifs/tnc_misc.c +++ b/fs/ubifs/tnc_misc.c @@ -235,7 +235,6 @@ long ubifs_destroy_tnc_subtree(const struct ubifs_info *c, !ubifs_zn_dirty(zn->zbranch[n].znode)) clean_freed += 1; - cond_resched(); kfree(zn->zbranch[n].znode); } diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 56eaae9dac1a..ad8500e831ba 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -914,7 +914,6 @@ static int userfaultfd_release(struct inode *inode, struct file *file) mmap_write_lock(mm); prev = NULL; for_each_vma(vmi, vma) { - cond_resched(); BUG_ON(!!vma->vm_userfaultfd_ctx.ctx ^ !!(vma->vm_flags & __VM_UFFD_FLAGS)); if (vma->vm_userfaultfd_ctx.ctx != ctx) { @@ -1277,7 +1276,6 @@ static __always_inline void wake_userfault(struct userfaultfd_ctx *ctx, seq = read_seqcount_begin(&ctx->refile_seq); need_wakeup = waitqueue_active(&ctx->fault_pending_wqh) || waitqueue_active(&ctx->fault_wqh); - cond_resched(); } while (read_seqcount_retry(&ctx->refile_seq, seq)); if (need_wakeup) __wake_userfault(ctx, range); @@ -1392,8 +1390,6 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx, basic_ioctls = false; cur = vma; do { - cond_resched(); - BUG_ON(!!cur->vm_userfaultfd_ctx.ctx ^ !!(cur->vm_flags & __VM_UFFD_FLAGS)); @@ -1458,7 +1454,6 @@ static int userfaultfd_register(struct userfaultfd_ctx *ctx, ret = 0; for_each_vma_range(vmi, vma, end) { - cond_resched(); BUG_ON(!vma_can_userfault(vma, vm_flags)); BUG_ON(vma->vm_userfaultfd_ctx.ctx && @@ -1603,8 +1598,6 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx, found = false; cur = vma; do { - cond_resched(); - BUG_ON(!!cur->vm_userfaultfd_ctx.ctx ^ !!(cur->vm_flags & __VM_UFFD_FLAGS)); @@ -1629,8 +1622,6 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx, ret = 0; for_each_vma_range(vmi, vma, end) { - cond_resched(); - BUG_ON(!vma_can_userfault(vma, vma->vm_flags)); /* diff --git a/fs/verity/enable.c b/fs/verity/enable.c index c284f46d1b53..a13623717dd6 100644 --- a/fs/verity/enable.c +++ b/fs/verity/enable.c @@ -152,7 +152,6 @@ static int build_merkle_tree(struct file *filp, err = -EINTR; goto out; } - cond_resched(); } /* Finish all nonempty pending tree blocks. */ for (level = 0; level < num_levels; level++) { diff --git a/fs/verity/read_metadata.c b/fs/verity/read_metadata.c index f58432772d9e..1b0102faae6c 100644 --- a/fs/verity/read_metadata.c +++ b/fs/verity/read_metadata.c @@ -71,7 +71,6 @@ static int fsverity_read_merkle_tree(struct inode *inode, err = -EINTR; break; } - cond_resched(); offs_in_page = 0; } return retval ? retval : err; diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h index cabdc0e16838..97022145e888 100644 --- a/fs/xfs/scrub/common.h +++ b/fs/xfs/scrub/common.h @@ -16,13 +16,6 @@ xchk_should_terminate( struct xfs_scrub *sc, int *error) { - /* - * If preemption is disabled, we need to yield to the scheduler every - * few seconds so that we don't run afoul of the soft lockup watchdog - * or RCU stall detector. - */ - cond_resched(); - if (fatal_signal_pending(current)) { if (*error == 0) *error = -EINTR; diff --git a/fs/xfs/scrub/xfarray.c b/fs/xfs/scrub/xfarray.c index f0f532c10a5a..59deed2fae80 100644 --- a/fs/xfs/scrub/xfarray.c +++ b/fs/xfs/scrub/xfarray.c @@ -498,13 +498,6 @@ xfarray_sort_terminated( struct xfarray_sortinfo *si, int *error) { - /* - * If preemption is disabled, we need to yield to the scheduler every - * few seconds so that we don't run afoul of the soft lockup watchdog - * or RCU stall detector. - */ - cond_resched(); - if ((si->flags & XFARRAY_SORT_KILLABLE) && fatal_signal_pending(current)) { if (*error == 0) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 465d7630bb21..cba03bff03ab 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -171,7 +171,6 @@ xfs_end_io( list_del_init(&ioend->io_list); iomap_ioend_try_merge(ioend, &tmp); xfs_end_ioend(ioend); - cond_resched(); } } diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c index 3c210ac83713..d0ffbf581355 100644 --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -1716,8 +1716,6 @@ xfs_icwalk_ag( if (error == -EFSCORRUPTED) break; - cond_resched(); - if (icw && (icw->icw_flags & XFS_ICWALK_FLAG_SCAN_LIMIT)) { icw->icw_scan_limit -= XFS_LOOKUP_BATCH; if (icw->icw_scan_limit <= 0) diff --git a/fs/xfs/xfs_iwalk.c b/fs/xfs/xfs_iwalk.c index b3275e8d47b6..908881df15ed 100644 --- a/fs/xfs/xfs_iwalk.c +++ b/fs/xfs/xfs_iwalk.c @@ -420,7 +420,6 @@ xfs_iwalk_ag( struct xfs_inobt_rec_incore *irec; xfs_ino_t rec_fsino; - cond_resched(); if (xfs_pwork_want_abort(&iwag->pwork)) goto out; From patchwork Tue Nov 7 23:08:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42B82C4332F for ; Tue, 7 Nov 2023 23:10:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83E444401AA; Tue, 7 Nov 2023 18:09:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C452440186; Tue, 7 Nov 2023 18:09:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52AAF4401AA; Tue, 7 Nov 2023 18:09:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 33758440186 for ; Tue, 7 Nov 2023 18:09:51 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1A9BD160116 for ; Tue, 7 Nov 2023 23:09:51 +0000 (UTC) X-FDA: 81432702582.04.F7EBD67 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf07.hostedemail.com (Postfix) with ESMTP id C6BA440014 for ; Tue, 7 Nov 2023 23:09:47 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MfUi3IqB; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="sTK/dO8K"; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf07.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398587; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=c5yhecXpPDSuI0GmvS2MfP/t3MkFkdYdazz4/Wa0kwY=; b=s6YlLkSxMQcR98uwbok8kXm1sUSOLkuUK8V0F/W6t0xywRuQsAkHcxzx9Yi2e9EA6lyngP YmctS0eHZ+ErZLtFgamheD0RiOKgrZP4NyB4wCUQKmNRYzI6zLhywubPlHKp659bXgo0wY 6feg0zRorpgEtNPzAp4OyyjBzf1y/0Y= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=MfUi3IqB; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="sTK/dO8K"; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf07.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398587; a=rsa-sha256; cv=pass; b=f7eqsVSGuyUHb/jWHafmjCZ6ggGOwvLQJzVjVCimsmqarbh2RXdebR98/Uzy7dpSKN7kjy X5YqQsA3U4mJCdSEvV41DHdLWaUcoSD9zK5A+TV8cSPT/jI9gw2m+C1nPoqBexij+Ymk0B vFnBl06lV6f/YVdHOd77IgxYyIj0O68= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJw4Z004992; Tue, 7 Nov 2023 23:09:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=c5yhecXpPDSuI0GmvS2MfP/t3MkFkdYdazz4/Wa0kwY=; b=MfUi3IqBxui6sIP6wN4tJ399EWlkfEJW5L9jp4Ak2WF//zB23mMfuUW3Xg3TfSO8NGFt Bwm15k7koLp3vpFef98nv5DAfZBWHdaGBIkuNaKwKwtWOXeCzkS4s5rVB37lxjU4kEBG JzSHreLlehmTdR1gVNQURhBbcPEEwAFVZHB5IGNWHaRFZea9kHfbOj/SJbCBufjq0ano hU5ha6nbS4hMTSn+YiNExk7An/l782GTsMRbyaaBrcFzBqfiDD47IwVUd3CKN313+Kwr JtKXdX0nFTkfZqRFdoYsFUZVwznh0ZvV0JLmKA+uq3kqP0Vh0UKTLK3n0Nck+v6IMzhu lw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6be-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:30 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2B2B000412; Tue, 7 Nov 2023 23:09:30 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbxd-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nuHz+tCZGY5QR5s1YdhEgdpxiVyskdiXCwKSvkKyZqrqGQT8t+wv9E5j6dXqD+wAxhKtKDzhKnfNz9nG9SF/VlkgD5zgmHRmOLfLYOFZwUlBIQyP6cvaHY3cQ/IVqrLe29FJigNfG3vYsb3kIytONERCbviAhLRfRxM5u3UpfDvrfWtQkZHCatJK22ovUXGS3Kp3fXbwIqeOH+ceRJFiqHbRNRrdZYOYGkVhVi6qazPb7Ad+bKl5U74rC8f+HZued6Ajebq94nY3fk/26+CS2cFBMIHe4vrCe3qJKdguDKlfdxHCMupT3Xe1X8Ukp/5eFQ+MToZ+nOIDtlrRH4K77w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=c5yhecXpPDSuI0GmvS2MfP/t3MkFkdYdazz4/Wa0kwY=; b=EhGDwBMkkgOO6cA3Hi6RhZE6EDxw1Lwlb1PymkvILOOj0Bnlmu8LLRzLf69q65NxXh3qTbvlAjqmIK2vWBdgVC292jHZ7cdRjMmZ3yqzWuITqKgKDMsj4euFE1dkEqp6iHjTSNUWc8AcnExGECA8VqnBAIlZOiXzBAoY+esR6sqw0K6aDCw33F69ZsVcHjeog0il1lcAJYYWM4QvONDJrigXALXpb+OjqfrPJ9anv4Jp0ArBfdEMGAoLJEpLZXyGpztjiCtkCPTGQanmRxBzxIVGeo2lZkO17v8Tl+Df8Chu0NSUoMhycB0Q/VMLEqPiod7OaPCik3ll2olXb8vIQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c5yhecXpPDSuI0GmvS2MfP/t3MkFkdYdazz4/Wa0kwY=; b=sTK/dO8K1F6YSpxEGLNDxbNmpJbkDsBqM/EJjRbsNhp9IzOAWCfV0QXkmOOzqohkNtOVil9nmfErVQGp/FncUZFprTe/EgIt8MqZQyJaCsco/EBMgtYXQQyWXK91+rPsjQAIpdrRAg5yerETRcHDv+2R0e6zTkoD2AHmlJ754kY= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:26 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:26 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Stefano Stabellini , Oleksandr Tyshchenko , Paolo Bonzini Subject: [RFC PATCH 75/86] treewide: virt: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:11 -0800 Message-Id: <20231107230822.371443-19-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0164.namprd03.prod.outlook.com (2603:10b6:303:8d::19) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: b0035c91-4d51-4495-c757-08dbdfe69687 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9Gp0USXX6rAwsANGV7f4z2LUsKTSCR7PkxiO8PHp3Y41gQ4IfSeXv6i23ihn4oc+jY8ysY4rtP041U8SdyEbTtyLis7uY5teUsap+1uDfhXH0VTjsKgxg4/mitIecv/ooqPapK2M+QtETu/Kr/PR+R6CG5JEb81EgGnIyci9VAYf5idCFyTQxxKDF0ELVoTuvVWjrHtkrina1H8F1HH5PkDIhdQ/Zq7y2MCFJk/IwaKYHa4exoSZ+MtbuMFMIRvxTv9PyQODeyPCfdFCQRpsjcgGX0jFxfYeAeDiNVMIaE13eLVRra0FuELQlHoVFGpITohkzgGuFO+8lk/EjZ6CE+M2o8t6XpYsQYKcbM8f92UBAToErh3yfqAjl7EPdZHkzc0yNhKpfjNyykKBIdSeEfAHXoKFkhsiJu9LCE1Ui66GtmUqxx0ClmhQQKmoFwz9YxzT/DLFh1YgZrQiVsyMt6C5gCftqeXTypV0s/BHg8y8hqihAfZvvTUtzZntSzLFgkCS/Pw2lryjWSCqBAzfVWPHZ518+7aWoY3aRMThhtU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JpLVvgsv87KNLBxjAxcW7WucJ2Isc4d53YiKsBfXLcADM47ZU5SDeZVHvAvc2CJx19Hsm1v8UupSENS7Ig34mycCL0ksScBfftZPTwM8+QtJ4UwuPGBYc9kU6ZhixjeXRwnF59LHx2gc7GiZwkO3hniyM5UHiOhFyRWlUbw4DTRntYlUO+Ba2pWoVyfh3yxaH4008nvPah1K9EJ/hyN23YdUiu7dIBjjClyOuzfi4zlri2ip161i08N6S6kiscOgkdkptUqZudByuOngj22tY25hqX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rsZt/PnO5CqPr7UqcsiddUK0bBcOlJ/AR0fngvOW8BJ6W8KepnAn76+N0hxGfpoEwPX0rVf7cVKsqaQgmVcQUipwLk+zX5oZzfsnKpBxb5bkNPnTck2wEHf85f8npm9ZFFoxCBkl2EH+jCFdZz+Dp9eHwRGbEuzahWQLR9ZTx5tRgFXmLFy4Q6y89nbA3QSUYnSF18FiHxGyNY8od2ZWjl9T8eJVd9ch/M8mx7OumEf+bX7Ou7fn0/8y98z0HLs1TdMoS0A== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: uJDoScoed39OqTYC6IDD1N1p0T7b2iDBtv00YxN4sBkKxH8tUjVGhW/u4+B05SnIxCSHek81URCKRpDEmU0eNKbOC6gkIzAYbU1/n0F+bncchMgm232An8UwtjJukjdP0xMUyVn2t+U3FRj3hdq2aCM3mPtZq7zvFpFGi+WTAIhhR1tEJBXMUHHAOJnQxcVYfFaeq6WS+r+LnEq/oac3bshufHRGclQRkP4mNHEUJnwyDegBqaTjxRlA+Mf4+uiRUhuwbddBah1B3SUInHLhrn0ApgKafBwXn1njdAPDMIePlrVHq/4aUYbWjcvkckUkuAIQxBHqDXD9/gfwEQjdyy3l5A7SVcApRUFpSWStC2Lbzg6628eDNumgSxLx453hT6245hm06oNRQquggbMiFg5YxlsfAaZLR5KZ6LKiWfnUWLsaklxEH3qkOO2LOwohy09zbBeX+V55eVCn6ghj6Yy1c53abCKwb0GCcFndsvB/drgrG4ZodIMh/UVLfoZY99tC1QE7z3iWjGvGftnw6n+oPDr8+NRhN7pm1410X+FIiuULN0FjAaPQ+aASktODnjo9blojbXcACK6kocCiISnXpFQCJRDPGcEKqQZDMi675SoBWpdppcQJwjysAWawK8zbqtcytLy/7iE6PVwUqverhZm+PrDRm6xzgKwkrsqFwYe9sE6gDc29dEOA8Qh2A/ao9/1Z4OKqFUmz5M6ohN3wq1uZJgF8LRzJ/MAqP4qzSTlQJmFomm47jGDMu9KvwQl7vYuySMvtSEIOFVakSFnmSJoGzjw09iE3Pl8Zwkb/yFjQH0eeTvXYQQkiEdkJngH6Mftdwf2CdehPZdYKMNpMH8wzRz+NcWs+SRD57LLEmByOpctR+rr2ne9h6rSiczp3Ywxmh/F6YeMnvAXl94A/mb+xEFXrc9JWOYuSUq/k4ov38M83o2bnStWy4Ex0zSZgyS3/qwP9/6npMjw/wpHfRczOusdZ+nYgRA9SqT8V0RlZ2i1rWzCuWUzmYxNMpeQhwROj6iXOJ8y/eiyxCy5DJNgU+6xt8UdQVy3DRl4wn4JQW3OW8st4/jGPgwUkwvaDS4eXB2SJCpgtgEolTFsNFl69bCnlA6dU4wOjvo2OOMaOyT3K1XFAYwqUOv6HaxXfeln3/38T/ZPou7yOZ4xlOHzxnDeDGG9EjVrrwNVORWqpXyQ/1S1bC2fx1uG4aNOzxLYU1LkWe0U5kOcXUR6PtdmM6hMySjT4ipryYSd5QmEMehrpX9T9WqHzHX2ndgMsw4arix8DjEgWnTsYI2+NNNRSjylRHXVsp/gnRs/GI/MjSGR1DprtEms5Fkj3z+lTPKWMnZLn9h9sEzTa5K/SNOdN35AvndRpyNFEl1byYbERiUuio43MZsVtAU7Ph8MMrB+ybDL6JdPDe+Wkob4Cjija/6e85vGRIi7+U8iVd2CGwHbhMVRnyodP7YpNLTKuD25NDt2aJ7idye8YJQaC9htn4aNyA1t+1dnmwqVS8i3rwCQVoMeStiC7lFi7jR6wJBj6c7vp1sq/Jye/9ka7feA0jS/RCrBX/cj3Kpc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0035c91-4d51-4495-c757-08dbdfe69687 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:26.5940 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aGbLZ55H3FGzaF1wV6tX4nfe9V8uYEO9LCl3l/WjrBN/Rs7HqNx+eXpi2nk9HvJJaDylGsYIHPDphzL48JqvvgKPBuPVhFgmhYlDsNLfqEg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: Ii4sVl0De7nOUzwkvOeXic92JPyFZVsO X-Proofpoint-GUID: Ii4sVl0De7nOUzwkvOeXic92JPyFZVsO X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C6BA440014 X-Stat-Signature: memcfzbhcxq3j8d1m5g4tmunmabepfas X-HE-Tag: 1699398587-441709 X-HE-Meta: U2FsdGVkX1+Flti/N4Trtk/cQXhccz7fs71ZhD3DhCRUIgNUvjA6lAIqD1LF2p4YZBmkHtCIp6yS1v8r7JYgyCYMU7HARWa5oijqdaCn0rIjm+TCr3bgThZcbqHVRk3QaO7Lq/PiHNhxpAd1y2VWT/g20YWNVEQFf3JMJS2vbPsPrA5zTCs+lSzn+pKRp8Mi5/iJ3v7gE2nD5HlzTOnseyLNlXNW9FZOsEcJfnZZv1f7IDt+U5a8gB2L7nuplZvlHHcHoDpFsNyS8VZgQSbKMiCbatJtXmLZOh249W9jInC65AUlUWT/Ds0MRnuT+RLeEWxYXqR1+C7gSZILzr/xfyBlW7TNPME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gDXJzuPbI+Sshur8NQYCxhpec7MKKWnvFmxgvWT5dE1QT3N/XBFpv2jCCdX04Ojuy6tnSV04eNe/aLmenaHPHEb0uVH4q1XNLNzEPbZAL7MIABj7kN+/C26+UQAvyYzjOyORBzt2ikRN+N6ZLnRzrIH/u/A1xWXo4FVnoEG5KtvumW/DWKOAD8csXtO2/v2SRX5Q1gpFj53ZmuSr+PnFz45Q5Fuk66AnkJfumADdCylqFuX+ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the cond_resched() calls here are from set-1. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Juergen Gross Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: Paolo Bonzini Signed-off-by: Ankur Arora --- drivers/xen/balloon.c | 2 -- drivers/xen/gntdev.c | 2 -- drivers/xen/xen-scsiback.c | 9 +++++---- virt/kvm/pfncache.c | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 586a1673459e..a57e516b36f5 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -550,8 +550,6 @@ static int balloon_thread(void *unused) update_schedule(); mutex_unlock(&balloon_mutex); - - cond_resched(); } } diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 61faea1f0663..cbf74a2b6a06 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -974,8 +974,6 @@ static long gntdev_ioctl_grant_copy(struct gntdev_priv *priv, void __user *u) ret = gntdev_grant_copy_seg(&batch, &seg, ©.segments[i].status); if (ret < 0) goto out; - - cond_resched(); } if (batch.nr_ops) ret = gntdev_copy(&batch); diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index 8b77e4c06e43..1ab88ba93166 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c @@ -814,9 +814,6 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info, transport_generic_free_cmd(&pending_req->se_cmd, 0); break; } - - /* Yield point for this unbounded loop. */ - cond_resched(); } gnttab_page_cache_shrink(&info->free_pages, scsiback_max_buffer_pages); @@ -831,8 +828,12 @@ static irqreturn_t scsiback_irq_fn(int irq, void *dev_id) int rc; unsigned int eoi_flags = XEN_EOI_FLAG_SPURIOUS; + /* + * Process cmds in a tight loop. The scheduler can preempt when + * it needs to. + */ while ((rc = scsiback_do_cmd_fn(info, &eoi_flags)) > 0) - cond_resched(); + ; /* In case of a ring error we keep the event channel masked. */ if (!rc) diff --git a/virt/kvm/pfncache.c b/virt/kvm/pfncache.c index 2d6aba677830..cc757d5b4acc 100644 --- a/virt/kvm/pfncache.c +++ b/virt/kvm/pfncache.c @@ -178,8 +178,6 @@ static kvm_pfn_t hva_to_pfn_retry(struct gfn_to_pfn_cache *gpc) gpc_unmap_khva(new_pfn, new_khva); kvm_release_pfn_clean(new_pfn); - - cond_resched(); } /* We always request a writeable mapping */ From patchwork Tue Nov 7 23:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44A4BC4332F for ; Tue, 7 Nov 2023 23:10:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF89C4401AE; Tue, 7 Nov 2023 18:10:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A342B440186; Tue, 7 Nov 2023 18:10:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7ED4D4401AE; Tue, 7 Nov 2023 18:10:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 63CD2440186 for ; Tue, 7 Nov 2023 18:10:00 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3E94A160B53 for ; Tue, 7 Nov 2023 23:10:00 +0000 (UTC) X-FDA: 81432702960.15.A569E8C Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id E57BDA0006 for ; Tue, 7 Nov 2023 23:09:56 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=1++QVbTP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Q9HmUOOF; spf=pass (imf15.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398597; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FL00QVQAGA2zkQ5sy8oa/2TLw0UFzud7L1OBcIidWUk=; b=SVy61D1ksxsiyTgvT+sNY4QLEpcKU5W11JbyI3qNQgHjUuyNE6VVYJUpJkWM27BCH7buUb XcURqXqR26O/6b9or9i3cVt6WkuFive32Gdi9i9VzW1svB/rSto6dSBSW02NDNWh9ZlhQN N/FoTmxBELSC5byP8eTmREvAnXUgmu4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398597; a=rsa-sha256; cv=pass; b=4YsL2nDEdjopfwqserzxWRQy1VM+SY7e/L8QCY0Jb/5fw94fUxUG6sR49JDfgI8/DJ6VpH Tc/QcnOygYiRLK+FUamF4GGvwLNZFYGm/MbyuiOGmHlV2/4HJVw23R1cJkqmasffzpc6dK J5nitbx7jvAHrWKqB+rNLeHksrdO+6M= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=1++QVbTP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Q9HmUOOF; spf=pass (imf15.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJwQF020749; Tue, 7 Nov 2023 23:09:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=FL00QVQAGA2zkQ5sy8oa/2TLw0UFzud7L1OBcIidWUk=; b=1++QVbTP2H2S5eI3Hx+HbIgb4OLloZKti7OCHY8BiONMr2rKwIKVgEXwV2v3jb4Ykn4X N88ZpIlru3Gyg7wTJ/9BvGeHmG2DuQVKUD1hhoy2YuBOmFn5HLOE5Wbinc15Ee23xNXp +xp8EPfK7ID11NgERVXxMAuWeTZ1T2j1WghhRTvsyKE478ma5hyI5Q5FZ/PCfUpBjb3s rvre0vnx7SJTuYKFng9bYexPwUfEDLofGCL6JeYicW84LAluCGPJd8o48WeCmVR0hhcS 09slom0Qzdyr21sHebNodc0tJqt5f0zzeTcagyrG1BpZQipYPiqxgw7yMeQ6r76cXIzP KQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2207ag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:33 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N3tUw010979; Tue, 7 Nov 2023 23:09:32 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tva65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dOpaPEevP0nBoAZgXWmGpBdD2oujShYvhJ1/fwceYGTr9zlyHKgbK9pystifWX+qLCzE6oKebwpV5BjivjZYqXHg0kJ3jff/z8HBAZXv1qowi5nUVlXWD7ecBvl80SoZJUaqra/5STYNq5O6fnscLBzxR3N6JnHib74YHEF6jaEVdOZz9F+sLPJITX6GL6QXO7/QAxSwp2TI4NAtHKi0SVLDVOMC9HmnILNgnukeFYsMPPRn66GfO6WEtTbCulbR+mUtBKMonZqCIRFpQ4FMMmVuMmsygDI5svdSAX+HC6py6/EkWtZYVRjJCo8tc6M162CyCgPrqf31bPpy7LLxwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=FL00QVQAGA2zkQ5sy8oa/2TLw0UFzud7L1OBcIidWUk=; b=h0qsIoafo/aqw9th03PCBibuqCrKRYtcogyiUxxplPYRF2kvKS++zq4xQTKXcSVtuoQv8wFYhidK/7GAOceYFT4TTxynF4s9TGzLdhzkNZz3zcK1v6BNoLuHeDlF5IrrPzF42iAZpuy4PIEozDj6Zabbo8OWtJrRaCDdtVZ1tUPW7CKnHn8YhJ/cI5j2qi6dNrfc4OI+9+EvDJFyZeXEWRUXR6dB1sAx8evU1MAIJ46WqVNq10fhBGZ+iw9FhGhggecpb3uFXBMdQmf/RueYLQ8ZmOZILQ3ZuIKyCNYzz5zEJL3sWleurHG1pDa3/O5wHAlkxL5g9ocW/Vitniscsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FL00QVQAGA2zkQ5sy8oa/2TLw0UFzud7L1OBcIidWUk=; b=Q9HmUOOFQKdMp5JhvYoXcIAmgx/Ibas6ZKG/6EsNAUlTgFtC4b2EoV8tsqujVs4QmgqT2ctiaa5RInmntai3m5DCeGN9pa6Fenbr8aSCcd0wiHQmctbj8i/Ao8zQ35tKaru1YsFuczxd6FascTupBRHZLkQ6xnxT3D6vDf5tI5Y= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:29 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:29 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Tejun Heo , Josef Bacik , Jens Axboe , cgroups@vger.kernel.org, linux-block@vger.kernel.org Subject: [RFC PATCH 76/86] treewide: block: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:12 -0800 Message-Id: <20231107230822.371443-20-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0173.namprd03.prod.outlook.com (2603:10b6:303:8d::28) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 79f9708c-521f-4f23-03ff-08dbdfe69848 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pxk3/XWpuCJj685KqCYAQpy0YMRKR5z8J+7s7D0dlzlLRXUaiJMMrjr7F2I8Qm3Dvr3+4qqBCNzYFnVCAJQuIyKKPVG2C12ebkSk8vOO74bUf5MpDkcEXFjotoAsJXQgoU8ykRNaIRhHfC+fDuh+O3C7PH6EqC8wAy7VoE131NFPULqkNfEb+P4N/x9gmM9zGl5a0aPXh2rWhBnja0f4+8TXz0YBjdMt7Mhsii4FnpdqS3RpJbVNJGDwy58Nim9qGr3jJctbaEKnsm9xLanE8XFhb+2mTqxq3s13EsrJXwXDHWSfNN3rT0QQAOBGwXu5ay8V88674btpCU+K7Ek9YGhYh2aeneuZZdsICT1un6tjBo7nSobBWcvlngwXzPaiM53vmgW4NUNsZBQ78PoNNlwFEngdwkSP68XIvEumMjs4uaG6yNXD4/T+qmnIiKbVugLFUMUBe+AyXQan+3IdsVE1q8RUlEOgE4cD7eeKSiEHOj6dgd2N38qO3dau10zjXXAYiYx/Hn3WpQ0wVMLaA8KOG0pOpbgx/f1nRueWs9c= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2jrNO4oN6KTBJeLuH23CCQFhBA2WGjR1B3UDIYBzZuDH2j+2rjYgp323ff9iR2TE1JD140d4BFMJojBAM4wwByBxBkaGZfjgU/6bFhnfJWTRk6//+nl9At8aLKWpbo1iLFmTT1G6S47yu7AdlZ4Y5+C4B88sbwRHFa9c3Xw0wYxecOFyzME0J6j6V76OTboZkoba6ALZ0Gk8ApzhMbLjWf0rxGDEVN/fghgUqp7whoSbXwxETD2MErbUP3IbKF+4N7P4DI7J6iBJODwMkcbDYj8LuX/OpPBTj9B5XqaNAwuN0Dy6u61I/Z+/82umcXlcdKHu6oVtgeHP3171YkADXTkC9hVIu1Jj7UlmVrhHqbz+tzsR8uEbCb6+o666VC6Y74kCfEiVOERhdUn00ED5SgJuMFDDrBOSzZ5GuhCTYf7SVoUxJmr1gDsGv4vPlhXAehPXmZpdeEJm5R30MDsqdn169uerafG+nf08DscdRSGUddSRttFxme9ikST+B8YjqbuB0Yp00i9xzeUDxGmaBngA2I4u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/cu5D0Md1PzCyv84B6g== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 8CkdYCzT+/dOHS8QMk04up4tMn0cUf9gGe+fRs/puSswxVnhe7kKuj0QdGLOozwZSi0Kh2YpmxeqT/aPUFLw/5BccxRmK3xI19SVQv1u1rwWKyB26BK9hp1EjgTMwYIuK9sk7FRMpTM719UWNezmMYnxvrVMzwmuCHXMxLajWovJWeYFFSNcV9giQA2zvuuAlifZQpi7toUuipBhSKpepSP79DG75X2mxZLYPzDohiAh/klx49SnUHaFRp6H9WpKkmqFgy9iyBt/zvr9wH1X9tSgHBiN9PNuInwtEhm/cV5kUxqj4emOzLjlsmmiBV+VQZQUh8HxgpEPjhgovc/vWbqMc1OzAN86pCemnykOOQNwbqshzoL7Ph+AkuNvcLMeOA53bCa1iPVnfXfx9kPAlPl8z2X0vM60HDFDJmw7swqdi5QD+7EmbP6Ba7fecVu4au8EiM0d6Z0OlrXMRIKWc2JR2j5KexgZYy8t6OK5XiCbVl0RHIc8F3qkTi3LJsO/mWK+fAoLM+LB+z1th0rKAHxqFN/jl2kp2EBZYA3oi9CqW8y2bcMVM3phQIxXmCKAVllrxVViGfFu4FO3XOMsxxkCk6nr+AwWklYOe2ToMwtZN1hmmO5l7o4VfR07lShPFhEs2ck3VgjlReuhJbwthnc8Xs3zaPWKg86FW4S4AP7z1qrrGYItVmPBYCiMdp9JLRhRadnwFTVkb9r3Vif/HZYaRsFeFXOPwyCpAQ3piSGKHNjNPcy+JoOtKIZxAHPRL9NzdL471UQ6OTU0tFTvPVzsoSfMJmFqVFSvFx93A9HFu5ifNWGjbuy800GGbmTQU7OxNEY3V5gsuTpyrW1U542eRhh8n1E6QQhUsL3DrmshylvwH1tCpelYb3zJPGFPGFY+woZ2p/t09teosZhIQdn1sPPcAm/e7CM4FWsvAJuaDArYebz0yhCL8F6qhDP0LGhy4SiTqGBlVaiNWdDiJp12RG7indRahny0mkTMjsERf1DL3OkfREf6ySLNSa7c0Qdd6xWnrJ/Kt4HoSgGtcdQojQT9lJ9lCRuLIHsQwYhvGBP1q+HFd9B5eVh26n8HEycgpyekyvtv7vk1y9cgXKes1ZA+BJItm1Q29ncVVqEtmn9J3eg4Z1kqoD6puCTXMgfMeRa2RIV03CnfiPuDEPL8lmpuRKjZlpRMe5uNQX+H8Ym+SUG6xZUaaKvJaOUEcxJEy3sjWibryKncYv9OpuhFRtRG5jEhgwgYMrGdI+bop82NgIwwm9ozXT5TAWA1UxgwyG8MVJyMB/LDstaGrEOUi7BTcZ+Bp+L6J/l361PuIspyv2jZieWxUj0lG19B4BbmTU+VK8Hx059AefANvqOcKJ+bkqUchp45UQjOqJrHXemhJ92BQtcaNr4Gn/0OyQF+/erzeO9jn7TSo/F3bmuyaXEPtXGY+wItW9NtwcVekknKji5yQLLXgd2NTj3mspFGWDmYx7HeErREayNgAJUZHzHW8/uu2p4IaqVdO704gqOfcjMF37c+ntNdfWl4wEUhUE6xSlSfL0H2HaqXWh/73ZkaQqCCdUQ/nBrDvRF5lQ88vMTI2PGK9+S4tIA4F0qA6jbKMFwG9X9OOPLoBQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79f9708c-521f-4f23-03ff-08dbdfe69848 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:29.4838 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dFUO9L0loQ9i+wYa8NR6REyRwCyvAetKzQ+YEBVEYNHAAHJ2OazdpNksMmfOtFimjKRq1xFZvtDKwCu56ffh/pfF2SbXXJduIV1DKHQus5A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: 4pr5R9tqCFASHtB4-T7wZSrH4TcQ0TtP X-Proofpoint-ORIG-GUID: 4pr5R9tqCFASHtB4-T7wZSrH4TcQ0TtP X-Rspamd-Queue-Id: E57BDA0006 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: ignxu37mszku69waiw4w1bws4g79c6sk X-HE-Tag: 1699398596-521419 X-HE-Meta: U2FsdGVkX19p+nOO9aor4l0Knvwc6ALlJ8+/NNRLtblfn8VtmEWQHmxOd0cIpEI1m3d3HHdick3qP6BI6lc5XgqULMW4imSDp0PKPMRcqtL3s9QD1tTFpx5N5jII/a3g5wdFlpUer/hdQjMVB6pAimkkDRx/IuEpm/W40WG1Qr55WQJK/l7IYiqkL/UFxQJOh1eomn7eA0q7zhfr7DbFBDLKEhzkZlx9M9VunTOqzRQRcaUlapL8nTMuUSjyP+WZW/420mHmYFk8vVIhxsiMlr6hdGGSrPPv2nr3q3DI/LfjSE2m3WoY0yz/E/sDIubDywytk35/plV7oGVpMmwotfiEViWXir7JhvpT1Mem/2q2yBhF6HafIi7J+XucY5Lu35wMBTcRwPkyskpf/9EjH9tqqHUs1kQVcJGev/hnK4UkGOIH7PRQbM/xIbY448leRyVI7K9+V2RsZQHVNzyFYCQiQjP6Q0LcHjO3eqlZpcBQwwNUbFxGy+Wna0ueHfc8++xBo0xO4tDipMMZJphrobA1mYQM1LnTI9filUK8MwmOOiilck6kfh3LkP0PuPrbxeH69TgkuRcyPrtBtbzdREBcrsTSo2WrB8N3sxaJshk/Jm2XKU7F7q8qsE1KmuuQDvhVZkndpbhz5Le+JPt0WGtzPSt2J/jD+gb71b/+wkrMnKC3Hwq0Z/tmqfxCyRgi0dhEtXHcLiF92WvFwGBJUnTgK8tvF6bKe4jtwgIPAYcl2jVNHrCvEBREBHIxqKBga8MLUMf0a1Op/WV4LwsD9By6k5CrcbQAvRQdJHFiEzJTND9tx8ESLUCgUYpT/opcnU1mgBTY5+RvSUJsADRjAHCwEsLlxYskeytFlZxlOqjK4lgsE/F+6eOVs68FhcazO5jjl2rgYiaQhhYHMhfFFnukvfxUrzKOt0EFdxmjwY/RN5uvT/8E9cjWQIazNNDiwoRGo39Vj+MAXDhpc1R UELtwXJo ionQkJVx6qvl+8ecRSePoJ8UDzcbgQkb1TAeDJaLn7uD2KYRV/3eWQlxFVqeOlmFNVts/XRHIPYfdzCEXxkqQef1wDy0UGOlYFWdypUWSHwF66gmFaYYUHyLvV7KpK+AyQad4pXMUE99YBE431D+005B1I/85XeWVBpO672akMF8ZGQzz2sXKVwhcTdf3AqsgzhJayX53mhdMEPXKotRIXPBcZU33U2XXV+SYVHyla077tPhq76PSQTo3ucMME1udFT85DsMtz3346RLSInefuiFYIpuNkxLOYQBGFEc2tOfqc54xASNm98EG1EvnAsncBBSYxLDt9Kt0pU+C7cmAa7DXjF+zShLXG0cyGQrpnVKiMqkceUVnsKVGYc9I0234Y10mQ2IrpBnocUD+Ck8I/5V4cCqCDQ4waJWL3k5ZrsDfUHpf+yICPx4ahF8gqWyT5Bk/mIz8QXhmJ0205dj0SD81/4tqFpXKTwAUFMjhX+BQie54TzN+acdIKca0+EbCfWgP6f3y48OKzmclm6hy5R5wHCVUXY10ETO+hrezZ/CMLf1A23kipwp1t5weRgLHOYYBD5PjWA0OZjU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the uses here are in set-1 (some right after we give up the lock, causing an explicit preemption check.) We can remove all of them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Tejun Heo Cc: Josef Bacik Cc: Jens Axboe Cc: cgroups@vger.kernel.org Cc: linux-block@vger.kernel.org Signed-off-by: Ankur Arora --- block/blk-cgroup.c | 2 -- block/blk-lib.c | 11 ----------- block/blk-mq.c | 3 --- block/blk-zoned.c | 6 ------ 4 files changed, 22 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4a42ea2972ad..145c378367ec 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -597,7 +597,6 @@ static void blkg_destroy_all(struct gendisk *disk) if (!(--count)) { count = BLKG_DESTROY_BATCH_SIZE; spin_unlock_irq(&q->queue_lock); - cond_resched(); goto restart; } } @@ -1234,7 +1233,6 @@ static void blkcg_destroy_blkgs(struct blkcg *blkcg) * need to rescheduling to avoid softlockup. */ spin_unlock_irq(&blkcg->lock); - cond_resched(); spin_lock_irq(&blkcg->lock); continue; } diff --git a/block/blk-lib.c b/block/blk-lib.c index e59c3069e835..0bb118e9748b 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -69,14 +69,6 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, bio->bi_iter.bi_size = req_sects << 9; sector += req_sects; nr_sects -= req_sects; - - /* - * We can loop for a long time in here, if someone does - * full device discards (like mkfs). Be nice and allow - * us to schedule out to avoid softlocking if preempt - * is disabled. - */ - cond_resched(); } *biop = bio; @@ -145,7 +137,6 @@ static int __blkdev_issue_write_zeroes(struct block_device *bdev, bio->bi_iter.bi_size = nr_sects << 9; nr_sects = 0; } - cond_resched(); } *biop = bio; @@ -189,7 +180,6 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev, if (bi_size < sz) break; } - cond_resched(); } *biop = bio; @@ -336,7 +326,6 @@ int blkdev_issue_secure_erase(struct block_device *bdev, sector_t sector, bio_put(bio); break; } - cond_resched(); } blk_finish_plug(&plug); diff --git a/block/blk-mq.c b/block/blk-mq.c index 1fafd54dce3c..f45ee6a69700 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1372,7 +1372,6 @@ static void blk_rq_poll_completion(struct request *rq, struct completion *wait) { do { blk_hctx_poll(rq->q, rq->mq_hctx, NULL, 0); - cond_resched(); } while (!completion_done(wait)); } @@ -4310,7 +4309,6 @@ static int __blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set) for (i = 0; i < set->nr_hw_queues; i++) { if (!__blk_mq_alloc_map_and_rqs(set, i)) goto out_unwind; - cond_resched(); } return 0; @@ -4425,7 +4423,6 @@ static int blk_mq_realloc_tag_set_tags(struct blk_mq_tag_set *set, __blk_mq_free_map_and_rqs(set, i); return -ENOMEM; } - cond_resched(); } done: diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 619ee41a51cc..8005f55e22e5 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -208,9 +208,6 @@ static int blkdev_zone_reset_all_emulated(struct block_device *bdev, gfp_mask); bio->bi_iter.bi_sector = sector; sector += zone_sectors; - - /* This may take a while, so be nice to others */ - cond_resched(); } if (bio) { @@ -293,9 +290,6 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_op op, bio = blk_next_bio(bio, bdev, 0, op | REQ_SYNC, gfp_mask); bio->bi_iter.bi_sector = sector; sector += zone_sectors; - - /* This may take a while, so be nice to others */ - cond_resched(); } ret = submit_bio_wait(bio); From patchwork Tue Nov 7 23:08:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C74C4332F for ; Tue, 7 Nov 2023 23:10:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 185E84401AF; Tue, 7 Nov 2023 18:10:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E7B7440186; Tue, 7 Nov 2023 18:10:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCD9B4401AF; Tue, 7 Nov 2023 18:10:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B519A440186 for ; Tue, 7 Nov 2023 18:10:02 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8DC31120B95 for ; Tue, 7 Nov 2023 23:10:02 +0000 (UTC) X-FDA: 81432703044.01.90F5802 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf08.hostedemail.com (Postfix) with ESMTP id 306B416001D for ; Tue, 7 Nov 2023 23:09:59 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=br4i54K5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=iplCdexr; spf=pass (imf08.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398599; a=rsa-sha256; cv=pass; b=nkBvY+lYVPQ9w0oygeXcRvK7R4k88nxpLjeXwH3vBhjTl3upIPEndbJl9MAqc3+eFUQXKY hwLgSrQjK7XGioe1JixU7koT21kxpoS2C8PKgAaNFU1g0HsgZH5fDd2MwJ+HkS9aCoBWVq EP4SrK3p4crQEmFbk9SxRmbEOpcxPdg= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=br4i54K5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=iplCdexr; spf=pass (imf08.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398599; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=o2NOM45GWqtp+KSG2RbtbBF0RAvHHkD/f6WqLYnlgOw=; b=aqg7yXNlmYQcypbKJbZquv3d3w6Tv460HYm1szX/lwGgEm5qATAc1MZahXr0tNarf8+po+ 24CLxeJhrcqkfWp1s0CEIw9JxTnJ5Q7u/+nQ+tuaDWpnhxjThFRPWKBMzkj9ivzbvpf4Wk PA57mJ5IaWhqdInUC/GzZyczPqjOoQM= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJpW2004902; Tue, 7 Nov 2023 23:09:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=o2NOM45GWqtp+KSG2RbtbBF0RAvHHkD/f6WqLYnlgOw=; b=br4i54K5zbB2nA9mmARbNwWCKVRnBfWCCO+g8BnH/hcDz7ku4sf+UrLIlwL1EXOS2aek EBcEXvBOmeF8aPWO+1UAezfMbwsbRAo7dnt5rzN/v0K5TBrTMv6MC3QBa9xFYOCoPIZb HxI/NYf5ajj+70u+wmB/1ZR6pfa4PoYomRhvxUQ9CfBZYH3u2XPtk/VNZY1/t3eZRHGW JpMomTrUOBujDvKMT0vJlp0KAygMDVy5WGCUB1zyonvRpcaUx9Ri221pEG8FqJ/kpnd6 AP2LSRQtHpCHYqTkF6lMXvEmHR8gEy3EEjDmnmAbWz3w23+859wCtVx5jskIFkhW24uY ag== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6bk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:35 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N7e3k032011; Tue, 7 Nov 2023 23:09:35 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2248h0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Go27H4Og6ceJd6SUrSOKLnMdw5L/+4IMR3WpRCb2wx7TzGXGVTR3zc2QQ+SQ7qFHSVwbWsvwLB8jMvVcbPSQvFPUzqVjE7dKfSad0gg4z6H/rCmZc3yFTtMI5blVp8FptNE0dY+nyNjLhLRS+Mlf2G3ObSHxW2Jc/V5OwMSEVX3523uy9t8DcpikUmZHOdJUeSW/fsFe9dyLPR2Ebm4O2lSPR2/a1GyUHZhoL0JbG2tJgbehiHJFcDZcwXBD+Q+8+3TNBw3wz1utSU5ygvrROKx0/gYN9O0/iMMXYh+SBv2qa2Ip3/IoOI+vz2yqGYNRmWErkzXLwG5Szy0aoIC86w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=o2NOM45GWqtp+KSG2RbtbBF0RAvHHkD/f6WqLYnlgOw=; b=PDlhxJkQibpqgrG+bvKxEeEphlomovrWrMr2w3Z3ZWVOh5rVbsgB695QPSpUAkukXkkSqgXFqDmOBbENF+epXwiPip2SkkOR8nmPa5Uw04l2xwlsRFR2dbJfmjegrRrMR3uuZOk8kyosJDTuMCcom0XK5gkji5dT1uBNDaYyes8cZgmhEr9stc7gNTo4yUbu2UNh+CSqiInmRsstSDHu+cCs8hDYh9EUSCalkf/PN/w4yJGxP0sxaHd7hgxBYG46DZXeGpwcpSJ6z7vWwtoHeoDQdpzRzUfs8xOZAP1E2+3SuIUp1MvKWOnJEFLmZz0bVpUG/obmzc9jBvT1Q3U/Cw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=o2NOM45GWqtp+KSG2RbtbBF0RAvHHkD/f6WqLYnlgOw=; b=iplCdexr2LuuxKX8SLuhLo7FVFtdQe/SMXUHPmecEenq9GLc9UW+O0gwCu5tmYIrUhZ1I2eRpfnso2zHrN+XZHWBF4MFdJBXuRyUM8NJ6ALZP5uNgB2fJhG3TXHn3TzWSrosE1+pGWV7APzPqSE3ji/roEy/aHAZ3kpCpAG7m1g= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:32 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:32 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Florian Westphal , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julian Anastasov , "David S. Miller" , Pablo Neira Ayuso , Jozsef Kadlecsik Subject: [RFC PATCH 77/86] treewide: netfilter: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:13 -0800 Message-Id: <20231107230822.371443-21-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0267.namprd04.prod.outlook.com (2603:10b6:303:88::32) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: e8ba34ae-f811-4b94-cc87-08dbdfe699d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 435r//mJq3ALZanutMMD2ONgV26+0ItPGYoZnyhylrJAVugpBaDSkhK7K4vIsb/6Ne3JHeAwsHaee9dqKWQq1Bmfk8CNShkPQkHMVTND2ziuLpsDr1I6dp5vbx1UqsPcJYT1UKkvQTTriYsapDtJJ+rDDKA4rcmvqklVwNBNyYlvYBtM8iH6mhtBfyjjux/tjpILhbIYSmObn5Js64eCum7ORaUUvEBFH0biLFCMDWHgOWuM5iAqUXIevbS8/WbcUD8KTta0uAO9Milp1eQwnXNQjTw0F6+0go34WzmR8wRI1wfBQd2jeE31ot3WG6UD5hIy4YNBEb0/mDjQsbyFzdb2wQx6aU43kacbWN6X5y+9/paoo7OJk/yWyfmktg/d4tzh29skwpOZNuTQaonbB/W3XbmMoIxhcr6CWfXO1RTDUPK90Ea1ta6DAxU9HhJIZhOJcR371/m+ARdC4yfh00lXh0dTCDcaV9zaArupnr4IYVpoWvyCBtcUzbLfB2jJB9ZSE7RhSyI9NVvyVxnwgYLLVyrZfN1yw3XEfIuml/Q= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EvQ6/28vSTn3UNbur++COrNRJDpS3tXyYryZsuyDR4IDKghy4gl/McK3OtBAu2Za9orDFe6JsbBuhYrg7SGJIbgtaDpQL70nl30M1Cpi9Nf8csHxhYmYqPyQEiQOZFUBjMGmo/L8BZ+/d946ZtSIGAwJgM9pDUhnfKN59N2/whmLPWmUArwsIWMA6STKlWb+j5yIRTJ4bH+5q4XQsl9nAm2Ugc10eOnCkJCaikDEnUU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OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8ba34ae-f811-4b94-cc87-08dbdfe699d3 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:32.0893 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 35EDMQmdCNxXLjpiX4Ti2U6a7vMFTrspFbfoA/0yLyaxX96gfKSh/iYz2PsiqBn1XP6vQFnX0NCpgttZkEGMYXjZf3udpYAuPCpRH39dVH8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: IpR0uO48cSymKOpsh7pitboZTEQ_wAYY X-Proofpoint-GUID: IpR0uO48cSymKOpsh7pitboZTEQ_wAYY X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 306B416001D X-Stat-Signature: rxd58pht9shfsg3u15siboqwbf6t5zgx X-Rspam-User: X-HE-Tag: 1699398598-374023 X-HE-Meta: U2FsdGVkX19MevYn63vBTc84eezsiKchBZhDlVcSaUqpAz50Xg3LEo5XmRKrVqNcQa4m9NQmz+6k3AL9C6tyGiqwioPg4eq06dHA3J/z5WKILFAHV4dc8I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kZkXpfPh//0krgM59PfSPauQ4acZ8Bos+Kkv9N7miYYaj74Nvd1p13H8AG0JXgOvMPSPpymTCjqxIUDOsCTU1kq3pYtJop1zcspAgiBsZxqAD/YEa6oFAmfl++Yie3lechh1+zmOlzdAzlUVuZIrL54GshHrhmBpzC87ht+d3w/5C0D1sHl/AdIRPFJ/JQsDryfMwDnwK3VB4r+q6qgJL3Q3oc4MmlzBBx6V0N3kJaSTmWoUeFuhoBayf+o5RS78wFpsBOOZX4bkhng+YbzpkOl4hAoCTors9n5MnBhv9BCsgCZJiKf/nlOn3SsU/9U+YrSE0ZtF5hz+WndhA2oB1qs7yKNm/mgxwKrfvsmN1xbNyMdixT5JUHUxYnN+ENLPkv+d88Mt/22v/8KFuBDufS5Il/5qLYwIGuGx2Tfei88QJgsXzs+t+9zz8M32gxF/SrIXMRVLldpmzm9BoCamvVmbg8+ENtwoSDepHyMtzcMZRYYUlh7sT1vzQT2Plsfjw7DUEPUrbBz3Upv3AdFmC3Yz27d1F7zD52vlUC01jbHDXZzA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the uses here are in set-1 (some right after we give up a lock or enable bottom-halves, causing an explicit preemption check.) We can remove all of them. There's one case where we do "cond_resched(); cpu_relax()" while spinning on a seqcount. Replace with cond_resched_stall(). [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Florian Westphal Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Simon Horman Cc: Julian Anastasov Cc: "David S. Miller" Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Signed-off-by: Ankur Arora --- net/netfilter/ipset/ip_set_core.c | 1 - net/netfilter/ipvs/ip_vs_est.c | 3 --- net/netfilter/nf_conncount.c | 2 -- net/netfilter/nf_conntrack_core.c | 3 --- net/netfilter/nf_conntrack_ecache.c | 3 --- net/netfilter/nf_tables_api.c | 2 -- net/netfilter/nft_set_rbtree.c | 2 -- net/netfilter/x_tables.c | 3 +-- net/netfilter/xt_hashlimit.c | 1 - 9 files changed, 1 insertion(+), 19 deletions(-) diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index 35d2f9c9ada0..f584c5e756ae 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -1703,7 +1703,6 @@ call_ad(struct net *net, struct sock *ctnl, struct sk_buff *skb, if (retried) { __ip_set_get_netlink(set); nfnl_unlock(NFNL_SUBSYS_IPSET); - cond_resched(); nfnl_lock(NFNL_SUBSYS_IPSET); __ip_set_put_netlink(set); } diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c index c5970ba416ae..5543efeeb3f7 100644 --- a/net/netfilter/ipvs/ip_vs_est.c +++ b/net/netfilter/ipvs/ip_vs_est.c @@ -622,7 +622,6 @@ static void ip_vs_est_drain_temp_list(struct netns_ipvs *ipvs) goto unlock; } mutex_unlock(&__ip_vs_mutex); - cond_resched(); } unlock: @@ -681,7 +680,6 @@ static int ip_vs_est_calc_limits(struct netns_ipvs *ipvs, int *chain_max) if (!ipvs->enable || kthread_should_stop()) goto stop; - cond_resched(); diff = ktime_to_ns(ktime_sub(t2, t1)); if (diff <= 1 * NSEC_PER_USEC) { @@ -815,7 +813,6 @@ static void ip_vs_est_calc_phase(struct netns_ipvs *ipvs) * and deleted (releasing kthread contexts) */ mutex_unlock(&__ip_vs_mutex); - cond_resched(); mutex_lock(&__ip_vs_mutex); /* Current kt released ? */ diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index 5d8ed6c90b7e..e7bc39ca204d 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c @@ -473,8 +473,6 @@ static void tree_gc_worker(struct work_struct *work) rcu_read_unlock(); local_bh_enable(); - cond_resched(); - spin_lock_bh(&nf_conncount_locks[tree]); if (gc_count < ARRAY_SIZE(gc_nodes)) goto next; /* do not bother */ diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 9f6f2e643575..d2f38870bbab 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1563,7 +1563,6 @@ static void gc_worker(struct work_struct *work) * we will just continue with next hash slot. */ rcu_read_unlock(); - cond_resched(); i++; delta_time = nfct_time_stamp - end_time; @@ -2393,7 +2392,6 @@ get_next_corpse(int (*iter)(struct nf_conn *i, void *data), } spin_unlock(lockp); local_bh_enable(); - cond_resched(); } return NULL; @@ -2418,7 +2416,6 @@ static void nf_ct_iterate_cleanup(int (*iter)(struct nf_conn *i, void *data), nf_ct_delete(ct, iter_data->portid, iter_data->report); nf_ct_put(ct); - cond_resched(); } mutex_unlock(&nf_conntrack_mutex); } diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c index 69948e1d6974..b568e329bf22 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c @@ -84,7 +84,6 @@ static enum retry_state ecache_work_evict_list(struct nf_conntrack_net *cnet) if (sent++ > 16) { spin_unlock_bh(&cnet->ecache.dying_lock); - cond_resched(); goto next; } } @@ -96,8 +95,6 @@ static enum retry_state ecache_work_evict_list(struct nf_conntrack_net *cnet) hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_REPLY].hnnode); nf_ct_put(ct); - - cond_resched(); } return ret; diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 29c651804cb2..6ff5515d9b17 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -3742,8 +3742,6 @@ static int nft_table_validate(struct net *net, const struct nft_table *table) err = nft_chain_validate(&ctx, chain); if (err < 0) return err; - - cond_resched(); } return 0; diff --git a/net/netfilter/nft_set_rbtree.c b/net/netfilter/nft_set_rbtree.c index e34662f4a71e..9bdf7c0e0831 100644 --- a/net/netfilter/nft_set_rbtree.c +++ b/net/netfilter/nft_set_rbtree.c @@ -495,8 +495,6 @@ static int nft_rbtree_insert(const struct net *net, const struct nft_set *set, if (fatal_signal_pending(current)) return -EINTR; - cond_resched(); - write_lock_bh(&priv->lock); write_seqcount_begin(&priv->count); err = __nft_rbtree_insert(net, set, rbe, ext); diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 21624d68314f..ab53adf6393d 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1433,8 +1433,7 @@ xt_replace_table(struct xt_table *table, if (seq & 1) { do { - cond_resched(); - cpu_relax(); + cond_resched_stall(); } while (seq == raw_read_seqcount(s)); } } diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 0859b8f76764..47a11d49231a 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -372,7 +372,6 @@ static void htable_selective_cleanup(struct xt_hashlimit_htable *ht, bool select dsthash_free(ht, dh); } spin_unlock_bh(&ht->lock); - cond_resched(); } } From patchwork Tue Nov 7 23:08:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449446 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21696C4167B for ; Tue, 7 Nov 2023 23:10:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 30A804401B3; Tue, 7 Nov 2023 18:10:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2212F4401B2; Tue, 7 Nov 2023 18:10:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E58A24401B3; Tue, 7 Nov 2023 18:10:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C1E23440186 for ; Tue, 7 Nov 2023 18:10:13 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9C1F180BDE for ; Tue, 7 Nov 2023 23:10:13 +0000 (UTC) X-FDA: 81432703506.27.D242200 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 2E68380014 for ; Tue, 7 Nov 2023 23:10:09 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eK6wq0tm; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=bGKSKmqC; spf=pass (imf02.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398610; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kFmCq1H+nhZnb2EJiO2RhYOCVAZK5QP5pATpzaaPaCU=; b=Ad+qRcQJMOpD28vOeXf/lp5q/4ie/V6fdG+jq6SVJRnxA8zekAKiDv3ASpEDppZLPUOyrJ usabGJKGgqdnEVjcGR7HJqA9I/vJQYF7EkS7/KJNZ3z6bpB5Ut0vW1K39PdX/PVxOb03g5 gs+YG8dlKrhmwevl96oxxq2KFViOt98= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eK6wq0tm; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=bGKSKmqC; spf=pass (imf02.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398610; a=rsa-sha256; cv=pass; b=IA5dkp8zFFJ8rAqjy2uwPvtLnNvAJiA5L4XuMEiMofc7VoklQsR2hAwU1/jUtiAujsvH4y WkogPuuQ1rO3TflGl6Osbnugip2FdKS65mh0sOM0KArCckX9fuVBLbhUrk0QE5Hur4xw5T cCJl0APG7r+roy24snMTnCEUtzwg1DA= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJqat022727; Tue, 7 Nov 2023 23:09:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=kFmCq1H+nhZnb2EJiO2RhYOCVAZK5QP5pATpzaaPaCU=; b=eK6wq0tmlZQyaJ+AaFpJgGG3djeSjhNpdJK1HL+Bn1vURglM5cAjbJrZTu6nscQFwbjL 8ehMFieFhJCPhYBcQ/w4hG7Sj9sYRH/cD9NnYk0zxHKKa/+wFyJpb0zW141tmEq7IYRE 3U2wQKNXJjtyb5skEqH3nb4l0u/5XBeQXGf+eYq/QHgzUBM869eQ58vfUq8Iw56prlOE vQlC11sot8r2lGl+dIhOdHe6rKxpGZLOjTh2iyTeobM8Z1VZ4GUlawBWmJXof7lf9eq7 QgUITHtvEF18o2FhA8m4zVoTIC84Lhmm+n8aTTobHFws9XcZSLKp9wkLFQjlitNk8KJ0 FQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2006g2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:41 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N40cZ031940; Tue, 7 Nov 2023 23:09:41 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2248nk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vq1hWOcYWpn5gFPEzsxvOJA6qQ/Vlj9Jcs+78pld54WjtCZjHq5XlH2vHISBh3N0pual/G9dukmg2IDWIbZdcnuSEZ7mNrUyt2UnLwY/GFqvyT3dRIGHQyIlmdLvQ0CpORnJySmqnIFg48Fu54z+PgIyuov5CnJgUUvCPSSvtUJ5JfCAgVaJopFXQRE96A6JUIGsJs8PwABDyxS9SGKEJ4EZnFaH0lW8FTbkU4CSI07cs+AaXscCfaZPxxLnLclB12f6DKLdNysNprJlsS8tRh9Yk+ethQPJE81bi3zbhCG0IWuXbVzkLQv+pgjX4nsWUWh4QeZc5nOU8IVXaIw6yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=kFmCq1H+nhZnb2EJiO2RhYOCVAZK5QP5pATpzaaPaCU=; b=EzlFxtcDbaI1VD6TTChPMotjVtSVeCOhllpJnGqoiRLrTP+1WK6m+LefUyCRrqBr4JkyH03sC2NRQyMwrh+Vta5CJ0TkZgdS2QjswEAfHOgKG0+/wFVzGwVa5XWVhhn1KqIlEK5P34jbefZ7O7P1X2nZykx8P/CsinabGrYvk16z547jHvy/gwy0Q6cTyxm2CQcDqPW2cRHGJ6EsA5I3Lsr2b4O/Xgthg9Ov0rxnavSLPteQmHZ/q+2XoZdxduAHkW1NEGaOGrhb6k4tNvwwYkNqHYCageN87tMw3vVCQRExqH1qLs4nTe21o5zuk2SRNjrJm7UZ6T2Q+tZZQAAAqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFmCq1H+nhZnb2EJiO2RhYOCVAZK5QP5pATpzaaPaCU=; b=bGKSKmqChEWukNmhPz7y0WI0fxyzWDfdhIS3sd+GIgAdUF9jraSDaArao6zO4h7UblYquuwT54rxLO1cd70+zGPOTCTmz30gKHWx821CR2IEjHQP+PbmdhazYc7mNHI2Mf8U10NeFFBo9P5JX6JPuX/EBdB57TPwLTaLAUWcoLI= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:37 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:37 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Willem de Bruijn , Jamal Hadi Salim , Cong Wang , Jiri Pirko Subject: [RFC PATCH 78/86] treewide: net: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:14 -0800 Message-Id: <20231107230822.371443-22-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0066.namprd03.prod.outlook.com (2603:10b6:303:b6::11) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: d66ffbe5-a225-43a6-481b-08dbdfe69d16 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pAfVKmd481pkxaz8vJ9RPb9S2uQErN0V8vG/tXcKzqXERuWFjDfr1Vt7wxfJnjYJnUw8iB8uqDeyy2/xDOWVZGis5Ok4KCYF3kQLA3aCKbU95EtYwOZAEk1XAeiBuwsinzgOIgSmQ42/f3zIovvjt4g7G852TDk/KWtsN7nc4+U5vr7cykURUkpqLNDY/47BhrjuYqHiOP1OeGp8XQecG4RuFBK+2huXUMjflkb9zBxQkcADEuuIVfvIrLlosXVLyMkFHmAUmKD1+SKQWBogm82B5i5SF3qo4lHdHAE+aPhjxTuLgzPthA7xfCezEK0M5edtyT9Mp2AFYxFBHetCKmOvehbpKUzQ15KEFwUfdpFl5ZKCwyhrLY7LZA1xdMdEUyypILRh/jGmUlQ4dNuq7Qgcd/RfzqUYZIhDOLUnb+BWianT0g8gozAiKS7rMnXj/Vv93Vmg0A0QYJrw67EogtOQPAyQHwAGQ8nH/dWP+aB1LD9uJBJiaUAUqUbvHseyIab7qnqA4K0nVfp4ydUQiQmTMDbxa1fvlDBqwj405fI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D+BwehR3No+u16UZ72r2X8hNpNoKvTf+pek1vtGvVMaUWkBvwfF1S7mzfb1zbbQkoqDsMS9UBrlw9OudBOvYdYBTNjXCC7WWOnkA+0+GV9G9LqEEbizrLT/o/9RNejZZcQlpiO2aNvVojLMGCsS1V16XKwMmT4m+GyU7wHPoUxlISuG5i4ZBu0nWnTexy11SsXF79c+emWFKo2SQt8KrKwPoVOGKi1xw6RSaB5zgdadyIynTrgH7a92WSl0BkMNXZzuj2nvmpEVfBF1P8fko2YCmNUsPLvZSq+aoTxDZqGPmo/BHa2aU4uoBmRIYh5H4yezdBHN33XKb/+DHZn0xdoUXRTKCIdd+nQOJU6O5mxmLoeL41239LrXaLYSldpmjPji6nykSK32s8m46xX+bZe90M6upAW6DsYFzV0s8a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YQta/BU4HmBAWiZXDb1JcQ+JYDZNwBraHkCpjnhxba4EcAWitaRlrhi8GVgyy+YBNQ0PKL0pHReDtkKiz3g4n4el78A6HxB9hQaFkTTeLTFgK3KoA1E51oGF1W2vhYoVIxnrPVrfJEsccn7DiF626NGYcWISvPO9fzkIigMGAnjeJcSLWWGdmGEVRVcB8QxoR2a1417PWtw38voHTvAbcUj3wIYFTuZgr5sG9eKbfrme3p4sQyVE5OEn/ULrn+FuVrO6K1YpvRDBPO9ny900Y+e3D+ejYlsbHFuyGw6AU7qcAdOTMCwLPs16wj8MC8HCbGQvoN84VBBZNM++35862asGdYFs5VB4oTbFNw4Hvi7Yx+44nUJW6QivznRYiLWDoocPwW/Ux9jKl5FZec5ZjYLhjEdjDWm/uIBHf0cMEKHmrRV3m1/mBjzuzoUXyFO8dVPp09KVNDCB6d8sIcBW353GiW6DwIKeHduQy2cbUJc34xlmKKNQi19+Qz+hL0OzKQ4JCAAUPXql0cD6YlcHZsn4xYBJ5ROHbD/KbZAfElntDA35T55ycd7gsXpgFd6I84RGLu341nP9rffkgjdwNfv3XrG2Oc+qlHMylhqNVMHopdRXbrH+P54CfjHdJzJvNMiUwbx35Z9B/2Y/CglgTC4XI/hhL+ZyPQjreh7CiWv6oGUabCou0h1/3u9cdNvJA4cTVI2OZ5D9GBWOsLIKMyp5Akw/Sm7zpa9ifIYmM0vXdDynVhbd+QM/B9OEFEJCsjvBfygqKKRGs5spK6Z4q3doWnOrFRXJMoNC0VJuoP+3xM07qTwB1KaKYuQGPuCL5Q== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d66ffbe5-a225-43a6-481b-08dbdfe69d16 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:37.6001 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9+VlHFYBCjS12SXPk3rN8erFoEcONf7hnv3ljQQPzyA9cFrZuUtkPagKWoo9nQuN3EoaUHlj5uVwbNhXMp2OJKTHsZzJIr3eqpscfKfcWsQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: FTgqnyJL450oKGOcFHsMoTV8V8WaEOSl X-Proofpoint-GUID: FTgqnyJL450oKGOcFHsMoTV8V8WaEOSl X-Rspamd-Queue-Id: 2E68380014 X-Rspam-User: X-Stat-Signature: ghdhckfkkked64tgf6xxa4r4bzmtee9d X-Rspamd-Server: rspam01 X-HE-Tag: 1699398609-379953 X-HE-Meta: U2FsdGVkX1+Lu20W19Sn1ieR+nTCullWvjsiIDUOh5G/72dnZu378M0UGYhbg1lk/CiC4O9uDhGPH4waijwzzcp2l5LXs0RhtgM1O88rWHs5E2h/YpWyy9QBtCbdUqPFgrbslXH5Junv5Vs9q0h0qaOjYF93OBMormUImxtF34QUrG/rNMrlmnYHAlZQ3lV87UniodA/fsiLTFni7L1iU5/zZ1m2uYvSA4iL4I8/GmDeDalLxCa2UUW+47QT0hjDd8xMFuCXckVQtN94JTpIC+f67B1M6+5GU2WyAmpgBYS1xajNh+i9jUO2ILxEGQsprh4WvVrSkwO5bAiJlgF/YDx6f0tlg4BFVHDbv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AM2n9MaP5BoSmwforYfwpZy+arUXaKXc2soQ+tlMXVb/7taakrjYt/2vQC+7mboV2kV/QDvN92vf5zT06jYJ/FelicVI5KwUj4MNZL0I1ORyTd4ethmDOzKeT7Z+dVH9t6sjR+/NLWHlPmc7rmDaDjLkewCPNLce+VwoLaDtT27iypGAh1+nL/nqYi/4n3GwxsWyuyNN4vxRLnKezv0FQPLLYtApqO3MYtLVjvxAOVAt8iA8qzCoPOGJT3Ft3p0KZyYbcvZFeh1ZFrl/9WkwLf4YYZ7nZTvcrZ6ARMB3HxU6ZyrNkTFXM0g5eU32dj45HCkxYY2XMQf+THQ5w4yJtYw/IFe5h8xyAXDyEnDN9naazq9SZrIE1lFDPChKEdMWP7BRg/opswtRhqsotsbbQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. All the uses here are in set-1 (some right after we give up a lock or enable bottom-halves, causing an explicit preemption check.) We can remove all of them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: David Ahern Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: Willem de Bruijn Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Signed-off-by: Ankur Arora --- net/core/dev.c | 4 ---- net/core/neighbour.c | 1 - net/core/net_namespace.c | 1 - net/core/netclassid_cgroup.c | 1 - net/core/rtnetlink.c | 1 - net/core/sock.c | 2 -- net/ipv4/inet_connection_sock.c | 3 --- net/ipv4/inet_diag.c | 1 - net/ipv4/inet_hashtables.c | 1 - net/ipv4/inet_timewait_sock.c | 1 - net/ipv4/inetpeer.c | 1 - net/ipv4/netfilter/arp_tables.c | 2 -- net/ipv4/netfilter/ip_tables.c | 3 --- net/ipv4/nexthop.c | 1 - net/ipv4/tcp_ipv4.c | 2 -- net/ipv4/udp.c | 2 -- net/netlink/af_netlink.c | 1 - net/sched/sch_api.c | 3 --- net/socket.c | 2 -- 19 files changed, 33 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 9f3f8930c691..467715278307 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6304,7 +6304,6 @@ void napi_busy_loop(unsigned int napi_id, if (!IS_ENABLED(CONFIG_PREEMPT_RT)) preempt_enable(); rcu_read_unlock(); - cond_resched(); if (loop_end(loop_end_arg, start_time)) return; goto restart; @@ -6709,8 +6708,6 @@ static int napi_threaded_poll(void *data) if (!repoll) break; - - cond_resched(); } } return 0; @@ -11478,7 +11475,6 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list) rtnl_lock(); list_for_each_entry(net, net_list, exit_list) { default_device_exit_net(net); - cond_resched(); } list_for_each_entry(net, net_list, exit_list) { diff --git a/net/core/neighbour.c b/net/core/neighbour.c index df81c1f0a570..86584a2ace2f 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1008,7 +1008,6 @@ static void neigh_periodic_work(struct work_struct *work) * grows while we are preempted. */ write_unlock_bh(&tbl->lock); - cond_resched(); write_lock_bh(&tbl->lock); nht = rcu_dereference_protected(tbl->nht, lockdep_is_held(&tbl->lock)); diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index f4183c4c1ec8..5533e8268b30 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -168,7 +168,6 @@ static void ops_exit_list(const struct pernet_operations *ops, if (ops->exit) { list_for_each_entry(net, net_exit_list, exit_list) { ops->exit(net); - cond_resched(); } } if (ops->exit_batch) diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c index d6a70aeaa503..7162c3d30f1b 100644 --- a/net/core/netclassid_cgroup.c +++ b/net/core/netclassid_cgroup.c @@ -92,7 +92,6 @@ static void update_classid_task(struct task_struct *p, u32 classid) task_lock(p); fd = iterate_fd(p->files, fd, update_classid_sock, &ctx); task_unlock(p); - cond_resched(); } while (fd); } diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 53c377d054f0..c4ff7b21f906 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -140,7 +140,6 @@ void __rtnl_unlock(void) struct sk_buff *next = head->next; kfree_skb(head); - cond_resched(); head = next; } } diff --git a/net/core/sock.c b/net/core/sock.c index 16584e2dd648..c91f9fc687ba 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -2982,8 +2982,6 @@ void __release_sock(struct sock *sk) skb_mark_not_on_list(skb); sk_backlog_rcv(sk, skb); - cond_resched(); - skb = next; } while (skb != NULL); diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 394a498c2823..49b90cf913a0 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -389,7 +389,6 @@ inet_csk_find_open_port(const struct sock *sk, struct inet_bind_bucket **tb_ret, goto success; next_port: spin_unlock_bh(&head->lock); - cond_resched(); } offset--; @@ -1420,8 +1419,6 @@ void inet_csk_listen_stop(struct sock *sk) bh_unlock_sock(child); local_bh_enable(); sock_put(child); - - cond_resched(); } if (queue->fastopenq.rskq_rst_head) { /* Free all the reqs queued in rskq_rst_head. */ diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index e13a84433413..45d3c9027355 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -1147,7 +1147,6 @@ void inet_diag_dump_icsk(struct inet_hashinfo *hashinfo, struct sk_buff *skb, } if (res < 0) break; - cond_resched(); if (accum == SKARR_SZ) { s_num = num + 1; goto next_chunk; diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 598c1b114d2c..47f86ce00704 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -1080,7 +1080,6 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row, goto ok; next_port: spin_unlock_bh(&head->lock); - cond_resched(); } offset++; diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index dd37a5bf6881..519c77bc15ec 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -288,7 +288,6 @@ void inet_twsk_purge(struct inet_hashinfo *hashinfo, int family) for (slot = 0; slot <= hashinfo->ehash_mask; slot++) { struct inet_ehash_bucket *head = &hashinfo->ehash[slot]; restart_rcu: - cond_resched(); rcu_read_lock(); restart: sk_nulls_for_each_rcu(sk, node, &head->chain) { diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index e9fed83e9b3c..d32a70c27cbe 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c @@ -300,7 +300,6 @@ void inetpeer_invalidate_tree(struct inet_peer_base *base) p = rb_next(p); rb_erase(&peer->rb_node, &base->rb_root); inet_putpeer(peer); - cond_resched(); } base->total = 0; diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 2407066b0fec..3f8c9c4f3ce0 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -622,7 +622,6 @@ static void get_counters(const struct xt_table_info *t, ADD_COUNTER(counters[i], bcnt, pcnt); ++i; - cond_resched(); } } } @@ -642,7 +641,6 @@ static void get_old_counters(const struct xt_table_info *t, ADD_COUNTER(counters[i], tmp->bcnt, tmp->pcnt); ++i; } - cond_resched(); } } diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 7da1df4997d0..f8b7ae5106be 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -761,7 +761,6 @@ get_counters(const struct xt_table_info *t, ADD_COUNTER(counters[i], bcnt, pcnt); ++i; /* macro does multi eval of i */ - cond_resched(); } } } @@ -781,8 +780,6 @@ static void get_old_counters(const struct xt_table_info *t, ADD_COUNTER(counters[i], tmp->bcnt, tmp->pcnt); ++i; /* macro does multi eval of i */ } - - cond_resched(); } } diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index bbff68b5b5d4..d0f009aea17e 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -2424,7 +2424,6 @@ static void flush_all_nexthops(struct net *net) while ((node = rb_first(root))) { nh = rb_entry(node, struct nexthop, rb_node); remove_nexthop(net, nh, NULL); - cond_resched(); } } diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 4167e8a48b60..d2542780447c 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -2449,8 +2449,6 @@ static void *established_get_first(struct seq_file *seq) struct hlist_nulls_node *node; spinlock_t *lock = inet_ehash_lockp(hinfo, st->bucket); - cond_resched(); - /* Lockless fast path for the common case of empty buckets */ if (empty_bucket(hinfo, st)) continue; diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index f39b9c844580..e01eca44559b 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -281,7 +281,6 @@ int udp_lib_get_port(struct sock *sk, unsigned short snum, snum += rand; } while (snum != first); spin_unlock_bh(&hslot->lock); - cond_resched(); } while (++first != last); goto fail; } else { @@ -1890,7 +1889,6 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int flags, kfree_skb(skb); /* starting over for a new packet, but check if we need to yield */ - cond_resched(); msg->msg_flags &= ~MSG_TRUNC; goto try_again; } diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index eb086b06d60d..4e2ed0c5cf6e 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -843,7 +843,6 @@ static int netlink_autobind(struct socket *sock) bool ok; retry: - cond_resched(); rcu_read_lock(); ok = !__netlink_lookup(table, portid, net); rcu_read_unlock(); diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index e9eaf637220e..06ec50c52ea8 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -772,7 +772,6 @@ static u32 qdisc_alloc_handle(struct net_device *dev) autohandle = TC_H_MAKE(0x80000000U, 0); if (!qdisc_lookup(dev, autohandle)) return autohandle; - cond_resched(); } while (--i > 0); return 0; @@ -923,7 +922,6 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, u32 block_index; __u32 qlen; - cond_resched(); nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); if (!nlh) goto out_nlmsg_trim; @@ -1888,7 +1886,6 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, struct gnet_dump d; const struct Qdisc_class_ops *cl_ops = q->ops->cl_ops; - cond_resched(); nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); if (!nlh) goto out_nlmsg_trim; diff --git a/net/socket.c b/net/socket.c index c4a6f5532955..d6499c7c7869 100644 --- a/net/socket.c +++ b/net/socket.c @@ -2709,7 +2709,6 @@ int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, ++datagrams; if (msg_data_left(&msg_sys)) break; - cond_resched(); } fput_light(sock->file, fput_needed); @@ -2944,7 +2943,6 @@ static int do_recvmmsg(int fd, struct mmsghdr __user *mmsg, /* Out of band data, return right away */ if (msg_sys.msg_flags & MSG_OOB) break; - cond_resched(); } if (err == 0) From patchwork Tue Nov 7 23:08:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449444 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3094C04A92 for ; Tue, 7 Nov 2023 23:10:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 10F454401B1; Tue, 7 Nov 2023 18:10:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 09729440186; Tue, 7 Nov 2023 18:10:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D77D84401B1; Tue, 7 Nov 2023 18:10:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B681F440186 for ; Tue, 7 Nov 2023 18:10:12 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 97A02A0B70 for ; Tue, 7 Nov 2023 23:10:12 +0000 (UTC) X-FDA: 81432703464.11.D7BD826 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf07.hostedemail.com (Postfix) with ESMTP id 3656A40005 for ; Tue, 7 Nov 2023 23:10:09 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=QcA6qssR; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=0P22qCW2; spf=pass (imf07.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398609; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=SMBfGn0Ei8IWZqD0rXzWkj3bRftjV4DQ10GWnqBubr8=; b=snjBQPJ/6OU1pKlCP1dQkYWbJpbSziHizoH73/bBoR+UxnzAdzLtQ0EfaZzjPqu/UNThfl v4PYe6WdDL6E7oX542uSg8wTXOBrLT3L002+HN3w1nlaa0UWfi4cVX2v6rNg5mbXr+4uUZ YJJZtrSi9LYhi41RXQUsgLtyH0lgiQs= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=QcA6qssR; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=0P22qCW2; spf=pass (imf07.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398609; a=rsa-sha256; cv=pass; b=GvrW8pqU2vsLLBnNMulxBExf/jRT8EADAzGFKJ08iCOEls20KnnfqrfQWZ7Dssji3Fuu4l fZWnWqesEBgXP/qj++Qu4UgGuSRSx2HvXv5HuoNaGEtorRovrFO996mrpgWAEE8iiCgmIy 2onQb3ii2CdugIqsQfNftYNgh0fm5Lc= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK5ho026459; Tue, 7 Nov 2023 23:09:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=SMBfGn0Ei8IWZqD0rXzWkj3bRftjV4DQ10GWnqBubr8=; b=QcA6qssRLtfVKvOzFWHskTeYlpxHxxwIqA9BJMqAmy3sGTb20MO5zxNdJNtcDJr/hPbc osx5duK9uozV8/bCo5n/zbNxBQNshNgw+53urHkRB5qV2X0RmzKb7q7ndjb1zADQZ0SV fkKmPxVSl5tvVhd7FHZfu5HUU6Jdn1zMjO5C2oGaSootOUJ2TA1uPTth3H8melnR+gEp 9q2YAvqFv7/x7EvsBr7GQHhrS0dvt2OyyqqXJdHgShWDx61CpRYuHJ4GOSlxk+ZcHeKd x6d3a125oWqxKF2iwSSwPaUtXFK9vs/f/qlLAatmIa79iYh7P/UTnfxSbz0nvYjKja4K ig== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:44 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N40ca031940; Tue, 7 Nov 2023 23:09:44 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2248q4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGyCbjwkD8KtSuVtvNfLDRfST+Ae73Ac0sYoacPAtDNLf0lZRahKbSbOYb7OR7s/FJvqDRHUq46nT9shqLlct6nr5hpRPN2QdX9tJ4eyWRQIWDdbqANVSv2IiTqs3WpqtxDnuVwWjc1YrlPoaklsl+AEkcjp0BDILXkxlPpaF3yLomT4bpW3t08QFIpylYZ+p9RcyFZZApqW/LPjP+B7jiLjCYY1zW0MWpAyCRKMxHLj6qvWjWyyNu0Oz5SrHjjV6PphWzgWqa8PaidegMCi0fAQf6JsgCmtgV/Rsoyjb4us+0bK8GBzydvD/42WdxbjR1Rqdhw9L6/4T/3VX3WOrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=SMBfGn0Ei8IWZqD0rXzWkj3bRftjV4DQ10GWnqBubr8=; b=RWFWqnqrBH8PpvJ/x/PKjgUlg56Nk/4naRe+uWtYoriNjfMAGXk0Ozq9IDHCqA16sDaA+4j9YmdeBlV/3JMzELKbSO7NRcvhn936HvYGYfI6VijX/+6UGLRcYfa75mPjm8tG+k/HrsvL5/c+9WSxOe2v84wIFoyHlzLjIbqBoxZyRnNtr6zEfG1myzdG1ShbkHQcfbqGJE+hjlPuOOmRuedCccMW0teZdj2yLSZuF9AdqigrJ0V9WZjYYB3AyYiAZ1HuGEAuKe0FAXibHgaAHAZiH1tR1461Act3R9YZJN7MtranDQAldaai+DnyAN5dk8jnqMBd+0/Xpom6r9yfDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SMBfGn0Ei8IWZqD0rXzWkj3bRftjV4DQ10GWnqBubr8=; b=0P22qCW2FGxdZ7XRjDTJBvaP/nKpPnMEgX1FBzSxGfgNAKXdrSnvpJifw2AmnndDvFgl1jop5elWLuQtPk0RtLql1z6wQEZ9Kbso9OTHlHsDu/jx9EAJGjO2F3fGkIgx2ZgUnlqnNVL4q/7z6DlELZIB/TDyImEiARClpwq05jU= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:39 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:39 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Marek Lindner , Simon Wunderlich , Antonio Quartulli , Sven Eckelmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Roopa Prabhu , Nikolay Aleksandrov , David Ahern , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Willem de Bruijn , Matthieu Baerts , Mat Martineau , Marcelo Ricardo Leitner , Xin Long , Trond Myklebust , Anna Schumaker , Jon Maloy , Ying Xue , Martin Schiller Subject: [RFC PATCH 79/86] treewide: net: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:15 -0800 Message-Id: <20231107230822.371443-23-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0049.namprd16.prod.outlook.com (2603:10b6:907:1::26) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: bc51f8ee-62ac-4c3e-75a3-08dbdfe69e66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NZOZ58Rua+MDPAMIB79Sz1kWSVhcA+DAEHJvxfZwdA4AUp1X7aBsJubOqKDxKid+1ruXPPDfdOLBmPRN2TIej6pUbuv4/8spSRoTX0101BbLSlzSI2i+PXOZUKBQdgkjxzdEYmqqrwxztfTx1kzF8Y6FX4zKluU7DfIne0SLNF64AJukxtKwaio6frBWw1YwwfPrlmZ1qxRLGTscbvrDhuXHW9TyhHYNKylbc9jYfVQtgtYwTI/srG2ubprEQwiotIWvjHj9ilyJVaPb/5qTnb4vOQi2y1YzD7xNtWOlPD5p7VH/BXUdrt+UbdOW61UJKgdjyiYtEEfSRgxslpAVlobnztXtT5WAy+W6HrAue5VDyEHAF29xmNMt4P5KJmQJzIIbrNA49luLbkEaa5c27LEg9gkVzWQarBZo6wGfTNvb7b20ePvY3jTD2SZGY91YH1Xmk7xIoUD/79a8p8+yPD+ov/68WpzmvQTNOY++5ALv+SHOEkY3BabpYQ7FYJ+RvenTtD6tPqNvgdrzO+TD/t4E5C4ZOqP5ZI9K1p2suVY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7366002)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SSXFJDob3taW+LnnFUPw5zleGJR8eRi4ni3SOaD0lyBpLT1+XkIIbCdBKOI1WTww2uXqNMVtR1OMJEQSd40YE8aKIHoqetaSx1AFWitcCiZYOM7rH/0uAV4pDa4NFhwMz9pYdu8TmxibDGX2hhpRwH/JhW1r/NkG8ig3QsPqHCLVTP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9lXW8tWfjP5QFl0A4gz8but+6THAMA4kXrCR8OLm/hHceP4EL0NUudny1vdVzlwx7sY6jJ77r1aFVUzJlGX4VZGD2fnti2tCd0ak8w40AjIBECzU/uiPpnCTRX X-MS-Exchange-AntiSpam-ExternalHop-MessageData-1: tVqUpB5f8847Os23bTMuXymucZYpSRCHpt/oiVddWwD9ILWRtOJT2L+skMRuFZGZyMp3BW9ymVafnDmpJPG7sPuugqnLHe2DUqVOvjAqzuviboxjrPu8AwEmu5SpnK1/2tth3slmnUOsXIuJjQgS6nT0p8D9Czspgvd+IJY9IyXzpxeAzDRXlTkhZ1I4kLwuAEbOmwlwhbw8GW5mTiGMZcKgNw0GfdWyqgY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc51f8ee-62ac-4c3e-75a3-08dbdfe69e66 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:39.8023 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cpvmKQ8tUAeTfpJpb3xk7DCJtPV1+2KSk5FkGVEQu3hONLquUa4eWojy5v9TXT/k0i5d2/txyBPNqhxEa5+Uu2TJoT5d0dqKhREADMYAaXU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: tEbquswOHUX23dBsm0nEutDMMl4LwZaf X-Proofpoint-ORIG-GUID: tEbquswOHUX23dBsm0nEutDMMl4LwZaf X-Rspamd-Queue-Id: 3656A40005 X-Rspam-User: X-Stat-Signature: mewsjah1ru879gw7brnw8jm7u76s1pkx X-Rspamd-Server: rspam01 X-HE-Tag: 1699398609-333256 X-HE-Meta: U2FsdGVkX1/e54V88nTMKhdTIua2/VUJyPvlX1KSGBSsLsYlwPe+ZXL4ehR1fq7zALPicZCBuWyYrRDsCZEZ2YpPx7fWnbGfXvUREit1K2TQs+JxmuiqtELuuan7OuhuN0npXPyu4WH2gl9IJo6dlqFS6R1XtRMcOCxH2NEyskdXzZ5Z705uVJ6gYTJwD6xUuwcN4xoe1CKfDkqlPn9fHJjb5BZV3fnhVeLLUSR+PGD3yklVq/ShBuXgwoqZLEi6+c0JIA2mY+U8Rjvb8a8giXBWIu5qXSruMJjYncH8LESVysStLinUXE4ir9db5saBRxbzJNJxMDh7YHL4qtijrxiM1l0cfpkghuWQZsaIcU6P5mEc9ApngzV9cPTdD81sEH6u01qxz4+kxJN15O/lrYFh9xlmGBX7woD1tg0ScQP5g46u4sMhHQSA1VEYjsxkTZGeAL2DKpfVXDOYn7vZ/4vd2FQ7N9Z6qD4w6uUKW79JdbLoFO7Uq7T2y0XQDyvzj++4y/IamV5q70c3uHN9D5o5M4FtustYaUwVsdJj9n7BUkPq1dFNn0Vd0tSqtQUgV06KpSERMXrh5tdfKA03I1QLI0kcXsSSfl//5wcfthusjb9w5zPXmreDj0C/0GtLsWnG/chAiLL57e3BMwfRgNLW/snpH2BlbIpfan7rDpu6QbhcCpT9IeAihPnY0ZGeNTM39bjhmFsM6nLMQ0/Fn5rd1YGlyKNMSJNSJTogZaunz0zu1TST6yI4W+S3hTTwTnmV+dHMLEvqDDZgNxXY9vwN9XakSerEh3trEE0S7BI7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SXNx6p2UK14mk/9Hx/oIfGJ0Wb609he3hJIVoCrJKiTHx6OAv1bOmmmOIhNVM40gqwE6lNauY/D/rid/qVygTlvRTcUQrl/mkeOImyDznHE7Uov6YlR0cW ICgoJ3QX Jlw7gujDNmKAuycM8DgS5nLEJAqKA0+9uZMkGRbjlDbIMx/sr0GAtXANwRFOMWPq X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the uses here are in set-1 (some right after we give up a lock or enable bottom-halves, causing an explicit preemption check.) We can remove all of them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Marek Lindner Cc: Simon Wunderlich Cc: Antonio Quartulli Cc: Sven Eckelmann Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Roopa Prabhu Cc: Nikolay Aleksandrov Cc: David Ahern Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: Willem de Bruijn Cc: Matthieu Baerts Cc: Mat Martineau Cc: Marcelo Ricardo Leitner Cc: Xin Long Cc: Trond Myklebust Cc: Anna Schumaker Cc: Jon Maloy Cc: Ying Xue Cc: Martin Schiller Signed-off-by: Ankur Arora --- net/batman-adv/tp_meter.c | 2 -- net/bpf/test_run.c | 1 - net/bridge/br_netlink.c | 1 - net/ipv6/fib6_rules.c | 1 - net/ipv6/netfilter/ip6_tables.c | 2 -- net/ipv6/udp.c | 2 -- net/mptcp/mptcp_diag.c | 2 -- net/mptcp/pm_netlink.c | 5 ----- net/mptcp/protocol.c | 1 - net/rds/ib_recv.c | 2 -- net/rds/tcp.c | 2 +- net/rds/threads.c | 1 - net/rxrpc/call_object.c | 2 +- net/sctp/socket.c | 1 - net/sunrpc/cache.c | 11 +++++++++-- net/sunrpc/sched.c | 2 +- net/sunrpc/svc_xprt.c | 1 - net/sunrpc/xprtsock.c | 2 -- net/tipc/core.c | 2 +- net/tipc/topsrv.c | 3 --- net/unix/af_unix.c | 5 ++--- net/x25/af_x25.c | 1 - 22 files changed, 15 insertions(+), 37 deletions(-) diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 7f3dd3c393e0..a0b160088c33 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -877,8 +877,6 @@ static int batadv_tp_send(void *arg) /* right-shift the TWND */ if (!err) tp_vars->last_sent += payload_len; - - cond_resched(); } out: diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 0841f8d82419..f4558fdfdf74 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -81,7 +81,6 @@ static bool bpf_test_timer_continue(struct bpf_test_timer *t, int iterations, /* During iteration: we need to reschedule between runs. */ t->time_spent += ktime_get_ns() - t->time_start; bpf_test_timer_leave(t); - cond_resched(); bpf_test_timer_enter(t); } diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 10f0d33d8ccf..f326b034245f 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -780,7 +780,6 @@ int br_process_vlan_info(struct net_bridge *br, v - 1, rtm_cmd); v_change_start = 0; } - cond_resched(); } /* v_change_start is set only if the last/whole range changed */ if (v_change_start) diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 7c2003833010..528e6a582c21 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c @@ -500,7 +500,6 @@ static void __net_exit fib6_rules_net_exit_batch(struct list_head *net_list) rtnl_lock(); list_for_each_entry(net, net_list, exit_list) { fib_rules_unregister(net->ipv6.fib6_rules_ops); - cond_resched(); } rtnl_unlock(); } diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index fd9f049d6d41..704f14c4146f 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -778,7 +778,6 @@ get_counters(const struct xt_table_info *t, ADD_COUNTER(counters[i], bcnt, pcnt); ++i; - cond_resched(); } } } @@ -798,7 +797,6 @@ static void get_old_counters(const struct xt_table_info *t, ADD_COUNTER(counters[i], tmp->bcnt, tmp->pcnt); ++i; } - cond_resched(); } } diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 86b5d509a468..032d4f7e6ed3 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -443,8 +443,6 @@ int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, } kfree_skb(skb); - /* starting over for a new packet, but check if we need to yield */ - cond_resched(); msg->msg_flags &= ~MSG_TRUNC; goto try_again; } diff --git a/net/mptcp/mptcp_diag.c b/net/mptcp/mptcp_diag.c index 8df1bdb647e2..82bf16511476 100644 --- a/net/mptcp/mptcp_diag.c +++ b/net/mptcp/mptcp_diag.c @@ -141,7 +141,6 @@ static void mptcp_diag_dump_listeners(struct sk_buff *skb, struct netlink_callba spin_unlock(&ilb->lock); rcu_read_unlock(); - cond_resched(); diag_ctx->l_num = 0; } @@ -190,7 +189,6 @@ static void mptcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb, diag_ctx->s_num--; break; } - cond_resched(); } if ((r->idiag_states & TCPF_LISTEN) && r->id.idiag_dport == 0) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 9661f3812682..b48d2636ce8d 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1297,7 +1297,6 @@ static int mptcp_nl_add_subflow_or_signal_addr(struct net *net) next: sock_put(sk); - cond_resched(); } return 0; @@ -1443,7 +1442,6 @@ static int mptcp_nl_remove_subflow_and_signal_addr(struct net *net, next: sock_put(sk); - cond_resched(); } return 0; @@ -1478,7 +1476,6 @@ static int mptcp_nl_remove_id_zero_address(struct net *net, next: sock_put(sk); - cond_resched(); } return 0; @@ -1594,7 +1591,6 @@ static void mptcp_nl_remove_addrs_list(struct net *net, } sock_put(sk); - cond_resched(); } } @@ -1878,7 +1874,6 @@ static int mptcp_nl_set_flags(struct net *net, next: sock_put(sk); - cond_resched(); } return ret; diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 886ab689a8ae..8c4a51903b23 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3383,7 +3383,6 @@ static void mptcp_release_cb(struct sock *sk) if (flags & BIT(MPTCP_RETRANSMIT)) __mptcp_retrans(sk); - cond_resched(); spin_lock_bh(&sk->sk_lock.slock); } diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index e53b7f266bd7..d2111e895a10 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c @@ -459,8 +459,6 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp) rds_ib_ring_empty(&ic->i_recv_ring))) { queue_delayed_work(rds_wq, &conn->c_recv_w, 1); } - if (can_wait) - cond_resched(); } /* diff --git a/net/rds/tcp.c b/net/rds/tcp.c index 2dba7505b414..9b4d07235904 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -530,7 +530,7 @@ static void rds_tcp_accept_worker(struct work_struct *work) rds_tcp_accept_w); while (rds_tcp_accept_one(rtn->rds_tcp_listen_sock) == 0) - cond_resched(); + cond_resched_stall(); } void rds_tcp_accept_work(struct sock *sk) diff --git a/net/rds/threads.c b/net/rds/threads.c index 1f424cbfcbb4..2a75b48769e8 100644 --- a/net/rds/threads.c +++ b/net/rds/threads.c @@ -198,7 +198,6 @@ void rds_send_worker(struct work_struct *work) if (rds_conn_path_state(cp) == RDS_CONN_UP) { clear_bit(RDS_LL_SEND_FULL, &cp->cp_flags); ret = rds_send_xmit(cp); - cond_resched(); rdsdebug("conn %p ret %d\n", cp->cp_conn, ret); switch (ret) { case -EAGAIN: diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 773eecd1e979..d2704a492a3c 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c @@ -755,7 +755,7 @@ void rxrpc_destroy_all_calls(struct rxrpc_net *rxnet) call->flags, call->events); spin_unlock(&rxnet->call_lock); - cond_resched(); + cpu_relax(); spin_lock(&rxnet->call_lock); } diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 7f89e43154c0..448112919848 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -8364,7 +8364,6 @@ static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr) break; next: spin_unlock_bh(&head->lock); - cond_resched(); } while (--remaining > 0); /* Exhausted local port range during search? */ diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 95ff74706104..3bcacfbbf35f 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -521,10 +521,17 @@ static void do_cache_clean(struct work_struct *work) */ void cache_flush(void) { + /* + * We call cache_clean() in what is seemingly a tight loop. But, + * the scheduler can always preempt us when we give up the spinlock + * in cache_clean(). + */ + while (cache_clean() != -1) - cond_resched(); + ; + while (cache_clean() != -1) - cond_resched(); + ; } EXPORT_SYMBOL_GPL(cache_flush); diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 6debf4fd42d4..5b7a3c8a271f 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -950,7 +950,7 @@ static void __rpc_execute(struct rpc_task *task) * Lockless check for whether task is sleeping or not. */ if (!RPC_IS_QUEUED(task)) { - cond_resched(); + cond_resched_stall(); continue; } diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 4cfe9640df48..d2486645d725 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -851,7 +851,6 @@ void svc_recv(struct svc_rqst *rqstp) goto out; try_to_freeze(); - cond_resched(); if (kthread_should_stop()) goto out; diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index a15bf2ede89b..50c1f2556b3e 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -776,7 +776,6 @@ static void xs_stream_data_receive(struct sock_xprt *transport) if (ret < 0) break; read += ret; - cond_resched(); } if (ret == -ESHUTDOWN) kernel_sock_shutdown(transport->sock, SHUT_RDWR); @@ -1412,7 +1411,6 @@ static void xs_udp_data_receive(struct sock_xprt *transport) break; xs_udp_data_read_skb(&transport->xprt, sk, skb); consume_skb(skb); - cond_resched(); } xs_poll_check_readable(transport); out: diff --git a/net/tipc/core.c b/net/tipc/core.c index 434e70eabe08..ed4cd5faa387 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c @@ -119,7 +119,7 @@ static void __net_exit tipc_exit_net(struct net *net) tipc_crypto_stop(&tipc_net(net)->crypto_tx); #endif while (atomic_read(&tn->wq_count)) - cond_resched(); + cond_resched_stall(); } static void __net_exit tipc_pernet_pre_exit(struct net *net) diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index 8ee0c07d00e9..13cd3816fb52 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -277,7 +277,6 @@ static void tipc_conn_send_to_sock(struct tipc_conn *con) ret = kernel_sendmsg(con->sock, &msg, &iov, 1, sizeof(*evt)); if (ret == -EWOULDBLOCK || ret == 0) { - cond_resched(); return; } else if (ret < 0) { return tipc_conn_close(con); @@ -288,7 +287,6 @@ static void tipc_conn_send_to_sock(struct tipc_conn *con) /* Don't starve users filling buffers */ if (++count >= MAX_SEND_MSG_COUNT) { - cond_resched(); count = 0; } spin_lock_bh(&con->outqueue_lock); @@ -426,7 +424,6 @@ static void tipc_conn_recv_work(struct work_struct *work) /* Don't flood Rx machine */ if (++count >= MAX_RECV_MSG_COUNT) { - cond_resched(); count = 0; } } diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 3e8a04a13668..bb1367f93db2 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1184,10 +1184,9 @@ static int unix_autobind(struct sock *sk) unix_table_double_unlock(net, old_hash, new_hash); /* __unix_find_socket_byname() may take long time if many names - * are already in use. + * are already in use. The unlock above would have allowed the + * scheduler to preempt if preemption was needed. */ - cond_resched(); - if (ordernum == lastnum) { /* Give up if all names seems to be in use. */ err = -ENOSPC; diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 0fb5143bec7a..2a6b05bcb53d 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -343,7 +343,6 @@ static unsigned int x25_new_lci(struct x25_neigh *nb) lci = 0; break; } - cond_resched(); } return lci; From patchwork Tue Nov 7 23:08:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDADEC4332F for ; Tue, 7 Nov 2023 23:10:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B5B0440186; Tue, 7 Nov 2023 18:10:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C26C4401B4; Tue, 7 Nov 2023 18:10:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 098A5440186; Tue, 7 Nov 2023 18:10:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D26154401B2 for ; Tue, 7 Nov 2023 18:10:13 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9343F80BDA for ; Tue, 7 Nov 2023 23:10:13 +0000 (UTC) X-FDA: 81432703506.30.A2D1892 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf01.hostedemail.com (Postfix) with ESMTP id 322F940018 for ; Tue, 7 Nov 2023 23:10:09 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=c9NS75+t; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=P4kWfySG; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf01.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398609; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=SWrIc5qkOrQC/kCCWcA3axDsd3JASb6UTB+1aGhysyU=; b=6groFFugBJap21O04NoMH67V8DjTYunhCUdL5lmEPukqXDnaR4+ylxrVqXNI9wsLJOx1OJ FBBPkR8ZwantyzRQ4wjKz7AnwkhCLZtovBXIKw7FiCxfi1ftFE0M9FqjcSSoth20gO/FN9 /fYj3ErlldUZKrwshRZwU7XcMUSskes= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=c9NS75+t; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=P4kWfySG; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf01.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398609; a=rsa-sha256; cv=pass; b=J6RqTIuBS6z+3WrEFY+aJpq283XH23qVcvXm7Ysd14smTJ4t7I2DkE6IZsg3w1pk3+DG+t w/IRjp7+/pqoFhs+J48rXLVlO/KDK/OCwIl4KG+imd7SuSH0Kh/NSKrIoHbm8Hq3z714f0 GKdRfLIUvSagEuMhuarSZ0LMXhPL/wU= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LK6M0026463; Tue, 7 Nov 2023 23:09:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=SWrIc5qkOrQC/kCCWcA3axDsd3JASb6UTB+1aGhysyU=; b=c9NS75+tcFO6kUB8nHnl0MU3NQyZ882Asa/K2y0yl8D4GfCjK5dx652QonYR5GwtnpSV /hc/v7kS8yaxE6oke2L+Khui/jgYKFJ4pVCIClWhB+psObYnL29pBP/8rTJ1L53X+g4f R4uU+0M2SHhA784C4sm66TLbnQydU1NF1SrTioHugVrZfCBG4efJR0lohUuGVYi2peFx aiF7QASfElHVeVz2acIppV9QAk6L5ICOHl83kcBWTJsjW6AVZaVT1pmbla7FOYmJUk1U qUvAk559Fy9MamWipMzymYpZLGMSEo2SODxrFNrGLbsCpeRZ6Ef4GelUiJJGSD8Ugfbx 7w== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2106ww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:45 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N40cc031940; Tue, 7 Nov 2023 23:09:45 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w2248q4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b9K/obVfLKtgaHtTxuErP+t+/1aeNIAWC0WZkvq4yHl6qfMxUZm0toyvRn8VxouJlPI9KRUJFGUEq1o50mBZWHufmw4DKYwquogXbkEbSIA6fpc4PIHX0VQtpUAWbE8S2rsjPsUJ9hikZsJcpaqSfs7CU3AITATPclnJzRpmMFdRUMzfA+YoGmtgupqOtlP880l6tlk/Vk3X1ngauo8WhVeWylXVlLwsyNnYLwjxrOu/FqsDFUwd0YTiGVCZmXJn/eIgYsE4EhAKhA4z2KvKzBFTI67M8+pCPYazX3itusal2xAHIWVKlwrD+vZxKP3xiKm3m0VkwhuA6tMJeBeu8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=SWrIc5qkOrQC/kCCWcA3axDsd3JASb6UTB+1aGhysyU=; b=aaDC5rB4+BPT0TSvrmowBiQ8H1A658G1JlV474NpMbYY1Hqnex3um5emMI5uklajYWaNYWCYKOqxkwSlvwalOq5p0tCovjD0rU8oxiG9mx88Dc/iXxV1HHMiSjipaiFCxxW39Sxfgk2ed3tRVLEymqXu+QpgBc6bZPzwIgnoxz0msE5wKaTxBUBo1ql+y1Cjd0E30JolYP/Eel8pthytkSZFCr7Zahim8G9zXZkikhe96Zhm5SmeQO1nzBGcN5XbitORS3ruOTgDAMufnVRISWZnHBE/a8gYwgfpaqIIa0q3xtf7sZ/JIV327j/qilO8mLm1s5otnL1g6j8kedUOqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SWrIc5qkOrQC/kCCWcA3axDsd3JASb6UTB+1aGhysyU=; b=P4kWfySGCs2i1g216EfMHJvEgn9XVcKgs86SPcuO4wbVanykvrh+n4cyeKv4CWtCsKWrOXliG9FrPEKtdK/KBRRrJK6mzFRik3WsCSzJwj9gP0l3jphkRqgJ38cLwtWTGKacV586i4y0p7N0Upf4MYJB+q98Z2WQHxYzXcS489M= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:42 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:42 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Jaroslav Kysela , Takashi Iwai Subject: [RFC PATCH 80/86] treewide: sound: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:16 -0800 Message-Id: <20231107230822.371443-24-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW2PR16CA0048.namprd16.prod.outlook.com (2603:10b6:907:1::25) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 3716c9f3-1e5b-4069-7bfa-08dbdfe69faf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r54WqXo7qpQfC1ZU5ipUs6VIkeWNoOoL46n+x6PXQRcb/IcNe+i7IDzobLVTOmmxjHWMZUDzYnz39ZEhdnGZkQ/0lFTPMaqFUAg+0woZna4S5TagLhVjgsaZmzp4SX9gWYr3pp/mpg+CS3pTEUHYanF68QQUx9Y5RgTr84d8ynjM5H5Vcxo6snjfSWigRUTMfijnx84kktluegX1sJixMmF7lTDCQuXW/VLVVedVetB1bISxG38vt+kINNqY2AFWBWns3kHaQ5rN2LK+5oUgic5bfuSJjmJ6qR0nqbuvpsdiuMfKwtcLjpwR4tH8wrtUCG1XLwWavZK9C3wyzMA/P8XGYrmRseFD0RF4d7z9bbhsiYswnNXe7lsF9/VYLESa5oWGSGA4Efd862K2YafrqT2k8mmwYhukW8kYqs/lP94n180Otq7B12xVxSa61vbBKl8Dkiu5xu3uGt6Rm69YUwfFn6k3/FPAxGOYvo1pKUPulJ0eggiuhwV5fD2ZYDG1dfNI+CufuhLf7bGnDMfbOTk/AeEXjy5bOmgAS5D2iNI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F9lZ7WbEj7HxCeUuhux5K7fw+jooIZjB/jmsMl9KmxfV/Sr0eMgDXcxFrT+FJYC5rlaMvbL3s5tRz8Ex4i9P8fdjD+n+s3+yDqQcXpwQAMgqjrTbAIphW4umrSj45UuYimefwckH6ZlUonm8nz2l4V3Smgh1L8N+x7ybz6dhk2D4DhoO1KO5ZydiT0/k71cfbDTLcpIWyFaJJsiTGorxOZXdMcV4mPpFyY0PiV3DnnWuiLaIHZdjphkNhu+EBFtDF/cdgYWMnJH5Ro4sNaaY+cggE1ghgl0r2ciSGJJEMgcdvIjOTr7aXp6rlWAM4AvSiQ4uqrfjbVa/wFlhZLWXjxgFDWkO3WIN9zfMS+FBYLIpmLiu0tCq0E5Uexyh6beJZzLvzrQ2Vot/6Iuh7RPJ1qpn+rORE4bc85HOsAL026NlCOsuHzM93Jrr6BTPajMxGU63fpNYE9q5GIqN4V4tv7dngbN5Tu1UvT6BJEDOmnY9VzKF++c7j1GSB6WqlPEWFxumALXQBB2XcU6Ab6+QHIUlIOqHughXLc4cMH21RyzaYH5rfS477EU5cDzE+/PYj1FCaf6zFrRdT2f1E94COgI26RMdEKkSE08ATD5aN9MAWlAm4RUTD2cnSWIzgVW9K7zqCo/edA4va9/9fpH/hXm3pRoJLggAIkJME2zyKJ/gUXhHM/qAXxebLYWb6Hi6F+klduJo0WeH1ZCXgqXmGyJld4HG3vLD2AETfQsUQ8W/4aDQ8t2FRo0JEzeiLqjOfFkwukhLuN2EHdH8pnC/af7sZQUkVwM4Pzur8nxT+Ph76yWS0M78Rk6ZsM2S14+bqBPaGzhbqCaCgxYTLmBV0MPh2bPkBf8wx6UWV/krSEJvqxLW9gw2L4D3rt4X5M7YD1fKb0lyqGOkExNYPHWClai3QF76nGx5l2Z1+3nMtnkl6ee/NZGyxBxnoH3cW/uQz+SdulAc9rhypkdWH+vv92ldf87sarsqINktds0MdShsSrqfzx6FFF7krCzqCCx93qTrxqm3MKrwsAW8EAhE65/ab/80raHb5QFd0KhEnLcgyUCgQ7AjdYG0AayyixrzBlHORu8VV/UsnrwwlHf6tqCqRi9GrEoiz2vaN6WdmBBDk4kRFHYfedZBcUOwZDeQeFdk6iaEkceHwEaZg9LZ6kuL+lUq+QenSlUHQnSW/jqCsTeyVCcPB31bog5cn/hNCVR0ldApFftW5cymqVLFbCKcl18e8EXMTC69MCaeWdPwK/nckB1iQGnuN8fqcXuutFWm/TpNGQABYaMjTL61hffslfO5NarJZL8s42ECjQIXcO50eNmlLEKmkCHJM9D685oEffeOxFGqEo17wpGZGsDHWuIZGPr5Cnf64YnlHd5eFD81UPvXQYCv9sN/YT6QiPOegTH7a/x4J9fOMoK+snwsk2Hmb7xUmCjEaY/s56bT230J/njr7GfckUbhgcUuuhhQ+6c1JcgWRvie+Vn5zagvumw1uiZkcIeed7CikdN2Bmny+IRhYeqJM3YmrnNXAM/rarQfnGY0hmIM6NOc7EA90FPzjauoMDfwoKNNuqL4eo1+QzMIiU4MCm3YUyzkDOPK3jN+hOlQmadwEPIypg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: rJ8GzffImUr7rWkk6n6x6FyqQ4J7R1CKoywi+hFocLVbCPZiQMWPBu4z0h/hz37KxCIhjKLCr8ArGynOh2+0ts/BDUR5OalgCGyd4/nKfQ4umA6teLmgzl1ftExm+sb1XM0FprhcIoPvtMmmJBveN0GPLnvNIv5PdYtxApJ8sAjWKgnpbWpGPaGL3yqhs2dvKhbvOhKhDifh732mUyqrBox8BD+g5d/43gUbEbwFiLgk5IoagOSjhTtmFQQ5XuYN+FBfDjPmnEJ4qGUHS/otiIA45EgkX6lb74n1tmG/wKoOhaOwyOfc88riPjMe2bh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WyNuJPQQw/ox6qz1OmY5zEndlFJzoZvNsjOWiEPRTN4RPyaAhes6lT0ys6B7sQ0PsXCOOo4p7m0tH5njS68OJLG8iZDBvGx9FGtt7pzczcMR+vN7TbhclkGcAfU7rzrJwa05a0FT1Vn1XOtrcbIp32v2kDHBwWeQgOQFvyZGfkUAmE2N0+ra08+qYo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3716c9f3-1e5b-4069-7bfa-08dbdfe69faf X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:42.0087 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GQJ5mgVXbePOtzD7HUOiU3xbvP72MbUzYVF6okip1z9RUZbvWQTh5V+KOqjZS9CF1dwA2Gq62O58XQ/q6ISe2TiNdmUZ3YhAyOKbmTky7KM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=944 mlxscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: piiHRmYcU7l3D34LXQADxLl5dI9qXFwB X-Proofpoint-ORIG-GUID: piiHRmYcU7l3D34LXQADxLl5dI9qXFwB X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-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rpynGhXheVK6rbjA6U6pP4FBaFCQF/tzl0CXRoZMohsaA/as7s2TmUqgPFhr4KDOlnz1cHmZpC8O0sQ2OPRAL/oZo8T050AHwTaP0WqLG19Qsww+CpwlHD61eN5p7WvzT6O/9pkhVNEiPbeFg+jMHnOBg7o3eFX3flGJ5w3djiI9OzaQNLmxQoZG3mkxn/ooSbmufIFuBP0Eak34vA/f0z4cj/DXH/bDpR6drEwtEAzUThEy91yXyuvCEPNIN9ZE4IB9XJb09KAo7M+tlZEUy4DwkYnR7Th4Hr3EZpJL628sl4pbIOvfd2N5/tntQ+LyHK0m+LeKt1HAr0xgS53gW9g0/Z6WajXA1YTJE3/QNjlxQvt7gi2p42oWx4oMo5g+YxERtBTZ8YRcZ6dbiSx+J7H0V8SzMze70HAIDnobb56+hASbqco94brgo3ZHQypiSmYZszTHLQ2e8AEFVcGNLnXGcLJOEPC0F7gurVdkd6WZciXc3MXXf92Hz3VKpSDQKeNNfmpp3/i+CIrMh4ig4sP5Gf9s+NqqMQBXK4lPmXeE2AcrjzkmacxFhfXjK/ZWi8nuP8fDgUarB0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most uses here are from set-1 when we are executing in extended loops. Remove them. In addition there are a few set-3 cases in the neighbourhood of HW register access. Replace those instances with cond_resched_stall() [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Ankur Arora --- sound/arm/aaci.c | 2 +- sound/core/seq/seq_virmidi.c | 2 -- sound/hda/hdac_controller.c | 1 - sound/isa/sb/emu8000_patch.c | 5 ----- sound/isa/sb/emu8000_pcm.c | 2 +- sound/isa/wss/wss_lib.c | 1 - sound/pci/echoaudio/echoaudio_dsp.c | 2 -- sound/pci/ens1370.c | 1 - sound/pci/es1968.c | 2 +- sound/pci/lola/lola.c | 1 - sound/pci/mixart/mixart_hwdep.c | 2 +- sound/pci/pcxhr/pcxhr_core.c | 5 ----- sound/pci/vx222/vx222_ops.c | 2 -- sound/x86/intel_hdmi_audio.c | 1 - 14 files changed, 4 insertions(+), 25 deletions(-) diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 0817ad21af74..d216f4859e61 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -145,7 +145,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) timeout = FRAME_PERIOD_US * 8; do { udelay(1); - cond_resched(); + cond_resched_stall(); v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV); } while ((v != (SLFR_1RXV|SLFR_2RXV)) && --timeout); diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index 1b9260108e48..99226da86d3c 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c @@ -154,8 +154,6 @@ static void snd_vmidi_output_work(struct work_struct *work) if (ret < 0) break; } - /* rawmidi input might be huge, allow to have a break */ - cond_resched(); } } diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index 7f3a000fab0c..9b6df2f541ca 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -284,7 +284,6 @@ int snd_hdac_bus_get_response(struct hdac_bus *bus, unsigned int addr, msleep(2); /* temporary workaround */ } else { udelay(10); - cond_resched(); } } diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c index 8c1e7f2bfc34..d808c461be35 100644 --- a/sound/isa/sb/emu8000_patch.c +++ b/sound/isa/sb/emu8000_patch.c @@ -218,11 +218,6 @@ snd_emu8000_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp, offset++; write_word(emu, &dram_offset, s); - /* we may take too long time in this loop. - * so give controls back to kernel if needed. - */ - cond_resched(); - if (i == sp->v.loopend && (sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP|SNDRV_SFNT_SAMPLE_REVERSE_LOOP))) { diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c index 9234d4fe8ada..fd18c7cf1812 100644 --- a/sound/isa/sb/emu8000_pcm.c +++ b/sound/isa/sb/emu8000_pcm.c @@ -404,7 +404,7 @@ static int emu8k_pcm_trigger(struct snd_pcm_substream *subs, int cmd) */ #define CHECK_SCHEDULER() \ do { \ - cond_resched();\ + cond_resched_stall();\ if (signal_pending(current))\ return -EAGAIN;\ } while (0) diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 026061b55ee9..97c74e8c26ee 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1159,7 +1159,6 @@ static int snd_ad1848_probe(struct snd_wss *chip) while (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) { if (time_after(jiffies, timeout)) return -ENODEV; - cond_resched(); } spin_lock_irqsave(&chip->reg_lock, flags); diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c index 2a40091d472c..085b229c83b5 100644 --- a/sound/pci/echoaudio/echoaudio_dsp.c +++ b/sound/pci/echoaudio/echoaudio_dsp.c @@ -100,7 +100,6 @@ static int write_dsp(struct echoaudio *chip, u32 data) return 0; } udelay(1); - cond_resched(); } chip->bad_board = true; /* Set true until DSP re-loaded */ @@ -123,7 +122,6 @@ static int read_dsp(struct echoaudio *chip, u32 *data) return 0; } udelay(1); - cond_resched(); } chip->bad_board = true; /* Set true until DSP re-loaded */ diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 89210b2c7342..4948ae411a94 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c @@ -501,7 +501,6 @@ static unsigned int snd_es1371_wait_src_ready(struct ensoniq * ensoniq) r = inl(ES_REG(ensoniq, 1371_SMPRATE)); if ((r & ES_1371_SRC_RAM_BUSY) == 0) return r; - cond_resched(); } dev_err(ensoniq->card->dev, "wait src ready timeout 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_SMPRATE), r); diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 4bc0f53c223b..1598880cfeea 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -612,7 +612,7 @@ static int snd_es1968_ac97_wait(struct es1968 *chip) while (timeout-- > 0) { if (!(inb(chip->io_port + ESM_AC97_INDEX) & 1)) return 0; - cond_resched(); + cond_resched_stall(); } dev_dbg(chip->card->dev, "ac97 timeout\n"); return 1; /* timeout */ diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index 1aa30e90b86a..3c18b5543512 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c @@ -166,7 +166,6 @@ static int rirb_get_response(struct lola *chip, unsigned int *val, if (time_after(jiffies, timeout)) break; udelay(20); - cond_resched(); } dev_warn(chip->card->dev, "RIRB response error\n"); if (!chip->polling_mode) { diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c index 689c0f995a9c..1906cb861002 100644 --- a/sound/pci/mixart/mixart_hwdep.c +++ b/sound/pci/mixart/mixart_hwdep.c @@ -41,7 +41,7 @@ static int mixart_wait_nice_for_register_value(struct mixart_mgr *mgr, do { /* we may take too long time in this loop. * so give controls back to kernel if needed. */ - cond_resched(); + cond_resched_stall(); read = readl_be( MIXART_MEM( mgr, offset )); if(is_egal) { diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c index 23f253effb4f..221eb6570c5e 100644 --- a/sound/pci/pcxhr/pcxhr_core.c +++ b/sound/pci/pcxhr/pcxhr_core.c @@ -304,8 +304,6 @@ int pcxhr_load_xilinx_binary(struct pcxhr_mgr *mgr, PCXHR_OUTPL(mgr, PCXHR_PLX_CHIPSC, chipsc); mask >>= 1; } - /* don't take too much time in this loop... */ - cond_resched(); } chipsc &= ~(PCXHR_CHIPSC_DATA_CLK | PCXHR_CHIPSC_DATA_IN); PCXHR_OUTPL(mgr, PCXHR_PLX_CHIPSC, chipsc); @@ -356,9 +354,6 @@ static int pcxhr_download_dsp(struct pcxhr_mgr *mgr, const struct firmware *dsp) PCXHR_OUTPB(mgr, PCXHR_DSP_TXH, data[0]); PCXHR_OUTPB(mgr, PCXHR_DSP_TXM, data[1]); PCXHR_OUTPB(mgr, PCXHR_DSP_TXL, data[2]); - - /* don't take too much time in this loop... */ - cond_resched(); } /* give some time to boot the DSP */ msleep(PCXHR_WAIT_DEFAULT); diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index 3e7e928b24f8..84a59566b036 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c @@ -376,8 +376,6 @@ static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *x for (i = 0; i < xilinx->size; i++, image++) { if (put_xilinx_data(chip, port, 8, *image) < 0) return -EINVAL; - /* don't take too much time in this loop... */ - cond_resched(); } put_xilinx_data(chip, port, 4, 0xff); /* end signature */ diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index ab95fb34a635..e734d2f5f711 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -1020,7 +1020,6 @@ static void wait_clear_underrun_bit(struct snd_intelhad *intelhaddata) if (!(val & AUD_HDMI_STATUS_MASK_UNDERRUN)) return; udelay(100); - cond_resched(); had_write_register(intelhaddata, AUD_HDMI_STATUS, val); } dev_err(intelhaddata->dev, "Unable to clear UNDERRUN bits\n"); From patchwork Tue Nov 7 23:08:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449448 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E54C3C4167D for ; Tue, 7 Nov 2023 23:10:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D92ED4401B4; Tue, 7 Nov 2023 18:10:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D1A514401B2; Tue, 7 Nov 2023 18:10:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A32894401B4; Tue, 7 Nov 2023 18:10:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8A00A4401B2 for ; Tue, 7 Nov 2023 18:10:17 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5A03BA0B70 for ; Tue, 7 Nov 2023 23:10:17 +0000 (UTC) X-FDA: 81432703674.30.292BD58 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf11.hostedemail.com (Postfix) with ESMTP id 16C7340014 for ; Tue, 7 Nov 2023 23:10:13 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=WLPw6oTo; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rioEJkhr; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398614; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=T7AofHyoW9OieGwkjaBnQeFwRFnyjYF+C4gjUWOGxKI=; b=CjrZZUOnXG5soDI0wAJhJ7WPOiFBueCi6/spMZtrYFiHLr0+dgsDoDYTfHlA/JzApriN2H XRSNjOS+FlZcn72xkDI2cLsSlYftOenCC+cnIWq24dAFfjuthC7FxNRjLbAMnJY6M1wMA0 IQvYqSxRm+K4LqWDJe3Gu21ym5c2fYE= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=WLPw6oTo; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=rioEJkhr; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398614; a=rsa-sha256; cv=pass; b=x//V+LW8joGeHrP+2av25Aq3rEx1A50p8JiF8w1BjuPrFjB8BZUSJRjdsg27//F2SUMHc/ GxPG7J9+5H5qDSZ71dC6HK79yDU8QpKbI554FpAXex2jeM8yxu8QCMxRWhPQ9H28yqLGrK WIeW7P8wmGNkuhe2SI+a8BP0CYNjnus= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJl4Q004882; Tue, 7 Nov 2023 23:09:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=T7AofHyoW9OieGwkjaBnQeFwRFnyjYF+C4gjUWOGxKI=; b=WLPw6oTov2cZzVooRPEFkqXV5w5nH7A8SNuaw8GyCdihTZZaI//byVDqaNrdV9Fv5gU1 0lPmk0BhX8qGNvECaG70jQqMby+WxqvDcC6LNuRLpapmg2gcmxFd1YVVH26AmgdhNc49 mCI8ptMk7AGNc7Ct6DRXs/0+9no9RYiUP1RJw0XmNUAWXvwOwpwgenZvb6NKbg4CFROm UElWMMNKQWRhw8MAQk1kxK1SQEgeMn/kzGItyxOg+EABr9KczCrkl8hqL7METrnfmaeu 6hbS75Aq+HXy118AfU3sahID6+VNyiYdToilTBmt2LHvWAWqUPgAFfZNL9ajiOwmk8el cA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6c1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:51 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N3k1D000664; Tue, 7 Nov 2023 23:09:50 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1wve2k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XUL1OXJDUOHV0UDXGC2XiHHJho2Yjm5QLOh+VZZFraool2BKYJVUZXYVQ+qWD2dU/UbobLFzPoP3pKcJF+QyCqVEZ3Fu/Q/dzClHX5UdpHBzcJX6PyIRQOPrVPpntLEMtYMo74VxCev+WGs8Os/5Em5VtUPkZQwkuwNQITYx6C3Yd/Ir7TDqEXhWXR7oyvANilbSCNCPC0sLJhz3qt+qZEG/jHvZeh6HZTQsGJ8W70+UKgaBFkUtcUyEKcuLGvRgMx9QpiGChsF2z8YkrI3+5P33NHqKbdObQKOC3wMd8JzQOTpEIQigEqt+9K7LKFqM0TrQ3duWs9+c4qL0gfIM4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=T7AofHyoW9OieGwkjaBnQeFwRFnyjYF+C4gjUWOGxKI=; b=O9T0HKuedHr4zS8lRrDg39T3Jm8w++rhqSkXr8IC3qJeaF9jyomk9raiiEF2H+zdk+X4sL/TmtsmxJYv0X1dQbnLweaz4KCb738Dvl2432KW0iM5W4BHIOak76XBGU25jfBQUTz22AFiJpKEv8wWGFNYDABQs4L6ECoEVxTTblsUchNyH71LpZ7/bNuQyS9nhZd8qk2jQHqzKol37/eZa9xGVgL/n5kjgLrsX18+0S3dqf7DtvTVLGEJC5LQH68hwJEmAbmNW70w3r7W2F9hqgpmK2roxtcgJeXixvz+EdMYkoj0Rx026Jp3BsP87cQiYiKZM+wjLHUIpfbazcGGhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T7AofHyoW9OieGwkjaBnQeFwRFnyjYF+C4gjUWOGxKI=; b=rioEJkhr4Xn9Zn6tyhNVL7q0HU/mVxmreytdzIdIDuTXNwHItsndBs6eee6kZaNPOSBj7rNN/q09N4CBfWh28gKiRXKdJSQFgsaQdE1Ha1BwniZad50F3ZDJSwPCiwAWBrDiU6Pb+8WlGtNH5yrNiyTOmYAT/xE3Ab8o7Tueg4U= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:47 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:47 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Coly Li , Kent Overstreet , Alasdair Kergon , Mike Snitzer Subject: [RFC PATCH 81/86] treewide: md: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:17 -0800 Message-Id: <20231107230822.371443-25-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0350.namprd03.prod.outlook.com (2603:10b6:303:dc::25) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b566b49-4f0f-46e4-0b76-08dbdfe6a305 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2sCaoZroLzPRjkR1IwkyKsJzphCb8TsDSx0NCmD8DER1G80QTbamdYBOxgDMOPhZUrmRcnRQpSTpl0PRaOqqHvcO+q1eiJGalxO8R4qG6m+mDJpQBnwLZHwhdkW9rno8gDO/Ayk1xQ5ocqpB3awMIkWIP2eR6UStN/VNbklwGZ1qNM9+O9QLIC0wBQJpiwg3rU+2Ehi1MjRY9GQXrYKWErF/D9SWqzrQqo7gYZJoz+2gdBJIR6HQ3iQFHvqsFIDkUovTgiPmgevvIprHiahJ68om/WEkBJU+8Qh3DVf7XW2JNHN6FsuDIz/TFR7LiB1eaHEVMBn3tWIPAHbAaw1fHnW/w7Xng3ng0sTQBYtKypDHxpfCafPoj9oimQqpHdxV/6E7DKK1Q47cVc/i74My0ZLddsNonGMCiIA9iNsbJqkDj8GuYka8D3ZkHh9GuQVGf6UL8o5HcQGtcQTbWep6Vx3ycvEOwuKtH1uj97Ks91IjMaSiE2Plp0fONOWWtnLcR/LlrQ+uv2G7fMlamzKKTis158jvpeARDh4L0mqt3ojKpXwashHBYY1PzkwEBB1V8Engi3jmepPKOhWlY+uY69vMN+vpsQ1GVT6BezjMhvZ2dUTosmk5TFZIJITv5GAO X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002)(473944003)(414714003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rbxvBp/ngSI1LK3DHJGvmW5T2gNsOSjJXWA8CtaYxPm0t10xJ63XwR3X9nxo0H+aanUQuD8r/xHBaVeHG1giFj4qHFXe4mI7x946UtMN4oCH0gDenixQpVk2TTtFh+YS7DN2uEY1Aa1nEVEvd54Z3ot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ZFuaCknBQ6W0/5rVLtKlXOT1JQoDVoOqe5ZwDodLqt0hJkRh78eGvNS9CmgBxX4FI0smKJcNKd7QzXbEpdlSk3py7YWKu7lTJbSEdqnimglk/zmZglAakKUGsqykKSteOzLPCRBQi5/d4o3kpROQNxWu1L+K4eSyf5OK64U8w2ODhtAiGY803Slob9zry23A07So9jQeRpbp0G5gr/prbAD3x7Fw8M3KopAR+uyXeZyytIsCTsosU57zi+eKIP7FT+x8tq80QNmKBFAB+UlF7hzXfrG+r8RJHyLcd0IEzFzfwp9QcMYW8kXOYrfsKbimPz8ad2REXzLrRvSkoqcaZZP0xq18kxAntWCgtYqdYUUTOj3F/FNkTqhCUkqAUWouokgwRQceeMzR5rNLe8qdeIugEV5Eft3avcDW+4+bmB8sjWuesPk6SF95f5eZ3Qym1pri8L3SaoTNcvenXIgLdyVOhLnjvufZmNsrNKHzLQaswlBJ/N1yvkuQXt0puAsFqx2MFMUjukt3VJzQJpkP4s/eAu3E462HX6UQwd7prU6ucEQqgpLs8nsZHgQAF44kqI15NHIVO34rsoIomjLEz6cDVQ+kwG5xdAYaOvB72WQUV/dGl6YOokOsMBCY0Nxd9l7gmVGzIG37lQqYTmiWUb88YyR34qpZ10j5IPfAHo0o7h5vMdDlq9buemfO9gsfB8WWj+YEGFvEfzhtcUQlyfI0PRkw4IoAANVZM0lido/CeiabCQG+wXAcKh8D05hdPjIpenUn+DmO6YXDBcADBIuUQEHctlOkUKjtbyE2SF0n2C6jDyfaD4PzBd/bwCVS3ExbU/uARVIliJQlAmAelivzBVAYih+uCzZbGXo5AbDt8OjngutkjVLmrT5wMJgDJlkEEPXVVz2Td2sKePdOMUtXtAaZEyzAUQUJsqI4oJvHFl5Rj8w== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b566b49-4f0f-46e4-0b76-08dbdfe6a305 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:47.6108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: W7f/4LiKkP6+6Xx6N7vWrPSr6lNUPL6omYQG+0KBDAtTHx9WGXNuUnHPPcpCUrylj/ArddG9JgCIubvQiTnzDor5UoPZD8UymIBze/t2au4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: YEtXCCsHJMIbhjkyBfA4u7vrCk7b880N X-Proofpoint-GUID: YEtXCCsHJMIbhjkyBfA4u7vrCk7b880N X-Rspamd-Queue-Id: 16C7340014 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: ur8kthtbkrdhufonmst3kgumpq5itni7 X-HE-Tag: 1699398613-944989 X-HE-Meta: U2FsdGVkX19xAt20t20X7o9yfbcnM0Lvl/brPIjbHwUDTM6EQhP4tWtsMxyO1gL7JrbFofhI8ZZsLAO4NvHpoiwSu/xdpTSPv/5RDOBwzPJ4HfsDuWDbomYYYW6UrvcF/e/82iQPl4VexVlY2RoxWIPxOJFFEi5iNBeHuh5eYMV815XU3ptETRdV58TDenAsRQdZBxOsY78flTB3PJvdReCYHlNPETWSJBo2zYKU44yraIU/UNaJuWzXbZPqJpS2LHqAEhy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YaGfdFk2Y6puQK16aEhbYsmbybwiIYqUlWod7WifE+aT8d6peX04lhOmvG/ZjEEqhTtt5di5sxFi5jPYJRiwV5b6KBriznrW54u2KwbyozhLMsZ8OjOCVBZxoqbkOoTK2ClGYfGu79NEAiBZmA9xNWZNyIbWJ10D03FHRYGrq+w/re2hflpgupjoN/sh1oMT7simd1jYwBJXe29eTxub2v0IVyOgiMn5rcS2k7Ee0LZsJGO8+z1xRiDhEFryyD3/uwHYh4SCNZsgkHC5e2cC2revIOQxyVo0zN37ilW6jR/9ttTI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the uses here are in set-1. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Coly Li Cc: Kent Overstreet Cc: Alasdair Kergon Cc: Mike Snitzer Signed-off-by: Ankur Arora --- drivers/md/bcache/btree.c | 5 ----- drivers/md/bcache/journal.c | 2 -- drivers/md/bcache/sysfs.c | 1 - drivers/md/bcache/writeback.c | 2 -- drivers/md/dm-bufio.c | 14 -------------- drivers/md/dm-cache-target.c | 4 ---- drivers/md/dm-crypt.c | 3 --- drivers/md/dm-integrity.c | 3 --- drivers/md/dm-kcopyd.c | 2 -- drivers/md/dm-snap.c | 1 - drivers/md/dm-stats.c | 8 -------- drivers/md/dm-thin.c | 2 -- drivers/md/dm-writecache.c | 11 ----------- drivers/md/dm.c | 4 ---- drivers/md/md.c | 1 - drivers/md/raid1.c | 2 -- drivers/md/raid10.c | 3 --- drivers/md/raid5.c | 2 -- 18 files changed, 70 deletions(-) diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index fd121a61f17c..b9389d3c39d7 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -1826,7 +1826,6 @@ static void bch_btree_gc(struct cache_set *c) do { ret = bcache_btree_root(gc_root, c, &op, &writes, &stats); closure_sync(&writes); - cond_resched(); if (ret == -EAGAIN) schedule_timeout_interruptible(msecs_to_jiffies @@ -1981,7 +1980,6 @@ static int bch_btree_check_thread(void *arg) goto out; } skip_nr--; - cond_resched(); } if (p) { @@ -2005,7 +2003,6 @@ static int bch_btree_check_thread(void *arg) } p = NULL; prev_idx = cur_idx; - cond_resched(); } out: @@ -2670,8 +2667,6 @@ void bch_refill_keybuf(struct cache_set *c, struct keybuf *buf, struct bkey start = buf->last_scanned; struct refill refill; - cond_resched(); - bch_btree_op_init(&refill.op, -1); refill.nr_found = 0; refill.buf = buf; diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index c182c21de2e8..5e06a665d082 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -384,8 +384,6 @@ int bch_journal_replay(struct cache_set *s, struct list_head *list) BUG_ON(!bch_keylist_empty(&keylist)); keys++; - - cond_resched(); } if (i->pin) diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index 0e2c1880f60b..d7e248b54abd 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -1030,7 +1030,6 @@ KTYPE(bch_cache_set_internal); static int __bch_cache_cmp(const void *l, const void *r) { - cond_resched(); return *((uint16_t *)r) - *((uint16_t *)l); } diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index 24c049067f61..7da09bba3067 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -863,8 +863,6 @@ static int sectors_dirty_init_fn(struct btree_op *_op, struct btree *b, KEY_START(k), KEY_SIZE(k)); op->count++; - if (!(op->count % INIT_KEYS_EACH_TIME)) - cond_resched(); return MAP_CONTINUE; } diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index bc309e41d074..0b8f3341fa79 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -294,8 +294,6 @@ static struct lru_entry *lru_evict(struct lru *lru, le_predicate pred, void *con } h = h->next; - - cond_resched(); } return NULL; @@ -762,7 +760,6 @@ static void __cache_iterate(struct dm_buffer_cache *bc, int list_mode, case IT_COMPLETE: return; } - cond_resched(); le = to_le(le->list.next); } while (le != first); @@ -890,8 +887,6 @@ static void __remove_range(struct dm_buffer_cache *bc, struct dm_buffer *b; while (true) { - cond_resched(); - b = __find_next(root, begin); if (!b || (b->block >= end)) break; @@ -1435,7 +1430,6 @@ static void __flush_write_list(struct list_head *write_list) list_entry(write_list->next, struct dm_buffer, write_list); list_del(&b->write_list); submit_io(b, REQ_OP_WRITE, write_endio); - cond_resched(); } blk_finish_plug(&plug); } @@ -1953,8 +1947,6 @@ void dm_bufio_prefetch(struct dm_bufio_client *c, submit_io(b, REQ_OP_READ, read_endio); dm_bufio_release(b); - cond_resched(); - if (!n_blocks) goto flush_plug; dm_bufio_lock(c); @@ -2093,8 +2085,6 @@ int dm_bufio_write_dirty_buffers(struct dm_bufio_client *c) cache_mark(&c->cache, b, LIST_CLEAN); cache_put_and_wake(c, b); - - cond_resched(); } lru_iter_end(&it); @@ -2350,7 +2340,6 @@ static void __scan(struct dm_bufio_client *c) atomic_long_dec(&c->need_shrink); freed++; - cond_resched(); } } } @@ -2659,8 +2648,6 @@ static unsigned long __evict_many(struct dm_bufio_client *c, __make_buffer_clean(b); __free_buffer_wake(b); - - cond_resched(); } return count; @@ -2802,7 +2789,6 @@ static void evict_old(void) while (dm_bufio_current_allocated > threshold) { if (!__evict_a_few(64)) break; - cond_resched(); } mutex_unlock(&dm_bufio_clients_lock); } diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index 911f73f7ebba..df136b29471a 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c @@ -1829,7 +1829,6 @@ static void process_deferred_bios(struct work_struct *ws) else commit_needed = process_bio(cache, bio) || commit_needed; - cond_resched(); } if (commit_needed) @@ -1853,7 +1852,6 @@ static void requeue_deferred_bios(struct cache *cache) while ((bio = bio_list_pop(&bios))) { bio->bi_status = BLK_STS_DM_REQUEUE; bio_endio(bio); - cond_resched(); } } @@ -1894,8 +1892,6 @@ static void check_migrations(struct work_struct *ws) r = mg_start(cache, op, NULL); if (r) break; - - cond_resched(); } } diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 5315fd261c23..70a24ade34af 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1629,8 +1629,6 @@ static blk_status_t crypt_convert(struct crypt_config *cc, atomic_dec(&ctx->cc_pending); ctx->cc_sector += sector_step; tag_offset++; - if (!atomic) - cond_resched(); continue; /* * There was a data integrity error. @@ -1965,7 +1963,6 @@ static int dmcrypt_write(void *data) io = crypt_io_from_node(rb_first(&write_tree)); rb_erase(&io->rb_node, &write_tree); kcryptd_io_write(io); - cond_resched(); } while (!RB_EMPTY_ROOT(&write_tree)); blk_finish_plug(&plug); } diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 97a8d5fc9ebb..63c88f23b585 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -2717,12 +2717,10 @@ static void integrity_recalc(struct work_struct *w) ic->sectors_per_block, BITMAP_OP_TEST_ALL_CLEAR)) { logical_sector += ic->sectors_per_block; n_sectors -= ic->sectors_per_block; - cond_resched(); } while (block_bitmap_op(ic, ic->recalc_bitmap, logical_sector + n_sectors - ic->sectors_per_block, ic->sectors_per_block, BITMAP_OP_TEST_ALL_CLEAR)) { n_sectors -= ic->sectors_per_block; - cond_resched(); } get_area_and_offset(ic, logical_sector, &area, &offset); } @@ -2782,7 +2780,6 @@ static void integrity_recalc(struct work_struct *w) } advance_and_next: - cond_resched(); spin_lock_irq(&ic->endio_wait.lock); remove_range_unlocked(ic, &range); diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c index d01807c50f20..8a91e83188e7 100644 --- a/drivers/md/dm-kcopyd.c +++ b/drivers/md/dm-kcopyd.c @@ -512,8 +512,6 @@ static int run_complete_job(struct kcopyd_job *job) if (atomic_dec_and_test(&kc->nr_jobs)) wake_up(&kc->destroyq); - cond_resched(); - return 0; } diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index bf7a574499a3..cd8891c12cca 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -1762,7 +1762,6 @@ static void copy_callback(int read_err, unsigned long write_err, void *context) s->exception_complete_sequence++; rb_erase(&pe->out_of_order_node, &s->out_of_order_tree); complete_exception(pe); - cond_resched(); } } else { struct rb_node *parent = NULL; diff --git a/drivers/md/dm-stats.c b/drivers/md/dm-stats.c index db2d997a6c18..d6878cb7b0ef 100644 --- a/drivers/md/dm-stats.c +++ b/drivers/md/dm-stats.c @@ -230,7 +230,6 @@ void dm_stats_cleanup(struct dm_stats *stats) atomic_read(&shared->in_flight[READ]), atomic_read(&shared->in_flight[WRITE])); } - cond_resched(); } dm_stat_free(&s->rcu_head); } @@ -336,7 +335,6 @@ static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end, for (ni = 0; ni < n_entries; ni++) { atomic_set(&s->stat_shared[ni].in_flight[READ], 0); atomic_set(&s->stat_shared[ni].in_flight[WRITE], 0); - cond_resched(); } if (s->n_histogram_entries) { @@ -350,7 +348,6 @@ static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end, for (ni = 0; ni < n_entries; ni++) { s->stat_shared[ni].tmp.histogram = hi; hi += s->n_histogram_entries + 1; - cond_resched(); } } @@ -372,7 +369,6 @@ static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end, for (ni = 0; ni < n_entries; ni++) { p[ni].histogram = hi; hi += s->n_histogram_entries + 1; - cond_resched(); } } } @@ -512,7 +508,6 @@ static int dm_stats_list(struct dm_stats *stats, const char *program, } DMEMIT("\n"); } - cond_resched(); } mutex_unlock(&stats->mutex); @@ -794,7 +789,6 @@ static void __dm_stat_clear(struct dm_stat *s, size_t idx_start, size_t idx_end, local_irq_enable(); } } - cond_resched(); } } @@ -910,8 +904,6 @@ static int dm_stats_print(struct dm_stats *stats, int id, if (unlikely(sz + 1 >= maxlen)) goto buffer_overflow; - - cond_resched(); } if (clear) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 07c7f9795b10..52e4a7dc6923 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2234,7 +2234,6 @@ static void process_thin_deferred_bios(struct thin_c *tc) throttle_work_update(&pool->throttle); dm_pool_issue_prefetches(pool->pmd); } - cond_resched(); } blk_finish_plug(&plug); } @@ -2317,7 +2316,6 @@ static void process_thin_deferred_cells(struct thin_c *tc) else pool->process_cell(tc, cell); } - cond_resched(); } while (!list_empty(&cells)); } diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 074cb785eafc..75ecc26915a1 100644 --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -321,8 +321,6 @@ static int persistent_memory_claim(struct dm_writecache *wc) while (daa-- && i < p) { pages[i++] = pfn_t_to_page(pfn); pfn.val++; - if (!(i & 15)) - cond_resched(); } } while (i < p); wc->memory_map = vmap(pages, p, VM_MAP, PAGE_KERNEL); @@ -819,7 +817,6 @@ static void writecache_flush(struct dm_writecache *wc) if (writecache_entry_is_committed(wc, e2)) break; e = e2; - cond_resched(); } writecache_commit_flushed(wc, true); @@ -848,7 +845,6 @@ static void writecache_flush(struct dm_writecache *wc) if (unlikely(e->lru.prev == &wc->lru)) break; e = container_of(e->lru.prev, struct wc_entry, lru); - cond_resched(); } if (need_flush_after_free) @@ -970,7 +966,6 @@ static int writecache_alloc_entries(struct dm_writecache *wc) e->index = b; e->write_in_progress = false; - cond_resched(); } return 0; @@ -1058,7 +1053,6 @@ static void writecache_resume(struct dm_target *ti) e->original_sector = le64_to_cpu(wme.original_sector); e->seq_count = le64_to_cpu(wme.seq_count); } - cond_resched(); } #endif for (b = 0; b < wc->n_blocks; b++) { @@ -1093,7 +1087,6 @@ static void writecache_resume(struct dm_target *ti) } } } - cond_resched(); } if (need_flush) { @@ -1824,7 +1817,6 @@ static void __writeback_throttle(struct dm_writecache *wc, struct writeback_list wc_unlock(wc); } } - cond_resched(); } static void __writecache_writeback_pmem(struct dm_writecache *wc, struct writeback_list *wbl) @@ -2024,7 +2016,6 @@ static void writecache_writeback(struct work_struct *work) read_original_sector(wc, e))) { BUG_ON(!f->write_in_progress); list_move(&e->lru, &skipped); - cond_resched(); continue; } } @@ -2079,7 +2070,6 @@ static void writecache_writeback(struct work_struct *work) break; } } - cond_resched(); } if (!list_empty(&skipped)) { @@ -2168,7 +2158,6 @@ static int init_memory(struct dm_writecache *wc) for (b = 0; b < wc->n_blocks; b++) { write_original_sector_seq_count(wc, &wc->entries[b], -1, -1); - cond_resched(); } writecache_flush_all_metadata(wc); diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 64a1f306c96c..ac0aff4de190 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -996,7 +996,6 @@ static void dm_wq_requeue_work(struct work_struct *work) io->next = NULL; __dm_io_complete(io, false); io = next; - cond_resched(); } } @@ -1379,12 +1378,10 @@ static noinline void __set_swap_bios_limit(struct mapped_device *md, int latch) { mutex_lock(&md->swap_bios_lock); while (latch < md->swap_bios) { - cond_resched(); down(&md->swap_bios_semaphore); md->swap_bios--; } while (latch > md->swap_bios) { - cond_resched(); up(&md->swap_bios_semaphore); md->swap_bios++; } @@ -2583,7 +2580,6 @@ static void dm_wq_work(struct work_struct *work) break; submit_bio_noacct(bio); - cond_resched(); } } diff --git a/drivers/md/md.c b/drivers/md/md.c index a104a025084d..88e8148be28f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9048,7 +9048,6 @@ void md_do_sync(struct md_thread *thread) * about not overloading the IO subsystem. (things like an * e2fsck being done on the RAID array should execute fast) */ - cond_resched(); recovery_done = io_sectors - atomic_read(&mddev->recovery_active); currspeed = ((unsigned long)(recovery_done - mddev->resync_mark_cnt))/2 diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 2aabac773fe7..71bd8d8d1d1c 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -807,7 +807,6 @@ static void flush_bio_list(struct r1conf *conf, struct bio *bio) raid1_submit_write(bio); bio = next; - cond_resched(); } } @@ -2613,7 +2612,6 @@ static void raid1d(struct md_thread *thread) else WARN_ON_ONCE(1); - cond_resched(); if (mddev->sb_flags & ~(1<sb_flags & ~(1<device_lock); for (i = 0; i < batch_size; i++) { hash = batch[i]->hash_lock_index; From patchwork Tue Nov 7 23:08:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449450 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F931C4167B for ; Tue, 7 Nov 2023 23:10:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BBFE84401B6; Tue, 7 Nov 2023 18:10:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B468D4401B2; Tue, 7 Nov 2023 18:10:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 884724401B6; Tue, 7 Nov 2023 18:10:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 693F04401B2 for ; Tue, 7 Nov 2023 18:10:24 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3D739C0BA8 for ; Tue, 7 Nov 2023 23:10:24 +0000 (UTC) X-FDA: 81432703968.06.F563CA8 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf11.hostedemail.com (Postfix) with ESMTP id DA6C440005 for ; Tue, 7 Nov 2023 23:10:20 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=VR6zPQvw; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ihaGfDJq; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398620; a=rsa-sha256; cv=pass; b=UQ7c57yu1VhGPVRL6F+8+cq8jrDbSEjfEFRyFgPy4z+e+PihWywC064Xy6O/qa9tUOMxRJ ifVgFSJwYKQstCck1XIocLz/e41WF4OKMX5ciSpazqjMiQbZ/EVa4UwdXARKS62/Rb7uTj VizYFY7wN9zv2OuhQCQz4JIUDjJfR4o= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=VR6zPQvw; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ihaGfDJq; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398620; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=l0oi6U6XTqi6xUPiF/Vm9OcTQYEcBRyzZ+85IJdGD1g=; b=ScOAzYzyWGSd5NhsJ724c3jPM5GRHDq+nRncOQ74576XewVEVqbmXcrvj1syBbv6L9auEP AHACwvKJynZcoNrwsEN3xFhn0z6pdcv50kMRYTfh7/GtbcKlpYwAqSQ6lZhOBe3MK3y2lA dBlcRSvCEyzxO8sUPgaFZOsmkVAduHY= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LKAuk020974; Tue, 7 Nov 2023 23:09:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=l0oi6U6XTqi6xUPiF/Vm9OcTQYEcBRyzZ+85IJdGD1g=; b=VR6zPQvwIB3atsVE32l07vELNjlh7gG6oicrEi8PbH/A/zXpsThzAJ9AsjfV3ktiH5c5 S1nMSlrt9MiFGmJyGTxsTuHDp1lnkALddSYR+hvJASDB2aYH0Zj08oryoK/GhOWuCu9O 0rTypyt16iIScZCV/PABzoiGuBMtnoxv9/Wi+32UAy8ZmwaF5/QXw1tdMVdas6s0TbHa 84Fm59+3b/1XZJfcCDzCtb6MOX7i0W7qjrqhKtvMFqJXjJcQdbGl2PJmVq12NU49s3Co rRvGr/4qk2Pbc3YNuZbmio3n5OO0YW2lljr+GtNyTDVkNqhrJ6YX2H7Zr5QYFgMGagek 1Q== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w2207b9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:55 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2MwB003811; Tue, 7 Nov 2023 23:09:54 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vvcgg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VDBZrMND44D6Fm99c+fw/330ICNfOFMfr1Rhp3oldIQAnBQMt9IrVio6jKbJ2zTpLe71QD4tE36YYJtIHTCt1WS4K5L3slWyibS2tenGV65S7mOhpBFEqHzI7sxCZ5cagoTMEsNc7YwZoh6o1po5p+1GjaOG/FOCcR4/hXVWlDADIwXjQKOjoIRGkb9fXsKmSv6NN3R+18U5ZCKWKWY/doqxIruhGmgS0xRW1MuR4UT9M+tdx/CnWrBW4282ffJ8/y+IZjJnNHpuXWpiRcyEIP6kVfdBxRAADtwzCMqYjQIdxcyaVizvsqIkdivzaBGUXmiaGuCv0l+bejj8ifjPMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=l0oi6U6XTqi6xUPiF/Vm9OcTQYEcBRyzZ+85IJdGD1g=; b=F7CFE2QSxc55HT6ZvE0ULg43KdfmkG/pM95TSKw+A2MXkoF7eXP8FA9pjyaemlTYHBG6kgmS32xlaEwwCrdxyuh3uRTwYu3OZI9WmpsYTNkz0YsohmObQjyBXlHnnog0JQ0XDqJG//TIOvkMn/MnwirWzB/s5Br8kY3BfYyXJf0fbEU2/nS+jrDVcGBl5iKHIdg82aA5+y8zrFUJCvwICfzhBjDKuZyBtzkgN6GWDEmOH/LklZqZ787MTE3ZcMkiMtEmFw62rkaBf31zlaO8t6g/KVH1DVroDrAiHIBhAyQcsGRD1PVf+bH5Bl8JHYRPYvYM/9tRK+eNEN6c9dFWwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l0oi6U6XTqi6xUPiF/Vm9OcTQYEcBRyzZ+85IJdGD1g=; b=ihaGfDJq2N+Pm+/v9+SpbEsemIe/gKAIY7ZWeu2jRtmjaCXe/H53rzNN4Zv1gBaPkGnH96JMdP15+esZPjq5Z7LdkMSDfWLL+ARH7FGcQMoX2Phnf8kOuctNgQBU3JuXFhE2UrqyLun0AzvSWamFd10TPWNDS7+EzlJqSX3cHio= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:50 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:50 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Miquel Raynal , Vignesh Raghavendra , Kyungmin Park , Tudor Ambarus , Pratyush Yadav Subject: [RFC PATCH 82/86] treewide: mtd: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:18 -0800 Message-Id: <20231107230822.371443-26-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0046.namprd04.prod.outlook.com (2603:10b6:303:6a::21) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: bb59d173-d6a6-444c-d2dd-08dbdfe6a490 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y2ys7eH2V0e2+cm5P/g3qeA72iXFdOYfiqQNRw6VLL1Urmz8pkbjItAc7am02jEO1aYELjBxR7zkqh5GDRygttbhWjP3WjRhUUmy9ZKoK7IF5XU1YKtaidwu4uZhLiIlAC9SYxa3jLCl7o/6EExOe412cyYuUtzpWh+PpdKVCAS9UA9SNQrmXHtFqI26uIt+bm+I/LMJl0847y/uE2B8Xr3Q39kWxIWteCwdG70tiNvNI/Sc6PVFPRc82TZdSfNK29/kx6qVyRYKU03QWMe7XJl4HCxGaNfWPCJ6MS6mFfbksCzW/AurQIsK4q0DXq9JHjNQvuyyIABURGcE89ygn4bIaGJDV8tP7sSlWluRftZk4IPp5Pj0MYQc1QARucciH2RRNlt3+YaI9Eg6UZj4mucY7pHilro7CwTa/45fnASYcek4aOhSfdXXHq8wJQUoEe90Jkhnd59EQLIfFfazQoax3BDtqerbq9qlEKfdl0Py7rHAmAEd1p/+zRyekd0K2FbYLvz0CPSRnxwmSxt3Q+VTklnGjUifpLspc+SVNTkmdfKoq02qk24wkDvlHWpR8Fl+lSnujaxTCl9yKPl6JNTiLPpuSk2pcow1wp6AX1GxLpYyVkG6xaejmyzyX+OC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230273577357003)(230922051799003)(230173577357003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mkkqFPwc2n+raKKdEIfY1OP4r9YLO3eJx1I525mdqiNrHqezX+zLajDuStuIpNwYGVuzpD4wS2fnPWtEAPcuIopvSjLkAGt4Jh2PuYE9fMZQs7ggqWExi7TK8STqV+v8vUJ91oNBZFxm1+NSfKpbjUH2XABKRNABRcyjkq9Lphv1wIU74I5nti/bS0Fft2vm1t1IPMOT4J932htMxSdMZyr4wukDe5o/DOWU7HVyt74OlJxNPcis5lUDNf6wDmHZNwYfypog+FRLI32OM2qaYMlBOLc/4I0WbYUtVqMe7Ab+by8QvbVUwko83iSX/ZBNfPprCFe5rQRuILqIzTTtsoXM3AuOuzPsl8vph/nkY0dXLuZQOxGimtTASUZsCqxijkFNkHuOtyJBZ96v6BfsYT8sKnXxLmQg3rfjK5+odEl1zETS2MyiP4gzyt+Y3zXURDF8cLj9VgtvIaCFNH9HwPbb+Ze5JIqFmOESFZmu6IOLD/qPrrbyL66mb5ALdEUBAMjV6h1gW7NVjSp5AbbF+cwpuNJFSaWchmlumE6+c3fHirS7xPgvekfqLehzX3seTb7fiko4Gvo9Z7eK7khWa78Fhvi3KbZpcLCA7UscUnb/pjHgtv78VaXFg/s/nrPk8rQT+lOuJ0RrlxTj7dyXR+KdBqAIESWDY2EUaWz3Of5q9KhUGmkP3gnmVqI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ZSQPAtRER0NQJlXhahtPZlPPxyLIuZzcL4IvgNn72orSWQcPqjafQYdAZUoS8LwIVyq6gOosQnIrSFPp3HjJvbaG7/umZ728s/tSNUP2fbdpvqZloUZLtrEFpv0z/KIlQe7cu9hGnTbzaiUkml9vk7q23wk7RMy5I65vcnhGiGTn0o2urYo0gK1b15D13O6pInbHfFK8/iW05jT4s6i5gxTtvhutGDbGKUYK1hHUoEx+4ahyb+X5SrQojPQMOhrchA1D+Pb0RxyXWk+G9MVIn0a1MF0IgQjEX9nAD0OJNINM2EtNc/8DZNUbyddGHLi1bkg7ES/2J6BWcteKwJakSfxyycGClKJxQzb8+Ms/DKPDtS5VxVnUsfvbCEtuUr/4PBB2HTNVWyKKWU3fPV5soGKtJI3lOP2AeO5C2b3Sau159eQjPO2PZlDBhabKogDo0smEIfZpErXP9AaeFjQNqljI9LtwF7InTL8+odVzA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb59d173-d6a6-444c-d2dd-08dbdfe6a490 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:50.1934 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KQJO+2JFGzXtGTsAXSokwvzyjsezpGMHzHsatF1IiNL2BvtpyqePIePgRgDXEXU/APJgIlolY6S4ALd9Fbkebj63aK13LZyiU5/AvF9oE/o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: POEwDWfdeX3YQoqtarJb98fDmkw6lv8d X-Proofpoint-ORIG-GUID: POEwDWfdeX3YQoqtarJb98fDmkw6lv8d X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: DA6C440005 X-Stat-Signature: m183hnj1p4xgbka7quziztshu91pm5c3 X-HE-Tag: 1699398620-976495 X-HE-Meta: U2FsdGVkX1++mf31+kFtU7xRZZrhYaeh4P2KT+p5+D4eX24HTntWMymVxjtmq3rVhM+Nmx7K7h0nXYYTO9Iw13xFnMgFLAhYOHN1iNIrd8Dw+RCJLXcnmT4OuKB26iWwzwi+bQncozmid47uRh40RD3Uz1+RuSUcDnUbBtJK5YJg2WJkjck9dYOjBtLAoJ4BdC7Y7zCF5RDe7Y1OVUBJHFJSdIxwJfDc+nlA5qm91aOMCKE1IooFFmR5OSHsDniKkDNA+HxmQbpg/VZOTQWXH2cpcTHk3SUsospDTe9rfVyZ/FTHXBWIsaXcFpLpVpBTP7ZGdcBErNLkLBKriRE3Y6EFUUBEEa/mVS9TVxg63CIpFXjdFH+jcw8Mk5FT6xsEVCDW6ClyBrdNRkzl0x7AM8D07k8lFFTcjGzwuHZQoalPlX30f83jv2NFqELbAJiIi5lK6y2g25prx+gyuUyhoDuPcUBJc+C09i0QvGRKodOw+pOk8yoUEUjvchfN/mg//eBu9kjbhKCjbo48JeU5ORQ8ghfPR/sKS6iTWr6vrotTg0/EUfo57uus4iLqO5f72O39bt/gb54X2gRQOs+L6UlIE+ANM87U59N3VqnZKAnpV4kqGnGKg57h57BWivZBY0pCv7+1eMrwcjbPbKZh7bhyjh2RNtO4JKGgx/T0xTq79GJzJecY0IdOtsuof3SvUd8aVNqOyX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-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the uses here are in set-1 (some right after we give up a lock or enable bottom-halves, causing an explicit preemption check.) There are a few cases from set-3. Replace them with cond_resched_stall(). Some of those places, however, have wait-times milliseconds, so maybe we should just have an msleep() there? [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Kyungmin Park Cc: Tudor Ambarus Cc: Pratyush Yadav Signed-off-by: Ankur Arora --- drivers/mtd/chips/cfi_cmdset_0001.c | 6 ------ drivers/mtd/chips/cfi_cmdset_0002.c | 1 - drivers/mtd/chips/cfi_util.c | 2 +- drivers/mtd/devices/spear_smi.c | 2 +- drivers/mtd/devices/sst25l.c | 3 +-- drivers/mtd/devices/st_spi_fsm.c | 4 ---- drivers/mtd/inftlcore.c | 5 ----- drivers/mtd/lpddr/lpddr_cmds.c | 6 +----- drivers/mtd/mtd_blkdevs.c | 1 - drivers/mtd/nand/onenand/onenand_base.c | 18 +----------------- drivers/mtd/nand/onenand/onenand_samsung.c | 8 +++++++- drivers/mtd/nand/raw/diskonchip.c | 4 ++-- drivers/mtd/nand/raw/fsmc_nand.c | 3 +-- drivers/mtd/nand/raw/hisi504_nand.c | 2 +- drivers/mtd/nand/raw/nand_base.c | 3 +-- drivers/mtd/nand/raw/nand_legacy.c | 17 +++++++++++++++-- drivers/mtd/spi-nor/core.c | 8 +++++++- drivers/mtd/tests/mtd_test.c | 2 -- drivers/mtd/tests/mtd_test.h | 2 +- drivers/mtd/tests/pagetest.c | 1 - drivers/mtd/tests/readtest.c | 2 -- drivers/mtd/tests/torturetest.c | 1 - drivers/mtd/ubi/attach.c | 10 ---------- drivers/mtd/ubi/build.c | 2 -- drivers/mtd/ubi/cdev.c | 4 ---- drivers/mtd/ubi/eba.c | 8 -------- drivers/mtd/ubi/misc.c | 2 -- drivers/mtd/ubi/vtbl.c | 6 ------ drivers/mtd/ubi/wl.c | 13 ------------- 29 files changed, 40 insertions(+), 106 deletions(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 11b06fefaa0e..c6abed74e4df 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -1208,7 +1208,6 @@ static int __xipram xip_wait_for_operation( local_irq_enable(); mutex_unlock(&chip->mutex); xip_iprefetch(); - cond_resched(); /* * We're back. However someone else might have @@ -1337,7 +1336,6 @@ static int inval_cache_and_wait_for_operation( sleep_time = 1000000/HZ; } else { udelay(1); - cond_resched(); timeo--; } mutex_lock(&chip->mutex); @@ -1913,10 +1911,6 @@ static int cfi_intelext_writev (struct mtd_info *mtd, const struct kvec *vecs, return 0; } - /* Be nice and reschedule with the chip in a usable state for other - processes. */ - cond_resched(); - } while (len); return 0; diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index df589d9b4d70..f6d8f8ccbe3f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1105,7 +1105,6 @@ static void __xipram xip_udelay(struct map_info *map, struct flchip *chip, local_irq_enable(); mutex_unlock(&chip->mutex); xip_iprefetch(); - cond_resched(); /* * We're back. However someone else might have diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c index 140c69a67e82..c178dae31a59 100644 --- a/drivers/mtd/chips/cfi_util.c +++ b/drivers/mtd/chips/cfi_util.c @@ -28,7 +28,7 @@ void cfi_udelay(int us) msleep(DIV_ROUND_UP(us, 1000)); } else { udelay(us); - cond_resched(); + cond_resched_stall(); } } EXPORT_SYMBOL(cfi_udelay); diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 0a35e5236ae5..9b4d226633a9 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -278,7 +278,7 @@ static int spear_smi_wait_till_ready(struct spear_smi *dev, u32 bank, return 0; } - cond_resched(); + cond_resched_stall(); } while (!time_after_eq(jiffies, finish)); dev_err(&dev->pdev->dev, "smi controller is busy, timeout\n"); diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c index 8813994ce9f4..ff16147d9bdd 100644 --- a/drivers/mtd/devices/sst25l.c +++ b/drivers/mtd/devices/sst25l.c @@ -132,8 +132,7 @@ static int sst25l_wait_till_ready(struct sst25l_flash *flash) return err; if (!(status & SST25L_STATUS_BUSY)) return 0; - - cond_resched(); + cond_resched_stall(); } while (!time_after_eq(jiffies, deadline)); return -ETIMEDOUT; diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index 95530cbbb1e0..a0f5874c1941 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -738,8 +738,6 @@ static void stfsm_wait_seq(struct stfsm *fsm) if (stfsm_is_idle(fsm)) return; - - cond_resched(); } dev_err(fsm->dev, "timeout on sequence completion\n"); @@ -901,8 +899,6 @@ static uint8_t stfsm_wait_busy(struct stfsm *fsm) if (!timeout) /* Restart */ writel(seq->seq_cfg, fsm->base + SPI_FAST_SEQ_CFG); - - cond_resched(); } dev_err(fsm->dev, "timeout on wait_busy\n"); diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index 9739387cff8c..c757b8a25748 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c @@ -732,11 +732,6 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) /* Now sort out whatever was pointing to it... */ *prevEUN = BLOCK_NIL; - - /* Ideally we'd actually be responsive to new - requests while we're doing this -- if there's - free space why should others be made to wait? */ - cond_resched(); } inftl->VUtable[thisVUC] = BLOCK_NIL; diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 3c3939bc2dad..ad8992d24082 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c @@ -161,7 +161,7 @@ static int wait_for_ready(struct map_info *map, struct flchip *chip, sleep_time = 1000000/HZ; } else { udelay(1); - cond_resched(); + cond_resched_stall(); timeo--; } mutex_lock(&chip->mutex); @@ -677,10 +677,6 @@ static int lpddr_writev(struct mtd_info *mtd, const struct kvec *vecs, (*retlen) += size; len -= size; - /* Be nice and reschedule with the chip in a usable - * state for other processes */ - cond_resched(); - } while (len); return 0; diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index ff18636e0889..96bff5627a31 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -158,7 +158,6 @@ static void mtd_blktrans_work(struct mtd_blktrans_dev *dev) } background_done = 0; - cond_resched(); spin_lock_irq(&dev->queue_lock); } } diff --git a/drivers/mtd/nand/onenand/onenand_base.c b/drivers/mtd/nand/onenand/onenand_base.c index f66385faf631..97d07e4cc150 100644 --- a/drivers/mtd/nand/onenand/onenand_base.c +++ b/drivers/mtd/nand/onenand/onenand_base.c @@ -567,7 +567,7 @@ static int onenand_wait(struct mtd_info *mtd, int state) break; if (state != FL_READING && state != FL_PREPARING_ERASE) - cond_resched(); + cond_resched_stall(); } /* To get correct interrupt status in timeout case */ interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); @@ -1143,8 +1143,6 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from, stats = mtd->ecc_stats; while (read < len) { - cond_resched(); - thislen = min_t(int, writesize, len - read); column = from & (writesize - 1); @@ -1307,7 +1305,6 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from, buf += thislen; thislen = min_t(int, writesize, len - read); column = 0; - cond_resched(); /* Now wait for load */ ret = this->wait(mtd, FL_READING); onenand_update_bufferram(mtd, from, !ret); @@ -1378,8 +1375,6 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from, readcmd = ONENAND_IS_4KB_PAGE(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB; while (read < len) { - cond_resched(); - thislen = oobsize - column; thislen = min_t(int, thislen, len); @@ -1565,8 +1560,6 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, readcmd = ONENAND_IS_4KB_PAGE(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB; while (read < len) { - cond_resched(); - thislen = mtd->oobsize - column; thislen = min_t(int, thislen, len); @@ -1838,8 +1831,6 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to, thislen = min_t(int, mtd->writesize - column, len - written); thisooblen = min_t(int, oobsize - oobcolumn, ooblen - oobwritten); - cond_resched(); - this->command(mtd, ONENAND_CMD_BUFFERRAM, to, thislen); /* Partial page write */ @@ -2022,8 +2013,6 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to, while (written < len) { int thislen = min_t(int, oobsize, len - written); - cond_resched(); - this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize); /* We send data to spare ram with oobsize @@ -2232,7 +2221,6 @@ static int onenand_multiblock_erase(struct mtd_info *mtd, } /* last block of 64-eb series */ - cond_resched(); this->command(mtd, ONENAND_CMD_ERASE, addr, block_size); onenand_invalidate_bufferram(mtd, addr, block_size); @@ -2288,8 +2276,6 @@ static int onenand_block_by_block_erase(struct mtd_info *mtd, /* Loop through the blocks */ while (len) { - cond_resched(); - /* Check if we have a bad block, we do not erase bad blocks */ if (onenand_block_isbad_nolock(mtd, addr, 0)) { printk(KERN_WARNING "%s: attempt to erase a bad block " @@ -2799,8 +2785,6 @@ static int onenand_otp_write_oob_nolock(struct mtd_info *mtd, loff_t to, while (written < len) { int thislen = min_t(int, oobsize, len - written); - cond_resched(); - block = (int) (to >> this->erase_shift); /* * Write 'DFS, FBA' of Flash diff --git a/drivers/mtd/nand/onenand/onenand_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c index fd6890a03d55..2e0c8f50d77d 100644 --- a/drivers/mtd/nand/onenand/onenand_samsung.c +++ b/drivers/mtd/nand/onenand/onenand_samsung.c @@ -338,8 +338,14 @@ static int s3c_onenand_wait(struct mtd_info *mtd, int state) if (stat & flags) break; + /* + * Use a cond_resched_stall() to avoid spinning in + * a tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should timeout or event wait? + */ if (state != FL_READING) - cond_resched(); + cond_resched_stall(); } /* To get correct interrupt status in timeout case */ stat = s3c_read_reg(INT_ERR_STAT_OFFSET); diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c index 5d2ddb037a9a..930b4fdf75e0 100644 --- a/drivers/mtd/nand/raw/diskonchip.c +++ b/drivers/mtd/nand/raw/diskonchip.c @@ -248,7 +248,7 @@ static int _DoC_WaitReady(struct doc_priv *doc) return -EIO; } udelay(1); - cond_resched(); + cond_resched_stall(); } } else { while (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { @@ -257,7 +257,7 @@ static int _DoC_WaitReady(struct doc_priv *doc) return -EIO; } udelay(1); - cond_resched(); + cond_resched_stall(); } } diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c index 811982da3557..20e88e98e517 100644 --- a/drivers/mtd/nand/raw/fsmc_nand.c +++ b/drivers/mtd/nand/raw/fsmc_nand.c @@ -398,8 +398,7 @@ static int fsmc_read_hwecc_ecc4(struct nand_chip *chip, const u8 *data, do { if (readl_relaxed(host->regs_va + STS) & FSMC_CODE_RDY) break; - - cond_resched(); + cond_resched_stall(); } while (!time_after_eq(jiffies, deadline)); if (time_after_eq(jiffies, deadline)) { diff --git a/drivers/mtd/nand/raw/hisi504_nand.c b/drivers/mtd/nand/raw/hisi504_nand.c index fe291a2e5c77..bf669b1750f8 100644 --- a/drivers/mtd/nand/raw/hisi504_nand.c +++ b/drivers/mtd/nand/raw/hisi504_nand.c @@ -819,7 +819,7 @@ static int hisi_nfc_suspend(struct device *dev) if (((hinfc_read(host, HINFC504_STATUS) & 0x1) == 0x0) && (hinfc_read(host, HINFC504_DMA_CTRL) & HINFC504_DMA_CTRL_DMA_START)) { - cond_resched(); + cond_resched_stall(); return 0; } } diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 1fcac403cee6..656126b05f09 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -730,8 +730,7 @@ int nand_gpio_waitrdy(struct nand_chip *chip, struct gpio_desc *gpiod, do { if (gpiod_get_value_cansleep(gpiod)) return 0; - - cond_resched(); + cond_resched_stall(); } while (time_before(jiffies, timeout_ms)); return gpiod_get_value_cansleep(gpiod) ? 0 : -ETIMEDOUT; diff --git a/drivers/mtd/nand/raw/nand_legacy.c b/drivers/mtd/nand/raw/nand_legacy.c index 743792edf98d..aaef537b46c3 100644 --- a/drivers/mtd/nand/raw/nand_legacy.c +++ b/drivers/mtd/nand/raw/nand_legacy.c @@ -203,7 +203,13 @@ void nand_wait_ready(struct nand_chip *chip) do { if (chip->legacy.dev_ready(chip)) return; - cond_resched(); + /* + * Use a cond_resched_stall() to avoid spinning in + * a tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should timeout or event wait? + */ + cond_resched_stall(); } while (time_before(jiffies, timeo)); if (!chip->legacy.dev_ready(chip)) @@ -565,7 +571,14 @@ static int nand_wait(struct nand_chip *chip) if (status & NAND_STATUS_READY) break; } - cond_resched(); + + /* + * Use a cond_resched_stall() to avoid spinning in + * a tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should timeout or event wait? + */ + cond_resched_stall(); } while (time_before(jiffies, timeo)); } diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 1b0c6770c14e..e32e6eebb0e2 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -730,7 +730,13 @@ static int spi_nor_wait_till_ready_with_timeout(struct spi_nor *nor, if (ret) return 0; - cond_resched(); + /* + * Use a cond_resched_stall() to avoid spinning in + * a tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should timeout or event wait? + */ + cond_resched_stall(); } dev_dbg(nor->dev, "flash operation timed out\n"); diff --git a/drivers/mtd/tests/mtd_test.c b/drivers/mtd/tests/mtd_test.c index c84250beffdc..5bb0c6ef7df9 100644 --- a/drivers/mtd/tests/mtd_test.c +++ b/drivers/mtd/tests/mtd_test.c @@ -51,7 +51,6 @@ int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, bbt[i] = is_block_bad(mtd, eb + i) ? 1 : 0; if (bbt[i]) bad += 1; - cond_resched(); } pr_info("scanned %d eraseblocks, %d are bad\n", i, bad); @@ -70,7 +69,6 @@ int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, err = mtdtest_erase_eraseblock(mtd, eb + i); if (err) return err; - cond_resched(); } return 0; diff --git a/drivers/mtd/tests/mtd_test.h b/drivers/mtd/tests/mtd_test.h index 5a6e3bbe0474..4742f53c6f25 100644 --- a/drivers/mtd/tests/mtd_test.h +++ b/drivers/mtd/tests/mtd_test.h @@ -4,7 +4,7 @@ static inline int mtdtest_relax(void) { - cond_resched(); + cond_resched_stall(); if (signal_pending(current)) { pr_info("aborting test due to pending signal!\n"); return -EINTR; diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c index 8eb40b6e6dfa..79330c0ccd85 100644 --- a/drivers/mtd/tests/pagetest.c +++ b/drivers/mtd/tests/pagetest.c @@ -43,7 +43,6 @@ static int write_eraseblock(int ebnum) loff_t addr = (loff_t)ebnum * mtd->erasesize; prandom_bytes_state(&rnd_state, writebuf, mtd->erasesize); - cond_resched(); return mtdtest_write(mtd, addr, mtd->erasesize, writebuf); } diff --git a/drivers/mtd/tests/readtest.c b/drivers/mtd/tests/readtest.c index 99670ef91f2b..c862d9a6dc1d 100644 --- a/drivers/mtd/tests/readtest.c +++ b/drivers/mtd/tests/readtest.c @@ -91,7 +91,6 @@ static void dump_eraseblock(int ebnum) for (j = 0; j < 32 && i < n; j++, i++) p += sprintf(p, "%02x", (unsigned int)iobuf[i]); printk(KERN_CRIT "%s\n", line); - cond_resched(); } if (!mtd->oobsize) return; @@ -106,7 +105,6 @@ static void dump_eraseblock(int ebnum) p += sprintf(p, "%02x", (unsigned int)iobuf1[i]); printk(KERN_CRIT "%s\n", line); - cond_resched(); } } diff --git a/drivers/mtd/tests/torturetest.c b/drivers/mtd/tests/torturetest.c index 841689b4d86d..94cf4f6c6c4c 100644 --- a/drivers/mtd/tests/torturetest.c +++ b/drivers/mtd/tests/torturetest.c @@ -390,7 +390,6 @@ static void report_corrupt(unsigned char *read, unsigned char *written) " what was read from flash and what was expected\n"); for (i = 0; i < check_len; i += pgsize) { - cond_resched(); bytes = bits = 0; first = countdiffs(written, read, i, pgsize, &bytes, &bits); diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index ae5abe492b52..0994d2d8edf0 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -1390,8 +1390,6 @@ static int scan_all(struct ubi_device *ubi, struct ubi_attach_info *ai, goto out_ech; for (pnum = start; pnum < ubi->peb_count; pnum++) { - cond_resched(); - dbg_gen("process PEB %d", pnum); err = scan_peb(ubi, ai, pnum, false); if (err < 0) @@ -1504,8 +1502,6 @@ static int scan_fast(struct ubi_device *ubi, struct ubi_attach_info **ai) goto out_ech; for (pnum = 0; pnum < UBI_FM_MAX_START; pnum++) { - cond_resched(); - dbg_gen("process PEB %d", pnum); err = scan_peb(ubi, scan_ai, pnum, true); if (err < 0) @@ -1674,8 +1670,6 @@ static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai) ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { int leb_count = 0; - cond_resched(); - vols_found += 1; if (ai->is_empty) { @@ -1715,8 +1709,6 @@ static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai) last_aeb = NULL; ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) { - cond_resched(); - last_aeb = aeb; leb_count += 1; @@ -1790,8 +1782,6 @@ static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai) ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) { int vol_type; - cond_resched(); - last_aeb = aeb; err = ubi_io_read_vid_hdr(ubi, aeb->pnum, vidb, 1); diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 8ee51e49fced..52740f461259 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -1257,8 +1257,6 @@ static int __init ubi_init(void) struct mtd_dev_param *p = &mtd_dev_param[i]; struct mtd_info *mtd; - cond_resched(); - mtd = open_mtd_device(p->name); if (IS_ERR(mtd)) { err = PTR_ERR(mtd); diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index f43430b9c1e6..e60c0ad0eeb4 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c @@ -209,8 +209,6 @@ static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count, lnum = div_u64_rem(*offp, vol->usable_leb_size, &off); do { - cond_resched(); - if (off + len >= vol->usable_leb_size) len = vol->usable_leb_size - off; @@ -289,8 +287,6 @@ static ssize_t vol_cdev_direct_write(struct file *file, const char __user *buf, len = count > tbuf_size ? tbuf_size : count; while (count) { - cond_resched(); - if (off + len >= vol->usable_leb_size) len = vol->usable_leb_size - off; diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 655ff41863e2..f1e097503826 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -1408,9 +1408,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, aldata_size = data_size = ubi_calc_data_len(ubi, ubi->peb_buf, data_size); - cond_resched(); crc = crc32(UBI_CRC32_INIT, ubi->peb_buf, data_size); - cond_resched(); /* * It may turn out to be that the whole @from physical eraseblock @@ -1432,8 +1430,6 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, goto out_unlock_buf; } - cond_resched(); - /* Read the VID header back and check if it was written correctly */ err = ubi_io_read_vid_hdr(ubi, to, vidb, 1); if (err) { @@ -1454,8 +1450,6 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, err = MOVE_TARGET_WR_ERR; goto out_unlock_buf; } - - cond_resched(); } ubi_assert(vol->eba_tbl->entries[lnum].pnum == from); @@ -1640,8 +1634,6 @@ int ubi_eba_init(struct ubi_device *ubi, struct ubi_attach_info *ai) if (!vol) continue; - cond_resched(); - tbl = ubi_eba_create_table(vol, vol->reserved_pebs); if (IS_ERR(tbl)) { err = PTR_ERR(tbl); diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c index 1794d66b6eb7..8751337a8101 100644 --- a/drivers/mtd/ubi/misc.c +++ b/drivers/mtd/ubi/misc.c @@ -61,8 +61,6 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id) for (i = 0; i < vol->used_ebs; i++) { int size; - cond_resched(); - if (i == vol->used_ebs - 1) size = vol->last_eb_bytes; else diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index f700f0e4f2ec..6e0d8b3109d5 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -163,8 +163,6 @@ static int vtbl_check(const struct ubi_device *ubi, const char *name; for (i = 0; i < ubi->vtbl_slots; i++) { - cond_resched(); - reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); alignment = be32_to_cpu(vtbl[i].alignment); data_pad = be32_to_cpu(vtbl[i].data_pad); @@ -526,8 +524,6 @@ static int init_volumes(struct ubi_device *ubi, struct ubi_volume *vol; for (i = 0; i < ubi->vtbl_slots; i++) { - cond_resched(); - if (be32_to_cpu(vtbl[i].reserved_pebs) == 0) continue; /* Empty record */ @@ -736,8 +732,6 @@ static int check_attaching_info(const struct ubi_device *ubi, } for (i = 0; i < ubi->vtbl_slots + UBI_INT_VOL_COUNT; i++) { - cond_resched(); - av = ubi_find_av(ai, i); vol = ubi->volumes[i]; if (!vol) { diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 26a214f016c1..5ff22ac93ba9 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -190,8 +190,6 @@ static int do_work(struct ubi_device *ubi) int err; struct ubi_work *wrk; - cond_resched(); - /* * @ubi->work_sem is used to synchronize with the workers. Workers take * it in read mode, so many of them may be doing works at a time. But @@ -519,7 +517,6 @@ static void serve_prot_queue(struct ubi_device *ubi) * too long. */ spin_unlock(&ubi->wl_lock); - cond_resched(); goto repeat; } } @@ -1703,8 +1700,6 @@ int ubi_thread(void *u) } } else failures = 0; - - cond_resched(); } dbg_wl("background thread \"%s\" is killed", ubi->bgt_name); @@ -1805,8 +1800,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai) ubi->free_count = 0; list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) { - cond_resched(); - err = erase_aeb(ubi, aeb, false); if (err) goto out_free; @@ -1815,8 +1808,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai) } list_for_each_entry(aeb, &ai->free, u.list) { - cond_resched(); - e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL); if (!e) { err = -ENOMEM; @@ -1837,8 +1828,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai) ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) { - cond_resched(); - e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL); if (!e) { err = -ENOMEM; @@ -1864,8 +1853,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai) } list_for_each_entry(aeb, &ai->fastmap, u.list) { - cond_resched(); - e = ubi_find_fm_block(ubi, aeb->pnum); if (e) { From patchwork Tue Nov 7 23:08:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CAE3C4332F for ; Tue, 7 Nov 2023 23:10:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF48D4401B5; Tue, 7 Nov 2023 18:10:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C7D304401B2; Tue, 7 Nov 2023 18:10:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0C274401B5; Tue, 7 Nov 2023 18:10:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 829FC4401B2 for ; Tue, 7 Nov 2023 18:10:23 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 642F3160AFE for ; Tue, 7 Nov 2023 23:10:23 +0000 (UTC) X-FDA: 81432703926.13.D772850 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf01.hostedemail.com (Postfix) with ESMTP id 0C08F4001D for ; Tue, 7 Nov 2023 23:10:19 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Www6Nr99; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=souTidh4; spf=pass (imf01.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398620; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=tq1zfiB4GDrADd32Dobq32ENEB6+vmdJZsjvmxtBuP0=; b=n3GVZDOWcMW4sJYnVxcUysSOpcnvqwHUcmitrM/hXj7HFlFn2/J3srUUqBR4fRD3eCgIGy 2eqZYIekuysYXiRMlYIh2MNhx9ZaO4SWJUMo3NUjiXxMTdrz8XpBwUZy2DMnnAlhv6/Lxh gujUSjQoXOtyVcZtJ/iGNfm8m69otvU= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398620; a=rsa-sha256; cv=pass; b=ur7s3MEI2XkTWFYCV48z7HltzK9PPZBKaF4jqgav3prYaF9KsX2pczLqsfSFZw2sBeRwTW BMIQkH9dTZoG+cyh7eWRE6XrW688cJNZt6rn6iWnMW6+spBBd/tWyj1xjiugKMg+35J5rz CTjrVyKdJbD9HE1wA+PtM3+yUxOzbQA= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=Www6Nr99; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=souTidh4; spf=pass (imf01.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJl4R004882; Tue, 7 Nov 2023 23:09:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=tq1zfiB4GDrADd32Dobq32ENEB6+vmdJZsjvmxtBuP0=; b=Www6Nr99Uhvw+7rllhU7Yp5jICuS3pHCT8VqVxFwN2YUlcLgTttPA8GOQDRMvukDHFeC Q8reD7pb7zqnEd7PMK1rvucuZVi1NJcmhxXAo47Xf4L6zU0lkVidYpty/rZMSt4CiVJa DBX/orgV2rbQJXHzQCFUwvrUh2meVMILBiSVIbjb6UlhEYvJjmZdPSEUJ3p1aygqwkHj PkPAhgg3G+9FYPvIazV/IgPfeGLqfZVpjEW8HMsl7ksNz7a/qrGNiNgbb1TtW8Wanm7n mQOApqDE+W6tdIACyQyjtjZhK5RcpuMOyOrH/rWjVTL15BeUF8jCg71lVdQ3HeeeeNLd DA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6c7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:57 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2CYQ011114; Tue, 7 Nov 2023 23:09:56 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1tvajt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f0fAyMci7+3EakWL4qP0aIBCmfVvEkf7SwqPGa9tm0V8VQI2/b4FalMO/tGPOy1fLMO78ZrFVVDL0mAzfmMRWEuYv1Rprn2gXZJPuliPROeNBwopYVAxUMnak5RJOt+XqvqkXYIL7GAxrWIALFngXlcG1L8KBpyuT6WMZaZdi1dSc+ZIa4IsfLRgU3wX9drid4kdDNTPgcxNjejGbfqOCpOegCC9Vf9JLrl5aiNHwPyWUigKhf+fM+3JXh5vTWas05HkuLED02GW1/8QQZ5okMFlxH91zoKnyPGFf01pZEtCOATT+iL989CnNnkQ+Oq8S/z+fMeTIGqp6Sh3w6I/XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=tq1zfiB4GDrADd32Dobq32ENEB6+vmdJZsjvmxtBuP0=; b=NNAS/rhai4FS3amuYXQ1VcCX4vOnPnCemhKHxKzL2+FM2SJjNLAOEPc/WFTzT+rZmbQXbd8Zr+xnfxxb6YmKBEtPJ+zniR9DbprIj6qS71qwjP7W1S4PgYW5XrZ1ZV0J3hOht1Xwl8LJHKjim/U+Lra7/TX/UvRSiz+udHpl+9TyU/0IdA+/R7NkeDdfea44htIn7P6T0SboHU/1iIO3strUOzu55JNYWNUiYSVN2B/Nzm9RSk6L4mxvc8fwa30OGKCZw9EhLYxEHkN+qLnu311SDYstwTWiNKAhH/Mmie+ld/M/4fjjzzxR6Aj0nSM3XyklprR3aune81R7d6p3aA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tq1zfiB4GDrADd32Dobq32ENEB6+vmdJZsjvmxtBuP0=; b=souTidh4Rmk/fOvai8bXm4HNJwdQBllrr7fdcZ/S4SNyM/b1oJpvA2oOfs43i+15VMlpyVasXCUv1+C1l6lcTZJ9IfG9YFzaEVuvAOb/sa09zo4OUOl3NHSJOnyuUWori8eaACtfUt5eYzrWckAQ7K1pZjaSXqoSYuSV7zopYIA= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:52 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:52 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: [RFC PATCH 83/86] treewide: drm: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:19 -0800 Message-Id: <20231107230822.371443-27-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4P221CA0001.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::6) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: f34de6d7-050b-48bc-eaed-08dbdfe6a60b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IJbQ6QvghiESUH2/hQ9+av35ukOOyeyFyaOUiHTHKjDPrYSc6Q8VzARXXYCAkfWlhGgRgnwh6AvIVEA3r2MAT5z2pHTkqFw20LrSTUO9z/k2TcecSSOaQqrHspm8m1aYxLMX/jD3rSFdrLw8L7FMDoH6jvBMZ82oeWun6J/zgQIUQgxp+AfftNm2LHSW2nmjnIoDlPO4xnRYd5xpsqNZjAxu5CSyIkN0R9mGpltKwSerkYPDKiT7lvw9MpECK2mYr4+CKj78686jKsc4qgCY5IcV7pQOsnIihY3h4MsAXLXH4kfFXjAXtCLmDTwObrCQwkY2TbC/4/F2QWLuU6NVh8b1L4H5cAd+LwguL4PRVYg1agx2N55uaYmhCjWUgVpG5jbC1/ErN2OQhuMxkvUhc25qI3OMCMWaAIsdvhhP4xJFszCbrzXpw5X8vrHayXYgYGZGP/sOVy/AsaQcfpf3a5wmY+34PGdSV8Fj1lqMM0ChaaOu3tNXoZ7fC6jHXgte0NwT2Z/AO/aYLC6KQFhDqamHvNaRBBVviEWDIAq0snQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LZfXZLcj3ZW4ZR3ZPK0iOitquxDz3gwFbIehjJ40ixOoDCs2nELVhY0BU3MqqQxW4QCJ7LjQP7URrPgneCkvZY+1RVZ/zhbMzGsoQCfXWZq2NXP+ozQqtPeo1J0ku53vtUqtwi2BkqqBgM/BlRZu/swrJ41aTK0pC+Z+fHc++Nyq38S+Cq0h+q5qGrYMGW76y3cT8twguYuxhf6gwv8V349OFBr65dqyCpNX+wpUJRvcIhC5yrwCB9jDFEb2Yf79V0Wg/K89Dme19ZlNGhC0PpF2SnUAFm3SPv2JnqdO0T0g7MiYcahD1QMMXSiH2k/gmGx0f4h/VrrE5uEE2PDJaYBqZiioSz4UYUxvEQWsxGu9Alg0bbH4AeHckpe8ZTzbLRSxbKyHSh0DPQ84aPBHcgC0KrFhSJYqXVfXmgc7vbeyZn/oOgbz2WIuQ0bEIV+A2s0FlaULnUPgogZE3kdQut72zjxCqaFRULuOV8pMKtEnAQl7begVv5hNpkECUrLFZLszeTVn0MOjf7xiRuBriBRt+I66ybCPAHKv7PjYBQPl8zVbOJGwqcJ3OIUxTbav10sZsfnqwvcGf7CB6kbrywjPtIUlloMDuzj9fXBF64XdPNvw2SYPeyvZ9qtM1S5OElj50s8BGAk7UYwJCQeemfRWbqf03a62UhG7a8LgcKGNzMVpAxFK/KTmB2dABBKKqrhl/h6eWyk6Fjc960TtNu1AMi/oNYUv+yp9gBxmVzPTE6ADV9OmJk3bOfEYGUuSLjNWIccVmKcbVpZylHpdzed2LNi48O1a5s9TvhH8IbJuG37/r0iSiuV+4B79v6t50w8vwqSD7aXVe68pzUF619SfzhBfngj9hKTEPO+6LybHVhmC9iizDTCwCNgx9MOCnYLCUz0yYxeSmwr2DKuy6a74sgzWFYuIz5Daxn8AD09+2TnOM8hktDeB90wb4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MDbypKkrTg7vECwO7PR/5TX4yM25AoFiMSfpqNu2cvscFPUu/6xDSbIkcAZu0cHPwwpPVNdxlwJyvM7dLpMpOkdpAfQ5XigEqJlf76bqIbq0O4c2aDRjfoyzDC4qR7/r6G5FRr+NTeBOIDu14Vcq9q3vq8AjJfZ+hOAva9VoINWpgNKjQ1tv9VjLBBhJuOT66vVH438lT0tju02y4yNHoGDBWuCo806kktwhLZuT4JMmXSbi4drElrRL2Zx+mASxtU/hvvJGKkzw31Xe33sogITGxEAWJ0FQ3eiy+VaP6FtepbY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f34de6d7-050b-48bc-eaed-08dbdfe6a60b X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:52.6615 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4KgUi8pQ/sLDd1hH8cvqS4xgI7VTK4sdeywxhD0+8ZH6u+RYKx2TSBr8V1fn/rt9Sgx7bXi+60qqGVd69XQGdlqBcY1gZ2LbmXdEDfg8QoI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: bZTJoCchBsrZ1u2CPnAl9mrDpIaDH0f_ X-Proofpoint-GUID: bZTJoCchBsrZ1u2CPnAl9mrDpIaDH0f_ X-Rspamd-Queue-Id: 0C08F4001D X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: pr9qibcw758e4qakcd7g1gst3ew3qtip X-HE-Tag: 1699398619-420351 X-HE-Meta: U2FsdGVkX19ge6Gz5ei5e39VPbDeNF1uogRtddZLZUp1xz4/UMrdeSpbuJS43SX11lKfBx+aXjKQzgZ0CenOlbellgLa4sVH3kZpdKJTWNDehzkhesvXRrm01hdZcuTiBbT4V4iSAhE67tkPXMdW1MkHplgVHIXP5Xkph55tzV5ktmHdwNmXfjWs8l2ycV/3H3zVDfUdTIcQDwOCpdtYV7SQL5mPG/pzeyY1FsCgI8nX6V3WS6w8eIvi7hX+sWLNdwGudS7Ky9o8j8AGJZ509oMOPuQQU5pUdMzg06JfpkL6MVCJykmv/q3OMVaTjH45KX2c1ZufWeH27sbT08WBa2vsUTIW7sQmVOp1/eWiwt8rxK6995iBR78hjWwDJ7YY8EubfbqWNbwllVURc7MAP7OKs8gwrQ86/Ad9Zgj28xHxTJUONHBlnbuJoFqn26C4zlgDmD8mJQ0m6pG0jrMJwT0F0f1pZvUmLOoXdEUYzR2/TAO3c/3DcM2lUyLfMMbMlKtUD33xvUWXQ//C7kG81rTOsjvwNgzxQEZsX+uN934lTBwopjJUk2KRNTybordfQtLq0bVy3+EVXpbGkvTkmX1tuwJp+S95wsLWi+a+vKj4ZT6mGH5o8oMu195wV4pCoNQe6opn+E8G6F2bfViGyThxUw4pakqmDXpsWnKNoquuyrGRu3I/poDbh5lOFViXhiKg21YHaUTFHnodTHPn1Ut0JbfnmJ9fz4z/S3OozP45MqDmVdLxrad/GYlxOfMHlwPrgkI0Wq5feu0nPztpSVme/dM7dPmUVrO5JlIc16Uz6tebiZ6P7+nX6ULwo0tNP7esUNQVAJxfFROwKWDsqwHjnUPPNrpO5ucgqqO4exmPzgB+HLrpMLKXwrAzO42QZpDezX1Uya92dWmh/A24vFkPWKVHGo88YpShD5iowfkKbiPTHyvtuTlMzZa6z7yYQOVxMRkvnl+eMVRJsB+ ddOz2dXs yHiLG2OqtsazmN0cL6LtMScZchGyBV7eE7TLx0r8xKhyzByHrdnbBHe2jOxZn4cVOgQjym7S9ZNE4S+LZ4keeUy3VPsu7g4xRHKNM7+V3grKR5/aDjVtNywEuDss/tgjbYv8miY1zXlDxphZbsc9FKdQpo5RGn5itYs2SgVMs7+ADuOXO8TYDmuPzOVvMIhAjyoAxwR1R/6P83YaY8bLcXSmtDm1sWImCWzmkJYz0HZqXF4HYmz99a5JIXJdxAA1hISwUlGZpe0g03IMAeU5qnyc4VdYZnUZAceOpMPUDbnw/3ElS5+85DoW5jkXmsCLuRKy79vCcgA4pgydhu4S/6ztAiTSXVgfBfzFLxodE6J3EJl7KUW2YZO0Wwy0PYkhUmTpsC9McVRFtKityMMqFVBAo0/Hb9nc7/RfjA4JlfT00gdOw6sAUec14D0NQJvHL5TD1KrBPpgLl3AFaOc4KVK7O0WR+PbfaSyCL6l+yemtuJv0AkKsao8TCm8MRA0PNd2zeh4iQyS9mwdjdQR8QM87di1os4e0XWCaDGlAFsuegGF/pjuko7yGo9Ee6KLTv2AkvCeDH+R5yWXXrprs/HiGhke74Z8wpxjkAxgCHGpsz6qep4T45fXVhTA2krR12JhRLo2Fx9QM+APnWuBA6NRUHNPciCmQ6dsNKxBfxXztYFFWzYCYaCCBJqbXA7bCMVidFAhI9O4gkeOo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the uses here are in set-1 (some right after we give up a lock or enable bottom-halves, causing an explicit preemption check.) There are a few cases from set-3. Replace them with cond_resched_stall(). [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Inki Dae Cc: Jagan Teki Cc: Marek Szyprowski Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Signed-off-by: Ankur Arora --- drivers/gpu/drm/bridge/samsung-dsim.c | 2 +- drivers/gpu/drm/drm_buddy.c | 1 - drivers/gpu/drm/drm_gem.c | 1 - .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 1 - drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 -- .../gpu/drm/i915/gem/selftests/huge_pages.c | 6 ---- .../drm/i915/gem/selftests/i915_gem_mman.c | 5 ---- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 2 +- drivers/gpu/drm/i915/gt/intel_gt.c | 2 +- drivers/gpu/drm/i915/gt/intel_migrate.c | 4 --- drivers/gpu/drm/i915/gt/selftest_execlists.c | 4 --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 2 -- drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 -- drivers/gpu/drm/i915/gt/selftest_migrate.c | 2 -- drivers/gpu/drm/i915/gt/selftest_timeline.c | 4 --- drivers/gpu/drm/i915/i915_active.c | 2 +- drivers/gpu/drm/i915/i915_gem_evict.c | 2 -- drivers/gpu/drm/i915/i915_gpu_error.c | 18 ++++-------- drivers/gpu/drm/i915/intel_uncore.c | 1 - drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 -- drivers/gpu/drm/i915/selftests/i915_request.c | 2 -- .../gpu/drm/i915/selftests/i915_selftest.c | 3 -- drivers/gpu/drm/i915/selftests/i915_vma.c | 9 ------ .../gpu/drm/i915/selftests/igt_flush_test.c | 2 -- .../drm/i915/selftests/intel_memory_region.c | 4 --- drivers/gpu/drm/tests/drm_buddy_test.c | 5 ---- drivers/gpu/drm/tests/drm_mm_test.c | 29 ------------------- 28 files changed, 11 insertions(+), 110 deletions(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index cf777bdb25d2..ae537b9bf8df 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1013,7 +1013,7 @@ static int samsung_dsim_wait_for_hdr_fifo(struct samsung_dsim *dsi) if (reg & DSIM_SFR_HEADER_EMPTY) return 0; - if (!cond_resched()) + if (!cond_resched_stall()) usleep_range(950, 1050); } while (--timeout); diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index e6f5ba5f4baf..fe401d18bf4d 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/drm/drm_buddy.c @@ -311,7 +311,6 @@ void drm_buddy_free_list(struct drm_buddy *mm, struct list_head *objects) list_for_each_entry_safe(block, on, objects, link) { drm_buddy_free_block(mm, block); - cond_resched(); } INIT_LIST_HEAD(objects); } diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 44a948b80ee1..881caa4b48a9 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -506,7 +506,6 @@ static void drm_gem_check_release_batch(struct folio_batch *fbatch) { check_move_unevictable_folios(fbatch); __folio_batch_release(fbatch); - cond_resched(); } /** diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index 5a687a3686bd..0b16689423b4 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -1812,7 +1812,7 @@ static noinline int eb_relocate_parse_slow(struct i915_execbuffer *eb) err = eb_copy_relocations(eb); have_copy = err == 0; } else { - cond_resched(); + cond_resched_stall(); err = 0; } diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c index ef9346ed6d0f..172eee1e8889 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_object.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c @@ -414,7 +414,6 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915, /* But keep the pointer alive for RCU-protected lookups */ call_rcu(&obj->rcu, __i915_gem_free_object_rcu); - cond_resched(); } } diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c index 73a4a4eb29e0..38ea2fc206e0 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c @@ -26,7 +26,6 @@ static void check_release_folio_batch(struct folio_batch *fbatch) { check_move_unevictable_folios(fbatch); __folio_batch_release(fbatch); - cond_resched(); } void shmem_sg_free_table(struct sg_table *st, struct address_space *mapping, @@ -108,7 +107,6 @@ int shmem_sg_alloc_table(struct drm_i915_private *i915, struct sg_table *st, gfp_t gfp = noreclaim; do { - cond_resched(); folio = shmem_read_folio_gfp(mapping, i, gfp); if (!IS_ERR(folio)) break; diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c index 6b9f6cf50bf6..fae0fa993404 100644 --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c @@ -1447,8 +1447,6 @@ static int igt_ppgtt_smoke_huge(void *arg) if (err) break; - - cond_resched(); } return err; @@ -1538,8 +1536,6 @@ static int igt_ppgtt_sanity_check(void *arg) goto out; } } - - cond_resched(); } out: @@ -1738,8 +1734,6 @@ static int igt_ppgtt_mixed(void *arg) break; addr += obj->base.size; - - cond_resched(); } i915_gem_context_unlock_engines(ctx); diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index 72957a36a36b..c994071532cf 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c @@ -221,7 +221,6 @@ static int check_partial_mappings(struct drm_i915_gem_object *obj, u32 *cpu; GEM_BUG_ON(view.partial.size > nreal); - cond_resched(); vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE); if (IS_ERR(vma)) { @@ -1026,8 +1025,6 @@ static void igt_close_objects(struct drm_i915_private *i915, i915_gem_object_put(obj); } - cond_resched(); - i915_gem_drain_freed_objects(i915); } @@ -1041,8 +1038,6 @@ static void igt_make_evictable(struct list_head *objects) i915_gem_object_unpin_pages(obj); i915_gem_object_unlock(obj); } - - cond_resched(); } static int igt_fill_mappable(struct intel_memory_region *mr, diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c index ecc990ec1b95..e016f1203f7c 100644 --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c @@ -315,7 +315,7 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) local_irq_disable(); signal_irq_work(&b->irq_work); local_irq_enable(); - cond_resched(); + cond_resched_stall(); } } diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index 449f0b7fc843..40cfdf4f5fff 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -664,7 +664,7 @@ int intel_gt_wait_for_idle(struct intel_gt *gt, long timeout) while ((timeout = intel_gt_retire_requests_timeout(gt, timeout, &remaining_timeout)) > 0) { - cond_resched(); + cond_resched_stall(); if (signal_pending(current)) return -EINTR; } diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c index 576e5ef0289b..cc3f62d5c28f 100644 --- a/drivers/gpu/drm/i915/gt/intel_migrate.c +++ b/drivers/gpu/drm/i915/gt/intel_migrate.c @@ -906,8 +906,6 @@ intel_context_migrate_copy(struct intel_context *ce, err = -EINVAL; break; } - - cond_resched(); } while (1); out_ce: @@ -1067,8 +1065,6 @@ intel_context_migrate_clear(struct intel_context *ce, i915_request_add(rq); if (err || !it.sg || !sg_dma_len(it.sg)) break; - - cond_resched(); } while (1); out_ce: diff --git a/drivers/gpu/drm/i915/gt/selftest_execlists.c b/drivers/gpu/drm/i915/gt/selftest_execlists.c index 4202df5b8c12..52c8fa3e5cad 100644 --- a/drivers/gpu/drm/i915/gt/selftest_execlists.c +++ b/drivers/gpu/drm/i915/gt/selftest_execlists.c @@ -60,8 +60,6 @@ static int wait_for_submit(struct intel_engine_cs *engine, if (done) return -ETIME; - - cond_resched(); } while (1); } @@ -72,7 +70,6 @@ static int wait_for_reset(struct intel_engine_cs *engine, timeout += jiffies; do { - cond_resched(); intel_engine_flush_submission(engine); if (READ_ONCE(engine->execlists.pending[0])) @@ -1373,7 +1370,6 @@ static int live_timeslice_queue(void *arg) /* Wait until we ack the release_queue and start timeslicing */ do { - cond_resched(); intel_engine_flush_submission(engine); } while (READ_ONCE(engine->execlists.pending[0])); diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c index 0dd4d00ee894..e751ed2cf8b2 100644 --- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c +++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c @@ -939,8 +939,6 @@ static void active_engine(struct kthread_work *work) pr_err("[%s] Request put failed: %d!\n", engine->name, err); break; } - - cond_resched(); } for (count = 0; count < ARRAY_SIZE(rq); count++) { diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c index 5f826b6dcf5d..83a42492f0d0 100644 --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c @@ -70,8 +70,6 @@ static int wait_for_submit(struct intel_engine_cs *engine, if (done) return -ETIME; - - cond_resched(); } while (1); } diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c index 3def5ca72dec..9dfa70699df9 100644 --- a/drivers/gpu/drm/i915/gt/selftest_migrate.c +++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c @@ -210,8 +210,6 @@ static int intel_context_copy_ccs(struct intel_context *ce, i915_request_add(rq); if (err || !it.sg || !sg_dma_len(it.sg)) break; - - cond_resched(); } while (1); out_ce: diff --git a/drivers/gpu/drm/i915/gt/selftest_timeline.c b/drivers/gpu/drm/i915/gt/selftest_timeline.c index fa36cf920bde..15b8fd41ad90 100644 --- a/drivers/gpu/drm/i915/gt/selftest_timeline.c +++ b/drivers/gpu/drm/i915/gt/selftest_timeline.c @@ -352,7 +352,6 @@ static int bench_sync(void *arg) __func__, count, (long long)div64_ul(ktime_to_ns(kt), count)); mock_timeline_fini(&tl); - cond_resched(); mock_timeline_init(&tl, 0); @@ -382,7 +381,6 @@ static int bench_sync(void *arg) __func__, count, (long long)div64_ul(ktime_to_ns(kt), count)); mock_timeline_fini(&tl); - cond_resched(); mock_timeline_init(&tl, 0); @@ -405,7 +403,6 @@ static int bench_sync(void *arg) pr_info("%s: %lu repeated insert/lookups, %lluns/op\n", __func__, count, (long long)div64_ul(ktime_to_ns(kt), count)); mock_timeline_fini(&tl); - cond_resched(); /* Benchmark searching for a known context id and changing the seqno */ for (last_order = 1, order = 1; order < 32; @@ -434,7 +431,6 @@ static int bench_sync(void *arg) __func__, count, order, (long long)div64_ul(ktime_to_ns(kt), count)); mock_timeline_fini(&tl); - cond_resched(); } return 0; diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 5ec293011d99..810251c33495 100644 --- a/drivers/gpu/drm/i915/i915_active.c +++ b/drivers/gpu/drm/i915/i915_active.c @@ -865,7 +865,7 @@ int i915_active_acquire_preallocate_barrier(struct i915_active *ref, /* Wait until the previous preallocation is completed */ while (!llist_empty(&ref->preallocated_barriers)) - cond_resched(); + cond_resched_stall(); /* * Preallocate a node for each physical engine supporting the target diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index c02ebd6900ae..1a600f42a3ad 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -267,8 +267,6 @@ i915_gem_evict_something(struct i915_address_space *vm, if (ret) return ret; - cond_resched(); - flags |= PIN_NONBLOCK; goto search_again; diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 4008bb09fdb5..410072145d4d 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -320,8 +320,6 @@ static int compress_page(struct i915_vma_compress *c, if (zlib_deflate(zstream, Z_NO_FLUSH) != Z_OK) return -EIO; - - cond_resched(); } while (zstream->avail_in); /* Fallback to uncompressed if we increase size? */ @@ -408,7 +406,6 @@ static int compress_page(struct i915_vma_compress *c, if (!(wc && i915_memcpy_from_wc(ptr, src, PAGE_SIZE))) memcpy(ptr, src, PAGE_SIZE); list_add_tail(&virt_to_page(ptr)->lru, &dst->page_list); - cond_resched(); return 0; } @@ -2325,13 +2322,6 @@ void intel_klog_error_capture(struct intel_gt *gt, l_count, line++, ptr2); ptr[pos] = chr; ptr2 = ptr + pos; - - /* - * If spewing large amounts of data via a serial console, - * this can be a very slow process. So be friendly and try - * not to cause 'softlockup on CPU' problems. - */ - cond_resched(); } if (ptr2 < (ptr + count)) @@ -2352,8 +2342,12 @@ void intel_klog_error_capture(struct intel_gt *gt, got--; } - /* As above. */ - cond_resched(); + /* + * If spewing large amounts of data via a serial console, + * this can be a very slow process. So be friendly and try + * not to cause 'softlockup on CPU' problems. + */ + cond_resched_stall(); } if (got) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index dfefad5a5fec..d2e74cfb1aac 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -487,7 +487,6 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) } spin_unlock_irqrestore(&uncore->lock, irqflags); - cond_resched(); } drm_WARN_ON(&uncore->i915->drm, active_domains); diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c index 5c397a2df70e..4b497e969a33 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c @@ -201,7 +201,6 @@ static int igt_ppgtt_alloc(void *arg) } ppgtt->vm.allocate_va_range(&ppgtt->vm, &stash, 0, size); - cond_resched(); ppgtt->vm.clear_range(&ppgtt->vm, 0, size); @@ -224,7 +223,6 @@ static int igt_ppgtt_alloc(void *arg) ppgtt->vm.allocate_va_range(&ppgtt->vm, &stash, last, size - last); - cond_resched(); i915_vm_free_pt_stash(&ppgtt->vm, &stash); } diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index a9b79888c193..43bb54fc8c78 100644 --- a/drivers/gpu/drm/i915/selftests/i915_request.c +++ b/drivers/gpu/drm/i915/selftests/i915_request.c @@ -438,8 +438,6 @@ static void __igt_breadcrumbs_smoketest(struct kthread_work *work) num_fences += count; num_waits++; - - cond_resched(); } atomic_long_add(num_fences, &t->num_fences); diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c index ee79e0809a6d..17e6bbc3c87e 100644 --- a/drivers/gpu/drm/i915/selftests/i915_selftest.c +++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c @@ -179,7 +179,6 @@ static int __run_selftests(const char *name, if (!st->enabled) continue; - cond_resched(); if (signal_pending(current)) return -EINTR; @@ -381,7 +380,6 @@ int __i915_subtests(const char *caller, int err; for (; count--; st++) { - cond_resched(); if (signal_pending(current)) return -EINTR; @@ -414,7 +412,6 @@ bool __igt_timeout(unsigned long timeout, const char *fmt, ...) va_list va; if (!signal_pending(current)) { - cond_resched(); if (time_before(jiffies, timeout)) return false; } diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c index 71b52d5efef4..1bacdcd77c5b 100644 --- a/drivers/gpu/drm/i915/selftests/i915_vma.c +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c @@ -197,8 +197,6 @@ static int igt_vma_create(void *arg) list_del_init(&ctx->link); mock_context_close(ctx); } - - cond_resched(); } end: @@ -347,8 +345,6 @@ static int igt_vma_pin1(void *arg) goto out; } } - - cond_resched(); } err = 0; @@ -697,7 +693,6 @@ static int igt_vma_rotate_remap(void *arg) pr_err("Unbinding returned %i\n", err); goto out_object; } - cond_resched(); } } } @@ -858,8 +853,6 @@ static int igt_vma_partial(void *arg) pr_err("Unbinding returned %i\n", err); goto out_object; } - - cond_resched(); } } @@ -1085,8 +1078,6 @@ static int igt_vma_remapped_gtt(void *arg) } } i915_vma_unpin_iomap(vma); - - cond_resched(); } } diff --git a/drivers/gpu/drm/i915/selftests/igt_flush_test.c b/drivers/gpu/drm/i915/selftests/igt_flush_test.c index 29110abb4fe0..fbc1b606df29 100644 --- a/drivers/gpu/drm/i915/selftests/igt_flush_test.c +++ b/drivers/gpu/drm/i915/selftests/igt_flush_test.c @@ -22,8 +22,6 @@ int igt_flush_test(struct drm_i915_private *i915) if (intel_gt_is_wedged(gt)) ret = -EIO; - cond_resched(); - if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) { pr_err("%pS timed out, cancelling all further testing.\n", __builtin_return_address(0)); diff --git a/drivers/gpu/drm/i915/selftests/intel_memory_region.c b/drivers/gpu/drm/i915/selftests/intel_memory_region.c index d985d9bae2e8..3fce433284bd 100644 --- a/drivers/gpu/drm/i915/selftests/intel_memory_region.c +++ b/drivers/gpu/drm/i915/selftests/intel_memory_region.c @@ -46,8 +46,6 @@ static void close_objects(struct intel_memory_region *mem, i915_gem_object_put(obj); } - cond_resched(); - i915_gem_drain_freed_objects(i915); } @@ -1290,8 +1288,6 @@ static int _perf_memcpy(struct intel_memory_region *src_mr, div64_u64(mul_u32_u32(4 * size, 1000 * 1000 * 1000), t[1] + 2 * t[2] + t[3]) >> 20); - - cond_resched(); } i915_gem_object_unpin_map(dst); diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index 09ee6f6af896..7ee65bad4bb7 100644 --- a/drivers/gpu/drm/tests/drm_buddy_test.c +++ b/drivers/gpu/drm/tests/drm_buddy_test.c @@ -29,7 +29,6 @@ static bool __timeout(unsigned long timeout, const char *fmt, ...) va_list va; if (!signal_pending(current)) { - cond_resched(); if (time_before(jiffies, timeout)) return false; } @@ -485,8 +484,6 @@ static void drm_test_buddy_alloc_smoke(struct kunit *test) if (err || timeout) break; - - cond_resched(); } kfree(order); @@ -681,8 +678,6 @@ static void drm_test_buddy_alloc_range(struct kunit *test) rem -= size; if (!rem) break; - - cond_resched(); } drm_buddy_free_list(&mm, &blocks); diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c index 05d5e7af6d25..7d11740ef599 100644 --- a/drivers/gpu/drm/tests/drm_mm_test.c +++ b/drivers/gpu/drm/tests/drm_mm_test.c @@ -474,8 +474,6 @@ static void drm_test_mm_reserve(struct kunit *test) KUNIT_ASSERT_FALSE(test, __drm_test_mm_reserve(test, count, size - 1)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_reserve(test, count, size)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_reserve(test, count, size + 1)); - - cond_resched(); } } @@ -645,8 +643,6 @@ static int __drm_test_mm_insert(struct kunit *test, unsigned int count, u64 size drm_mm_for_each_node_safe(node, next, &mm) drm_mm_remove_node(node); DRM_MM_BUG_ON(!drm_mm_clean(&mm)); - - cond_resched(); } ret = 0; @@ -671,8 +667,6 @@ static void drm_test_mm_insert(struct kunit *test) KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert(test, count, size - 1, false)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert(test, count, size, false)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert(test, count, size + 1, false)); - - cond_resched(); } } @@ -693,8 +687,6 @@ static void drm_test_mm_replace(struct kunit *test) KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert(test, count, size - 1, true)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert(test, count, size, true)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert(test, count, size + 1, true)); - - cond_resched(); } } @@ -882,8 +874,6 @@ static int __drm_test_mm_insert_range(struct kunit *test, unsigned int count, u6 drm_mm_for_each_node_safe(node, next, &mm) drm_mm_remove_node(node); DRM_MM_BUG_ON(!drm_mm_clean(&mm)); - - cond_resched(); } ret = 0; @@ -942,8 +932,6 @@ static void drm_test_mm_insert_range(struct kunit *test) max / 2, max)); KUNIT_ASSERT_FALSE(test, __drm_test_mm_insert_range(test, count, size, max / 4 + 1, 3 * max / 4 - 1)); - - cond_resched(); } } @@ -1086,8 +1074,6 @@ static void drm_test_mm_align(struct kunit *test) drm_mm_for_each_node_safe(node, next, &mm) drm_mm_remove_node(node); DRM_MM_BUG_ON(!drm_mm_clean(&mm)); - - cond_resched(); } out: @@ -1122,8 +1108,6 @@ static void drm_test_mm_align_pot(struct kunit *test, int max) KUNIT_FAIL(test, "insert failed with alignment=%llx [%d]", align, bit); goto out; } - - cond_resched(); } out: @@ -1465,8 +1449,6 @@ static void drm_test_mm_evict(struct kunit *test) goto out; } } - - cond_resched(); } out: @@ -1547,8 +1529,6 @@ static void drm_test_mm_evict_range(struct kunit *test) goto out; } } - - cond_resched(); } out: @@ -1658,7 +1638,6 @@ static void drm_test_mm_topdown(struct kunit *test) drm_mm_for_each_node_safe(node, next, &mm) drm_mm_remove_node(node); DRM_MM_BUG_ON(!drm_mm_clean(&mm)); - cond_resched(); } out: @@ -1750,7 +1729,6 @@ static void drm_test_mm_bottomup(struct kunit *test) drm_mm_for_each_node_safe(node, next, &mm) drm_mm_remove_node(node); DRM_MM_BUG_ON(!drm_mm_clean(&mm)); - cond_resched(); } out: @@ -1968,8 +1946,6 @@ static void drm_test_mm_color(struct kunit *test) drm_mm_remove_node(node); kfree(node); } - - cond_resched(); } out: @@ -2038,7 +2014,6 @@ static int evict_color(struct kunit *test, struct drm_mm *mm, u64 range_start, } } - cond_resched(); return 0; } @@ -2110,8 +2085,6 @@ static void drm_test_mm_color_evict(struct kunit *test) goto out; } } - - cond_resched(); } out: @@ -2196,8 +2169,6 @@ static void drm_test_mm_color_evict_range(struct kunit *test) goto out; } } - - cond_resched(); } out: From patchwork Tue Nov 7 23:08:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAA2BC4167D for ; Tue, 7 Nov 2023 23:10:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77C5028001E; Tue, 7 Nov 2023 18:10:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 702F9280008; Tue, 7 Nov 2023 18:10:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4689528001E; Tue, 7 Nov 2023 18:10:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 27E84280008 for ; Tue, 7 Nov 2023 18:10:36 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id EB717C0BC2 for ; Tue, 7 Nov 2023 23:10:35 +0000 (UTC) X-FDA: 81432704430.24.709ED26 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf27.hostedemail.com (Postfix) with ESMTP id 860024000F for ; Tue, 7 Nov 2023 23:10:31 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=djlzHqV+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IrHVf0cY; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398631; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=k15juSm04x0tXyAu/KVbvACcXdJqJhxN8ZJRpjJLcno=; b=3Wy0P9j/x1vBTCNxhXW6nqXuVWmUvmDH1At0kx4XHpIDw1lwD7dOK0yzUqDYD8slPnsHf2 9ScazmVRJVA19/zQZL2P0wiSH/TdlwoHLAS1afIKvbYzL3VSh7T5JpA4kAIrBHrlIg2irv I5GWxqQJk9xc+H05IuPj1gVKrQN6wxY= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=djlzHqV+; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IrHVf0cY; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398631; a=rsa-sha256; cv=pass; b=GU0vA1fVSPw3sOEhLuJS353gZXQ766lUq5GxmbvHo3t38eUnPtrI7YKGVMsLPCAT4doyYB 2JaQZctA9GKayYFZAYQSjQja5w17Ta931tET9oVS+Oq+93l1rcuMpxsoQTIa3l1rWAQyr/ tIMhFv63+L70WjEzR38Ocl4qwAAPg6E= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJxpn005003; Tue, 7 Nov 2023 23:10:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=k15juSm04x0tXyAu/KVbvACcXdJqJhxN8ZJRpjJLcno=; b=djlzHqV+4JY4Hf/meVarhHorTwhmJS5R2j7FqLTPd9ML5eZzqDftD2+g0OY0YyNr3Yua 7SWn/CV6BNuAzwKN6la7l5rMUGK6H8mm2sM1BPJrNbRT5ouu8qHRpcFcifordgYcFKwa TURJbHuAElR3k6CTwKVci4c/LP43VzvKKKm8jomqxMK0fS1/1r6Bv5SMreG+88SDtc80 NZvKLVnDkb+fuI/eag4y9ALQjOTVQ8lBlFolggCYnHVktfZJN77jJqEYBjzGRmLC7+V7 VtQX+PH+ERd9eKt+Uag8QgOPmGi10ZMJ/7o4j0K/wwwMiVc5TkytjfKUOj3eJOmCLT4y Ag== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6cj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:10:04 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N1Mwx004090; Tue, 7 Nov 2023 23:10:02 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vvcm9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:10:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g++vlHR0e6HKiaDG5QgeW78ELgON9OYl7ZPWFE+1fBkd3Vc/OhhIdG/C53yjZN9FFGqABW+U/QmuWkDCbXVV8bY9cp7LQ37gBTrc7ihsyyoHVTLUrQyM95P0SgwMuvMKcxnqNmgnGUObJa1lXrf78i60Kj17gUCr4xkrJBSY6+UfbnGr+YZfkDUqezwtSlA4tbg7jRzRlc6JJyk7EH0g5DM++xAGwEYNKc6u9o4Ynb2mI0ejGqZrfkSELULYJ225pTStR5JUI4n6qX3Kfy9T8xCuT7UtylIaZ1I4FpLWkoEfCvP5B07gcMfplKkM7qt5nwzN/e3INE8mG/dZr5mWhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=k15juSm04x0tXyAu/KVbvACcXdJqJhxN8ZJRpjJLcno=; b=n6k5mt5LSdGNddw48nwLAzW8xSSnynIiR2+mMhsoqt4zkWlI2uP5Yytsw2aD8VyzO3D5s0XobEUpmelEKDkguw9G+wbOXWvzh6Xl59LTNvBvleG04P7uj3zQaZPSobAHCgBAaIFm0gnwRPPiIfS40zIEesplyvMYdpX/dBLKCAhjp829kOC01MSbjOELcCXF0vM0Pi3F/CkCsBtQnKNbiQfjuylbiQ7Yeazv9u7WIWNQVjAxVW1mPxEdgNyAFJ93fgD6V5N/M9pvCl58F5W9gFsEA8FaqGgtKlQsTmkR69rw+7x6Ndd808SLH+3aBV1BCrJeHFX1ZIAbNoXA4d5B1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k15juSm04x0tXyAu/KVbvACcXdJqJhxN8ZJRpjJLcno=; b=IrHVf0cYx0GjTtB3KNnwUmjKOj3uCownPNQCBSU/q2pYWFXx350UTPUeCfYN51fEPLVJBQ6TyBO8/uGJc0C56DYqKXO7LQRDE2iPjJqww2Y6lXifJHlqMCpvZnjMin4ZRDxx0NJofO+hawJwtopF00c0GZsctqW6Ej9vhmqVVPQ= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:58 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:58 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , "Michael S. Tsirkin" , Jason Wang , "Jason A. Donenfeld" , Kalle Valo , Larry Finger , Ryder Lee , Loic Poulain , Sergey Ryazanov Subject: [RFC PATCH 84/86] treewide: net: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:20 -0800 Message-Id: <20231107230822.371443-28-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0289.namprd03.prod.outlook.com (2603:10b6:303:b5::24) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: f87f1887-20d9-44fe-a06c-08dbdfe6a968 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Km3ZTcR+tGuSR8x8uMKMEluwl9Hk3KHAowZSxMZrUS+Gorq21LUUyC8yCj6cS+kEEa6pez2yFK69MC0djkI4lLip9qqpJg8W3iCWMWo7AFc5PuxzgdJLMH2JcO8hvYLg+o3UJ60lrKkcZ4FPwNZE3v0DO4OabvLGSX1Gap0Bi9o+o/u2e++7T+PmKUa5wAyQUjX/o343XLU6SpACgcgF4rNaz7ttWaiJhGXHN0t0zyGlApR135ReUlwJGybHxIUkiQorIOAQ2q4E2oyWDIhKFCRYPLufn/9wSH2f9E+iyoT9W5sUWvdujbAoBD+NhTuRw89l/IK/h1vR0O6ooa9iIPhA1Q7c21LuI4RsKGK77f3XVO/rcoj7D35kZbKBnrH6RJN8ByHCihETczTfxod/E8SOSb/yv/1+o/gcgK4aMnzCIQJp5YqWwrvG89kO/h1sDnN+3p+nMmqW+rhPDFFDf/7ocohLfDi6lg2s29w4xn4yqOF+TwAEPt+xinDr75ZrCxNncTvygCuinxZJLIafhKjp3FUmx4xX+M6tO3FLOdk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(66899024)(30864003)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(6666004)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7366002)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Fo/tk6gJUJUZNlUU+v0tzkEJNJBmURfa1lvp2BCtt/u2wd04KRraLXMo3Sh+t8HVQ0pLZ6dsv+FptUAe8pXjfwTxxyw80RBHJrCdSxf/LvbW7GICtLRNSvQPo8Q+9NDvVLJiYaVThLzl17+/e5ozu20UaynofEpnr4DtXKYBDbOm6ayClRHu1MboBEx95rcxAsDdvyZFPLDbOQKT0DthxtEbXv1dGwWrXSFotlrJHh8clTTQwNVC6ABmeRqIrq+gpCENT0S6OdAPjOxcgpBgjfcKJjTIcUS70Ae65w/HTtCPirBYE93FJq3Hh1FOagHET57k2H6qTsm/AUyZuPE0AQDWWl4SxpbdQYWZYLqXllx1IC0pU5EwFkzGoKoR9kSY7sDmg9io349Va/GGVAX51jhaO8cEOYHMwd3WQKb92YPpGoONAvCbNgwh8TS5E8tmzQ35D322Mk6xMfd7WcZJMPLaK7WMWRFM3cdqBF10yCMXHTi7O9nkQ3Y6NCOAo0XaWll6h/nu7a2884HoOVFBn14pPFIogoOQ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7A== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 445F6eUuhC6TasiwbKDXtXI2ol701bZxWgEj9GJJ8gNI8a6bkDsJ5kKPYgYIJ4pw+TGPG2Q8Cl1puF3ygWBMvBQ7H7lPLLKqIe4b8+lHZPefNXnJh7TwFY42YDsveFELplan376gsdV2hXCuoYCICOXB8YLbqnoTHFIdPJkFaXxN/8T73raSmMEsT5Zp64uVG+vVwoK+1b//p5vtHiPRgC9Cl+kfBZ16aldnqPSEPnCryCPa8yT/OplMv/s4EVRqiy4yAQhSia0IzXhYNJ2xsl1x04e77GG1cYSvi15aFaZqEcNTYClv++vo+82RUvvNYm0IU+Ff1j5lLhO/9xaO8FGzxTC98xlwXJrxOlo/wXR7As97A/ZaYcvpb04A5GhEYfZD3w4KYhinmnzp9fqJslShGy7NHHS7u8unmkkIYC91Xq9lA9Imze+5UBC2MOdlY8powlZUGDLIl7QwQLInOuKG0+Vt0c+P/chr4ylKHLadgvlE20/IA6fTc+E5VPaw3w673doLAskHz3+ZojlZWDPXymfT8afDWNC3IyksT7hhZor2nCCmx0aUh4Y27fRNp1whlLdilCBuWT9MEtgfalFrPk8Z1AQIu5bq8MT1c4raWGGnbFkG/RftxcYgEoT7CtF1uAUdbtmYh/7gMPGG0PN30foqy3/ph3DS/TDARwYDuQEU2nQKRHHzA8LpyNp7uzFbd6DxfuMW/Cl3M8VtghpDXK2RhMuOOZR90U53uIarPuuYguqOl2/3HH5AEhIMqWat/e+i68Aj8uT2K+YQq3mXG16Aunl4bRCQ1Mk9TcyTj3V0tAq15JGD/dxTI48BWmDGPv6MawctQpNkBlY7LtQYep3HrZ6LkJ+bKE4MIs38vBwBH+2t20vxe7CFX7i/UGFvABmGXM4jg9vk/JH1R32RHoeMTs07SslETWhXAfk7xjVom0tboX3msMb1p2XfdZ1WwnEmCS27mzbUeYYdZQcWKkU1eD4R3V++tJdzvETW+IxMNLA3ImUUB0+USEp/iDmiXXZYrqtSUr63c0yqME39OCEE/wi7/uCzvKfEPMJc7edq24l6BVbDcZQF+v/nl32Lvud6NxDO1bH9uMu70BYkS1InycvhSAvCxspSAc826gPGDVxHxT5ZW2XuviYjKPIgIr9+XngCPD+1nuUn3OZBqXW0lrYmwrvzfZgnCvFZSKp85+WtI7D6RO8dO9v1ydwlpQAFsYiCO08oay5aVLnouhGSwo1wdsbvMNUh694n3i6AxNU4LPI947JH4r8QJvnWlDC0ilvuJpeMgGEl36VlWuau7stilhhbFjWRVeOzRq1bBU5F8VJWM0bjcC/eF+WG3H7mkXfVGHx0gD40eeN38c6vTB158KPg31W5a+t1PpVCkFd88oduh2UHFEmJZMZmoMxtnVpv6pL+EtEslMdNIZe2tFi3pPEWLPS9mi/d9z2TrVwxG5U7VL1haCJUPRE27XEp3wiudsUx7batdLFuwscGZTlITZFDPjlxqoSbWf3KNxlPvPolItWwD1iSBM+w3H+H83Ii07URfzDLXfJTNJHDdqy7cCBtWwsNyIVx4ydYo2geSrJimKsSsUkQc3cH+S8kgf2N5P8U1huAn44hfIIXBOLNcHrTmNvAR26HtSItNiQuQVJ8fb0QXQG88rGsDuJ+dAb0gnGG28HwNgtq6Blp6ZtPt6UrvtaFg6UJXwzKXrkaSSUaf2Ey5DOSwdUYsuK/KjNH5RPH5JQzdVsaTE5RO+B+XesiwRSPCn+NwaspvwQfOeUkgM/Mk1/Fh71SIcb2 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-1: 6YFP4qr7mLQNpA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f87f1887-20d9-44fe-a06c-08dbdfe6a968 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:58.3193 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tRKLVBoZYFdyqQLA90rMG2SHrhJNZSJgqM2cVeNPrzSQStJ2ddIpbaRMHgotdKbmyFadSyp/M/BPKARiUaJ9eESw51e9HixxyvYvovjX6Rc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: rWHSZnaHdLbSTm-26AfDLNgH3os3dYOa X-Proofpoint-GUID: rWHSZnaHdLbSTm-26AfDLNgH3os3dYOa X-Rspam-User: X-Stat-Signature: b1c57exi3i4fyj4nx4exr6tx4fwtk7jk X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 860024000F X-HE-Tag: 1699398631-483726 X-HE-Meta: U2FsdGVkX1/w+5PIiy+/XNqcDDLS56MpDrpcjKSuK0Wx94A+lWvT3YEm42AHl5nPWUuUqawwz4dFHF9wtXzBih8fMB1QPO35oudRr5uxTzLKjdzuZ1zQ96qCLZ/OwQ8UG8PQBPyXRhNV4hpkWqcIwwyfPURc2BBPsMbXD4LgCF28/KxrxUjUsnZ+NgF0GfEsKaWzwdj0JhOEJuaRhCboJv37mGVpp4zoO6quGZcohUnjtRBtjyWWCKLHTcngr0fwR4uZ4SXPnsEzCj4Ra+YJB3sgPJvF37kD0S9/h/vgB6RD9+cOvFjTGeaNv74Q4f3YxmfrG5yX9IBewVFF4GpsP7Qx6K7QZXDzfXGq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RP01ZuCs5APeG5M69Y0QN7ffgvCx/VLrGeXWgo6PGuQNGv3J/EpwOBrkRReuhULTOhCtztT4zOJSMkwSP1l5BAsGXNQcMqVk6YT+HT4hwo523t8Q630gwPGtcuwvv/iY+0fhJ7CKcsCqYm/ouQMuq4rqu5E4daobEflTlwD1qd1/qTd63OWE9vUBXbWQTd0KIagrOXyH9c+iqt8BCR+smcNqaJcCXv226UDyaRDKO5X2+83x9OV5hFXoIbJqtr7oUeSkIjaDGp1GkRFf3hK3MR0OKr4baQxRM2k2SheDfiCJSeiywUN5u2FFFbxwJyuIDFrGVxbfXrmuZaREanPaRcza/f4DBbL8fY6QZH5rcds48Z/LNaB/nHMsnbEMlakf/vF6EWkJ6TOezcwwHdDZeAiRlAl/UQgP9n559xx+zvHrQ5cPxTFwWO7QXO5Dg+zwUxpgMGfodezDheiBVUInHReApbYReVhoObADeIe+rc/xX8m7f+17KeDK7ehAJZ8EGNv42QCc9O08YhExMmFNbq+dSis+j9zK k421XVrO mMm0xVCE/olXksL7m3Sycl72lE8YcDMvY/CgyZ3iGyrZCdsFm4ANfbzoEd6VLDQQ70CkSZODMWZjW5iZMepePfivdmb1jjKNY2C7+5wP1Zk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Most of the uses here are in set-1 (some right after we give up a lock, causing an explicit preemption check.) There are some uses from set-3 where we busy wait: ex. mlx4/mlx5 drivers, mtk_mdio_busy_wait() and similar. Replaced with cond_resched_stall(). Some of those places, however, have wait-times in milliseconds, so maybe we should just be a timed-wait? Note: there are also a few other cases, where I've replaced by cond_resched_stall() (ex mhi_net_rx_refill_work() or broadcom/b43::lo_measure_feedthrough()) where it doesn't seem like the right thing. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Felix Fietkau Cc: John Crispin Cc: Sean Wang Cc: Mark Lee Cc: Lorenzo Bianconi Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: "Jason A. Donenfeld" Cc: Kalle Valo Cc: Larry Finger Cc: Ryder Lee Cc: Loic Poulain Cc: Sergey Ryazanov Signed-off-by: Ankur Arora --- drivers/net/dummy.c | 1 - drivers/net/ethernet/broadcom/tg3.c | 2 +- drivers/net/ethernet/intel/e1000/e1000_hw.c | 3 --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mellanox/mlx4/catas.c | 2 +- drivers/net/ethernet/mellanox/mlx4/cmd.c | 13 ++++++------- .../net/ethernet/mellanox/mlx4/resource_tracker.c | 9 ++++++++- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 +--- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 3 +-- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 5 ----- drivers/net/ethernet/mellanox/mlxsw/pci.c | 2 -- drivers/net/ethernet/pasemi/pasemi_mac.c | 3 --- .../net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 -- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 1 - drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 1 - .../net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 2 -- drivers/net/ethernet/sfc/falcon/falcon.c | 6 ------ drivers/net/ifb.c | 1 - drivers/net/ipvlan/ipvlan_core.c | 1 - drivers/net/macvlan.c | 2 -- drivers/net/mhi_net.c | 4 ++-- drivers/net/netdevsim/fib.c | 1 - drivers/net/virtio_net.c | 2 -- drivers/net/wireguard/ratelimiter.c | 2 -- drivers/net/wireguard/receive.c | 3 --- drivers/net/wireguard/send.c | 4 ---- drivers/net/wireless/broadcom/b43/lo.c | 6 +++--- drivers/net/wireless/broadcom/b43/pio.c | 1 - drivers/net/wireless/broadcom/b43legacy/phy.c | 5 ----- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 - drivers/net/wireless/cisco/airo.c | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 -- drivers/net/wireless/marvell/mwl8k.c | 2 -- drivers/net/wireless/mediatek/mt76/util.c | 1 - drivers/net/wwan/mhi_wwan_mbim.c | 2 +- drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c | 3 --- drivers/net/xen-netback/netback.c | 1 - drivers/net/xen-netback/rx.c | 2 -- 38 files changed, 25 insertions(+), 84 deletions(-) diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index c4b1b0aa438a..dfebf6387d8a 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -182,7 +182,6 @@ static int __init dummy_init_module(void) for (i = 0; i < numdummies && !err; i++) { err = dummy_init_one(); - cond_resched(); } if (err < 0) __rtnl_link_unregister(&dummy_link_ops); diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 14b311196b8f..ad511d721db3 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -12040,7 +12040,7 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, ret = -EINTR; goto eeprom_done; } - cond_resched(); + cond_resched_stall(); } } eeprom->len += i; diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c index 4542e2bc28e8..22a419bdc6b7 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_hw.c +++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c @@ -3937,7 +3937,6 @@ static s32 e1000_do_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, */ data[i] = e1000_shift_in_ee_bits(hw, 16); e1000_standby_eeprom(hw); - cond_resched(); } } @@ -4088,7 +4087,6 @@ static s32 e1000_write_eeprom_spi(struct e1000_hw *hw, u16 offset, u16 words, return -E1000_ERR_EEPROM; e1000_standby_eeprom(hw); - cond_resched(); /* Send the WRITE ENABLE command (8 bit opcode ) */ e1000_shift_out_ee_bits(hw, EEPROM_WREN_OPCODE_SPI, @@ -4198,7 +4196,6 @@ static s32 e1000_write_eeprom_microwire(struct e1000_hw *hw, u16 offset, /* Recover from write */ e1000_standby_eeprom(hw); - cond_resched(); words_written++; } diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 20afe79f380a..26a9f293ed32 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -309,7 +309,7 @@ static int mtk_mdio_busy_wait(struct mtk_eth *eth) return 0; if (time_after(jiffies, t_start + PHY_IAC_TIMEOUT)) break; - cond_resched(); + cond_resched_stall(); } dev_err(eth->dev, "mdio: MDIO timeout\n"); diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c index 0d8a362c2673..f013eb3fa6f8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/catas.c +++ b/drivers/net/ethernet/mellanox/mlx4/catas.c @@ -148,7 +148,7 @@ static int mlx4_reset_slave(struct mlx4_dev *dev) mlx4_warn(dev, "VF Reset succeed\n"); return 0; } - cond_resched(); + cond_resched_stall(); } mlx4_err(dev, "Fail to send reset over the communication channel\n"); return -ETIMEDOUT; diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index f5b1f8c7834f..259918642b50 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c @@ -312,7 +312,8 @@ static int mlx4_comm_cmd_poll(struct mlx4_dev *dev, u8 cmd, u16 param, end = msecs_to_jiffies(timeout) + jiffies; while (comm_pending(dev) && time_before(jiffies, end)) - cond_resched(); + cond_resched_stall(); + ret_from_pending = comm_pending(dev); if (ret_from_pending) { /* check if the slave is trying to boot in the middle of @@ -387,7 +388,7 @@ static int mlx4_comm_cmd_wait(struct mlx4_dev *dev, u8 vhcr_cmd, if (!(dev->persist->state & MLX4_DEVICE_STATE_INTERNAL_ERROR)) { end = msecs_to_jiffies(timeout) + jiffies; while (comm_pending(dev) && time_before(jiffies, end)) - cond_resched(); + cond_resched_stall(); } goto out; @@ -470,7 +471,7 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param, mlx4_err(dev, "%s:cmd_pending failed\n", __func__); goto out; } - cond_resched(); + cond_resched_stall(); } /* @@ -621,8 +622,7 @@ static int mlx4_cmd_poll(struct mlx4_dev *dev, u64 in_param, u64 *out_param, err = mlx4_internal_err_ret_value(dev, op, op_modifier); goto out; } - - cond_resched(); + cond_resched_stall(); } if (cmd_pending(dev)) { @@ -2324,8 +2324,7 @@ static int sync_toggles(struct mlx4_dev *dev) priv->cmd.comm_toggle = rd_toggle >> 31; return 0; } - - cond_resched(); + cond_resched_stall(); } /* diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 771b92019af1..c8127acea986 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -4649,7 +4649,14 @@ static int move_all_busy(struct mlx4_dev *dev, int slave, if (time_after(jiffies, begin + 5 * HZ)) break; if (busy) - cond_resched(); + /* + * Giving up the spinlock in _move_all_busy() will + * reschedule if needed. + * Add a cpu_relax() here to ensure that we give + * others a chance to acquire the lock. + */ + cpu_relax(); + } while (busy); if (busy) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index c22b0ad0c870..3c5bfa8eda00 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -285,7 +285,7 @@ static void poll_timeout(struct mlx5_cmd_work_ent *ent) ent->ret = 0; return; } - cond_resched(); + cond_resched_stall(); } while (time_before(jiffies, poll_end)); ent->ret = -ETIMEDOUT; @@ -1773,13 +1773,11 @@ void mlx5_cmd_flush(struct mlx5_core_dev *dev) for (i = 0; i < cmd->vars.max_reg_cmds; i++) { while (down_trylock(&cmd->vars.sem)) { mlx5_cmd_trigger_completions(dev); - cond_resched(); } } while (down_trylock(&cmd->vars.pages_sem)) { mlx5_cmd_trigger_completions(dev); - cond_resched(); } /* Unlock cmdif */ diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/core/fw.c index 58f4c0d0fafa..a08ca20ceeda 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fw.c @@ -373,8 +373,7 @@ int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev) do { if (mlx5_get_nic_state(dev) == MLX5_NIC_IFC_DISABLED) break; - - cond_resched(); + cond_resched_stall(); } while (!time_after(jiffies, end)); if (mlx5_get_nic_state(dev) != MLX5_NIC_IFC_DISABLED) { diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index d23f293e285c..1a11f8cd6bb9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -180,7 +180,6 @@ static int mlxsw_i2c_wait_go_bit(struct i2c_client *client, break; } } - cond_resched(); } while ((time_before(jiffies, end)) || (i++ < MLXSW_I2C_RETRY)); if (wait_done) { @@ -361,8 +360,6 @@ mlxsw_i2c_write(struct device *dev, size_t in_mbox_size, u8 *in_mbox, int num, err = i2c_transfer(client->adapter, &write_tran, 1); if (err == 1) break; - - cond_resched(); } while ((time_before(jiffies, end)) || (j++ < MLXSW_I2C_RETRY)); @@ -473,8 +470,6 @@ mlxsw_i2c_cmd(struct device *dev, u16 opcode, u32 in_mod, size_t in_mbox_size, ARRAY_SIZE(read_tran)); if (err == ARRAY_SIZE(read_tran)) break; - - cond_resched(); } while ((time_before(jiffies, end)) || (j++ < MLXSW_I2C_RETRY)); diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c index 51eea1f0529c..8124b27d0eaa 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/pci.c +++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c @@ -1455,7 +1455,6 @@ static int mlxsw_pci_sys_ready_wait(struct mlxsw_pci *mlxsw_pci, val = mlxsw_pci_read32(mlxsw_pci, FW_READY); if ((val & MLXSW_PCI_FW_READY_MASK) == MLXSW_PCI_FW_READY_MAGIC) return 0; - cond_resched(); } while (time_before(jiffies, end)); *p_sys_status = val & MLXSW_PCI_FW_READY_MASK; @@ -1824,7 +1823,6 @@ static int mlxsw_pci_cmd_exec(void *bus_priv, u16 opcode, u8 opcode_mod, *p_status = ctrl >> MLXSW_PCI_CIR_CTRL_STATUS_SHIFT; break; } - cond_resched(); } while (time_before(jiffies, end)); } else { wait_event_timeout(mlxsw_pci->cmd.wait, *p_wait_done, timeout); diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index ed7dd0a04235..3ec6ac758878 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c @@ -1225,7 +1225,6 @@ static void pasemi_mac_pause_txchan(struct pasemi_mac *mac) sta = read_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(txch)); if (!(sta & PAS_DMA_TXCHAN_TCMDSTA_ACT)) break; - cond_resched(); } if (sta & PAS_DMA_TXCHAN_TCMDSTA_ACT) @@ -1246,7 +1245,6 @@ static void pasemi_mac_pause_rxchan(struct pasemi_mac *mac) sta = read_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(rxch)); if (!(sta & PAS_DMA_RXCHAN_CCMDSTA_ACT)) break; - cond_resched(); } if (sta & PAS_DMA_RXCHAN_CCMDSTA_ACT) @@ -1265,7 +1263,6 @@ static void pasemi_mac_pause_rxint(struct pasemi_mac *mac) sta = read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)); if (!(sta & PAS_DMA_RXINT_RCMDSTA_ACT)) break; - cond_resched(); } if (sta & PAS_DMA_RXINT_RCMDSTA_ACT) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c index 35ec9aab3dc7..c26c43a7a83c 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c @@ -326,8 +326,6 @@ static int netxen_wait_rom_done(struct netxen_adapter *adapter) long timeout = 0; long done = 0; - cond_resched(); - while (done == 0) { done = NXRD32(adapter, NETXEN_ROMUSB_GLB_STATUS); done &= 2; diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index c95d56e56c59..359db1fa500f 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -2023,7 +2023,6 @@ static void qlcnic_83xx_exec_template_cmd(struct qlcnic_adapter *p_dev, break; } entry += p_hdr->size; - cond_resched(); } p_dev->ahw->reset.seq_index = index; } diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c index 09f20c794754..110b1ea921e5 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c @@ -295,7 +295,6 @@ static int qlcnic_wait_rom_done(struct qlcnic_adapter *adapter) long done = 0; int err = 0; - cond_resched(); while (done == 0) { done = QLCRD32(adapter, QLCNIC_ROMUSB_GLB_STATUS, &err); done &= 2; diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c index 7ecb3dfe30bd..38b4f56fc464 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c @@ -702,7 +702,6 @@ static u32 qlcnic_read_memory_test_agent(struct qlcnic_adapter *adapter, addr += 16; reg_read -= 16; ret += 16; - cond_resched(); } out: mutex_unlock(&adapter->ahw->mem_lock); @@ -1383,7 +1382,6 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter) buf_offset += entry->hdr.cap_size; entry_offset += entry->hdr.offset; buffer = fw_dump->data + buf_offset; - cond_resched(); } fw_dump->clr = 1; diff --git a/drivers/net/ethernet/sfc/falcon/falcon.c b/drivers/net/ethernet/sfc/falcon/falcon.c index 7a1c9337081b..44cc6e1bef57 100644 --- a/drivers/net/ethernet/sfc/falcon/falcon.c +++ b/drivers/net/ethernet/sfc/falcon/falcon.c @@ -630,8 +630,6 @@ falcon_spi_read(struct ef4_nic *efx, const struct falcon_spi_device *spi, break; pos += block_len; - /* Avoid locking up the system */ - cond_resched(); if (signal_pending(current)) { rc = -EINTR; break; @@ -723,8 +721,6 @@ falcon_spi_write(struct ef4_nic *efx, const struct falcon_spi_device *spi, pos += block_len; - /* Avoid locking up the system */ - cond_resched(); if (signal_pending(current)) { rc = -EINTR; break; @@ -839,8 +835,6 @@ falcon_spi_erase(struct falcon_mtd_partition *part, loff_t start, size_t len) if (memcmp(empty, buffer, block_len)) return -EIO; - /* Avoid locking up the system */ - cond_resched(); if (signal_pending(current)) return -EINTR; } diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 78253ad57b2e..ffd23d862967 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -434,7 +434,6 @@ static int __init ifb_init_module(void) for (i = 0; i < numifbs && !err; i++) { err = ifb_init_one(i); - cond_resched(); } if (err) __rtnl_link_unregister(&ifb_link_ops); diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index c0c49f181367..91a4d1bda8a0 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -292,7 +292,6 @@ void ipvlan_process_multicast(struct work_struct *work) kfree_skb(skb); } dev_put(dev); - cond_resched(); } } diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 02bd201bc7e5..120af3235f4d 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -341,8 +341,6 @@ static void macvlan_process_broadcast(struct work_struct *w) if (src) dev_put(src->dev); consume_skb(skb); - - cond_resched(); } } diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index ae169929a9d8..cbb59a94b083 100644 --- a/drivers/net/mhi_net.c +++ b/drivers/net/mhi_net.c @@ -291,9 +291,9 @@ static void mhi_net_rx_refill_work(struct work_struct *work) } /* Do not hog the CPU if rx buffers are consumed faster than - * queued (unlikely). + * queued (uhlikely). */ - cond_resched(); + cond_resched_stall(); } /* If we're still starved of rx buffers, reschedule later */ diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index a1f91ff8ec56..7b7a37b247d1 100644 --- a/drivers/net/netdevsim/fib.c +++ b/drivers/net/netdevsim/fib.c @@ -1492,7 +1492,6 @@ static void nsim_fib_event_work(struct work_struct *work) nsim_fib_event(fib_event); list_del(&fib_event->list); kfree(fib_event); - cond_resched(); } mutex_unlock(&data->fib_lock); } diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index d67f742fbd4c..d0d7cd077a85 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -4015,7 +4015,6 @@ static void free_unused_bufs(struct virtnet_info *vi) struct virtqueue *vq = vi->sq[i].vq; while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) virtnet_sq_free_unused_buf(vq, buf); - cond_resched(); } for (i = 0; i < vi->max_queue_pairs; i++) { @@ -4023,7 +4022,6 @@ static void free_unused_bufs(struct virtnet_info *vi) while ((buf = virtnet_rq_detach_unused_buf(rq)) != NULL) virtnet_rq_free_unused_buf(rq->vq, buf); - cond_resched(); } } diff --git a/drivers/net/wireguard/ratelimiter.c b/drivers/net/wireguard/ratelimiter.c index dd55e5c26f46..c9c411ec377a 100644 --- a/drivers/net/wireguard/ratelimiter.c +++ b/drivers/net/wireguard/ratelimiter.c @@ -74,8 +74,6 @@ static void wg_ratelimiter_gc_entries(struct work_struct *work) } #endif spin_unlock(&table_lock); - if (likely(work)) - cond_resched(); } if (likely(work)) queue_delayed_work(system_power_efficient_wq, &gc_work, HZ); diff --git a/drivers/net/wireguard/receive.c b/drivers/net/wireguard/receive.c index 0b3f0c843550..8468b041e786 100644 --- a/drivers/net/wireguard/receive.c +++ b/drivers/net/wireguard/receive.c @@ -213,7 +213,6 @@ void wg_packet_handshake_receive_worker(struct work_struct *work) wg_receive_handshake_packet(wg, skb); dev_kfree_skb(skb); atomic_dec(&wg->handshake_queue_len); - cond_resched(); } } @@ -501,8 +500,6 @@ void wg_packet_decrypt_worker(struct work_struct *work) likely(decrypt_packet(skb, PACKET_CB(skb)->keypair)) ? PACKET_STATE_CRYPTED : PACKET_STATE_DEAD; wg_queue_enqueue_per_peer_rx(skb, state); - if (need_resched()) - cond_resched(); } } diff --git a/drivers/net/wireguard/send.c b/drivers/net/wireguard/send.c index 95c853b59e1d..aa122729d802 100644 --- a/drivers/net/wireguard/send.c +++ b/drivers/net/wireguard/send.c @@ -279,8 +279,6 @@ void wg_packet_tx_worker(struct work_struct *work) wg_noise_keypair_put(keypair, false); wg_peer_put(peer); - if (need_resched()) - cond_resched(); } } @@ -303,8 +301,6 @@ void wg_packet_encrypt_worker(struct work_struct *work) } } wg_queue_enqueue_per_peer_tx(first, state); - if (need_resched()) - cond_resched(); } } diff --git a/drivers/net/wireless/broadcom/b43/lo.c b/drivers/net/wireless/broadcom/b43/lo.c index 338b6545a1e7..0fc018a706f3 100644 --- a/drivers/net/wireless/broadcom/b43/lo.c +++ b/drivers/net/wireless/broadcom/b43/lo.c @@ -112,10 +112,10 @@ static u16 lo_measure_feedthrough(struct b43_wldev *dev, udelay(21); feedthrough = b43_phy_read(dev, B43_PHY_LO_LEAKAGE); - /* This is a good place to check if we need to relax a bit, + /* This is a good place to check if we need to relax a bit * as this is the main function called regularly - * in the LO calibration. */ - cond_resched(); + * in the L0 calibration. */ + cond_resched_stall(); return feedthrough; } diff --git a/drivers/net/wireless/broadcom/b43/pio.c b/drivers/net/wireless/broadcom/b43/pio.c index 8c28a9250cd1..44f5920ab6ff 100644 --- a/drivers/net/wireless/broadcom/b43/pio.c +++ b/drivers/net/wireless/broadcom/b43/pio.c @@ -768,7 +768,6 @@ void b43_pio_rx(struct b43_pio_rxqueue *q) stop = !pio_rx_frame(q); if (stop) break; - cond_resched(); if (WARN_ON_ONCE(++count > 10000)) break; } diff --git a/drivers/net/wireless/broadcom/b43legacy/phy.c b/drivers/net/wireless/broadcom/b43legacy/phy.c index c1395e622759..d6d2cf2a38fe 100644 --- a/drivers/net/wireless/broadcom/b43legacy/phy.c +++ b/drivers/net/wireless/broadcom/b43legacy/phy.c @@ -1113,7 +1113,6 @@ static u16 b43legacy_phy_lo_b_r15_loop(struct b43legacy_wldev *dev) ret += b43legacy_phy_read(dev, 0x002C); } local_irq_restore(flags); - cond_resched(); return ret; } @@ -1242,7 +1241,6 @@ u16 b43legacy_phy_lo_g_deviation_subval(struct b43legacy_wldev *dev, } ret = b43legacy_phy_read(dev, 0x002D); local_irq_restore(flags); - cond_resched(); return ret; } @@ -1580,7 +1578,6 @@ void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev) b43legacy_radio_write16(dev, 0x43, i); b43legacy_radio_write16(dev, 0x52, phy->txctl2); udelay(10); - cond_resched(); b43legacy_phy_set_baseband_attenuation(dev, j * 2); @@ -1631,7 +1628,6 @@ void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev) phy->txctl2 | (3/*txctl1*/ << 4)); udelay(10); - cond_resched(); b43legacy_phy_set_baseband_attenuation(dev, j * 2); @@ -1654,7 +1650,6 @@ void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev) b43legacy_phy_write(dev, 0x0812, (r27 << 8) | 0xA2); udelay(2); b43legacy_phy_write(dev, 0x0812, (r27 << 8) | 0xA3); - cond_resched(); } else b43legacy_phy_write(dev, 0x0015, r27 | 0xEFA0); b43legacy_phy_lo_adjust(dev, is_initializing); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 2a90bb24ba77..3cc5476c529d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -3979,7 +3979,6 @@ static int brcmf_cfg80211_sched_scan_stop(struct wiphy *wiphy, static __always_inline void brcmf_delay(u32 ms) { if (ms < 1000 / HZ) { - cond_resched(); mdelay(ms); } else { msleep(ms); diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c index dbd13f7aa3e6..f15a55138dd9 100644 --- a/drivers/net/wireless/cisco/airo.c +++ b/drivers/net/wireless/cisco/airo.c @@ -3988,8 +3988,6 @@ static u16 issuecommand(struct airo_info *ai, Cmd *pCmd, Resp *pRsp, if ((IN4500(ai, COMMAND)) == pCmd->cmd) // PC4500 didn't notice command, try again OUT4500(ai, COMMAND, pCmd->cmd); - if (may_sleep && (max_tries & 255) == 0) - cond_resched(); } if (max_tries == -1) { diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 198933f853c5..9ab63ff0b6aa 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -2309,8 +2309,6 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, } iwl_trans_release_nic_access(trans); - if (resched) - cond_resched(); } else { return -EBUSY; } diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index 13bcb123d122..9b4341da3163 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c @@ -632,7 +632,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) break; } } - cond_resched(); udelay(1); } while (--loops); @@ -795,7 +794,6 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw) break; } - cond_resched(); udelay(1); } while (--loops); diff --git a/drivers/net/wireless/mediatek/mt76/util.c b/drivers/net/wireless/mediatek/mt76/util.c index fc76c66ff1a5..54ffe67d1365 100644 --- a/drivers/net/wireless/mediatek/mt76/util.c +++ b/drivers/net/wireless/mediatek/mt76/util.c @@ -130,7 +130,6 @@ int __mt76_worker_fn(void *ptr) set_bit(MT76_WORKER_RUNNING, &w->state); set_current_state(TASK_RUNNING); w->fn(w); - cond_resched(); clear_bit(MT76_WORKER_RUNNING, &w->state); } diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c index 3f72ae943b29..d8aaf476f25d 100644 --- a/drivers/net/wwan/mhi_wwan_mbim.c +++ b/drivers/net/wwan/mhi_wwan_mbim.c @@ -400,7 +400,7 @@ static void mhi_net_rx_refill_work(struct work_struct *work) /* Do not hog the CPU if rx buffers are consumed faster than * queued (unlikely). */ - cond_resched(); + cond_resched_stall(); } /* If we're still starved of rx buffers, reschedule later */ diff --git a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c index 8dab025a088a..52420b1f3669 100644 --- a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c +++ b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c @@ -423,7 +423,6 @@ static void t7xx_do_tx_hw_push(struct dpmaif_ctrl *dpmaif_ctrl) drb_send_cnt = t7xx_txq_burst_send_skb(txq); if (drb_send_cnt <= 0) { usleep_range(10, 20); - cond_resched(); continue; } @@ -437,8 +436,6 @@ static void t7xx_do_tx_hw_push(struct dpmaif_ctrl *dpmaif_ctrl) t7xx_dpmaif_ul_update_hw_drb_cnt(&dpmaif_ctrl->hw_info, txq->index, drb_send_cnt * DPMAIF_UL_DRB_SIZE_WORD); - - cond_resched(); } while (!t7xx_tx_lists_are_all_empty(dpmaif_ctrl) && !kthread_should_stop() && (dpmaif_ctrl->state == DPMAIF_STATE_PWRON)); } diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 88f760a7cbc3..a540e95ba58f 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1571,7 +1571,6 @@ int xenvif_dealloc_kthread(void *data) break; xenvif_tx_dealloc_action(queue); - cond_resched(); } /* Unmap anything remaining*/ diff --git a/drivers/net/xen-netback/rx.c b/drivers/net/xen-netback/rx.c index 0ba754ebc5ba..bccefaec5312 100644 --- a/drivers/net/xen-netback/rx.c +++ b/drivers/net/xen-netback/rx.c @@ -669,8 +669,6 @@ int xenvif_kthread_guest_rx(void *data) * slots. */ xenvif_rx_queue_drop_expired(queue); - - cond_resched(); } /* Bin any remaining skbs */ From patchwork Tue Nov 7 23:08:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAE16C4167B for ; Tue, 7 Nov 2023 23:10:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0CFA280021; Tue, 7 Nov 2023 18:10:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B95A8280008; Tue, 7 Nov 2023 18:10:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83C3D280021; Tue, 7 Nov 2023 18:10:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 60C3D280008 for ; Tue, 7 Nov 2023 18:10:41 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 17BBC120B83 for ; Tue, 7 Nov 2023 23:10:41 +0000 (UTC) X-FDA: 81432704682.10.50ADC19 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 8E4D6180010 for ; Tue, 7 Nov 2023 23:10:37 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=X5CvKLhH; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KeLPJvRU; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398637; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bnOsTQbfjeCIBrAeCLl3w+O5mhu2+1S+mL/poDVtqmI=; b=XUPOJGJPmGz/+bCIgmc0P0act+HWR6J2bFbaHYX+BXVgU3UyNLVXsARs8/Xb98NynmAWFn KaOLfVsalmbeEDiQUQlJXtX9bO3HQsx1rZC+naRP/SXcYmBATFikQsaOm1A4RlpPCt06gb OaPUDArfbd1SaalJu4CweeJY+IfDLC8= ARC-Authentication-Results: i=2; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=X5CvKLhH; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KeLPJvRU; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf06.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398637; a=rsa-sha256; cv=pass; b=KQyDUTiUDRe3Hj0SeHxtq6q+fHScavFilHkwqTunRrYraPNJmzI+/FwaSd7BrPAbhBCicu vYYqg8sqn1Bf17hFEhBCaXd0lySMo/ciPegMLkJ346pRyAUPF3dNgflOx8i4V6E7JaBP7q H1P5x2/EXKywt/5d9RZCmJoPL7gaWC0= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJl4V004882; Tue, 7 Nov 2023 23:10:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=bnOsTQbfjeCIBrAeCLl3w+O5mhu2+1S+mL/poDVtqmI=; b=X5CvKLhHa6azy/mrK3p8tfydOoyBHYChc/UtaET1mG9AbOGzmslrGKMkKIb7++0oEU58 IZNHZID3o8oVAmXRUw38EBWGBxiKntxxtp61p6EmaUtXps5qtUIUnYUWsjQ1aLc9rohH 6vH7n7gECuEfc+NnCFn0Ji6RO5DuM9P4+ptskwOeqVXa1rAW8K52gkYHT+2IMU96vy1D hyGvsCJqUEf1oXiQN7XKbdAvPI24obKZ5bRkLJurcjfIhpTBvp/9NwUuzZeY8TwbwV34 E7cIl0vCpG8S+ieq5a6AKmb3CFwUmFczHNGIYqeky/K+FZ7iEh/ftbxlqVc3cjLrI2u3 AA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22g6cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:10:10 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2hO8003851; Tue, 7 Nov 2023 23:10:09 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vvcpu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:10:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C20WCijwzwdmdHY5kBE1tTvqFnW6GUl59HNQHaeNb6NVwtfbdaV2CjUapcT6o0Bp4mOXmdl1mf07VNF5ZTfiX3tEHHVthuvduWJQ0eoEaEnbMVv/N4NSgTNXHeSY6D1YwuJWOSQcgsbCFyMleWEN2xc42mD0xxxV5IDBMkNQHuECTNDHKC1Q2s5q+8LnGiPwVu+vyRr9w1aXa10OQurh3xXG9hmHx9tVL2+nz3xeABrwbHwV8w00JWRa58CaGylLf9HVKUbYrxBAP4FzpG3zJkozsVOEu2fPqP7iJQmasJ9b4ZllYa5IBoPmenpTyEURg17A04mAyuGR2S/IfiazBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bnOsTQbfjeCIBrAeCLl3w+O5mhu2+1S+mL/poDVtqmI=; b=FhIhvQRQ3u/4P/pZq7RyQs0Gck9IpYRxh3OKNpg0ER1OwEX/q7yF6RlUOnQOWAJM3f6FBqyGqJv4MJIx+pkRtQp5gq5UmksCWFYxIy9ZDdhYkd2uQI7IGtXOBW1e9kUgx8CxG/08oFQrUYFyO3cfenZ523kdKJFFGchHT+VifJJFZ2afGjllybT+lSIY8/W4li25g2E5GtnN6RQA/pyibyCqKH3So9hyj4F280cBJLVZi6CmGdWDhOXU1UDf5FUM2MgTKoyk9y39xXVt29ri73/ylHelLUhRgd8+MWzA8raw23K5xzwbuVqtEH+XLgPhuo/y2o9RrvNsJjWp0up9bA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bnOsTQbfjeCIBrAeCLl3w+O5mhu2+1S+mL/poDVtqmI=; b=KeLPJvRUDA573NJwgN30v4qzGpQB7X4arhLZ5pXQmO6GewLsb1pXcRKfJl3VAqoQVsgfkEG2dxUC5Qfvc8dJuZZPJK4UeCaV70k0gUtL7hAaEqOvIil0FkIXVQnQt4wGKrDRgHj2/Z/wDRC3nfKFbQfnezzI0oq8SeM99HU94TE= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by BY5PR10MB4369.namprd10.prod.outlook.com (2603:10b6:a03:204::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 23:10:03 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:10:02 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Oded Gabbay , Miguel Ojeda , Jens Axboe , Minchan Kim , Sergey Senozhatsky , Sudip Mukherjee , "Theodore Ts'o" , "Jason A. Donenfeld" , Amit Shah , Gonglei , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , Andi Shyti , Ray Jui , Scott Branden , Chris Packham , Shawn Guo , Sascha Hauer , Junxian Huang , Dmitry Torokhov , Will Deacon , Joerg Roedel , Mauro Carvalho Chehab , Srinivas Pandruvada , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mark Gross , Finn Thain , Michael Schmitz , "James E.J. Bottomley" , "Martin K. Petersen" , Kashyap Desai , Sumit Saxena , Shivasharan S , Mark Brown , Neil Armstrong , Jens Wiklander , Alex Williamson , Helge Deller , David Hildenbrand Subject: [RFC PATCH 85/86] treewide: drivers: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:21 -0800 Message-Id: <20231107230822.371443-29-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0315.namprd03.prod.outlook.com (2603:10b6:303:dd::20) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|BY5PR10MB4369:EE_ X-MS-Office365-Filtering-Correlation-Id: f71382c8-a5f5-4dea-8729-08dbdfe6abd4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IGlZM9iC5FoeqiYdFDc+LzAp70ALbEAy6J2WBOKLXCPckRGSblNaf/KIXUFzdMi2VwRyuc+IyZYrGXW4asz0YKzrOzdMJxi6f1HEos9jH/bikZBhVKbWDGueJbmEc0NN/shZ4ZJwV5F7go3vORq5cAaBCzbcGIaMgu+yCjC5mIK+UTxh3w987dqj5ZiJw/nujxebSsf6GbEG5+OuAQpYz8aJ0DW6sQ0nXuohNRANe1+jpXMa2VrAK5lu2ThPTZktF4GFMwW0prpAttVKCJWV15/sreWnvM+nphr83d77ACUnM9ugkAQXJQXDMJCbZzvEFGD7zIVETWby5Y5Q//y6JHRh5N8bMI93mwPGQONKdlm6X1+81oDG2MLQUcWFXR7GG5Z1UTNgc3VTtE44blSUAvFnh4YEMm+5nQ7RJWnREYEGTNYOG6cBGC8mMWSQiBoWqFptNnk6lf9YBmxMMEYcSPoVy589u3+cXSetHejBbLngJnnLFrAmaT013TwTil/zUD5F3ah237wHdimLlusGuvsn4+kQKBJjV/qWdogRZTU2/ucHGtgW1p1KsJUV0qsoDI7ZDuTNiwbIn6fnkI53Rtq7yzt8vbRlAZOd8kHlRx16vM99RLElXgz55rl6Ugzi X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(396003)(366004)(376002)(39860400002)(346002)(230922051799003)(230273577357003)(230173577357003)(186009)(451199024)(1800799009)(64100799003)(66899024)(66476007)(66946007)(66556008)(54906003)(38100700002)(36756003)(86362001)(103116003)(83380400001)(26005)(66574015)(2616005)(6666004)(1076003)(6512007)(6506007)(6916009)(45080400002)(7336002)(7416002)(7406005)(7366002)(2906002)(316002)(6486002)(966005)(478600001)(8936002)(5660300002)(30864003)(4326008)(8676002)(41300700001)(579004)(559001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bD4upWpOm9g+lPvGFgnHVfdM0CeJ?= =?utf-8?q?lRTXa643pVNsIgyVBG/5qgdoil3vbs3Qim8rIsdqdXm1zF6DrGlxTmtCFARrrCSCx?= =?utf-8?q?0Sd+kyKnsieKjkQvC5hR34qLj6y/mfeaDnMm8rHQVxri02vuYEn4B/r8A1b+FkLiz?= =?utf-8?q?QBcAhZCeUJjnucEm009Jo3IPh+x4DkhTlQFJGVpgAj1SerVZKB5PAMtxzovKj1u9a?= =?utf-8?q?ebhO+B4TSzTY44J6JQ//c5i3PKnqDCjoNXFLkII3Ykjz4us46p3gmjy0mlrNBoXHf?= =?utf-8?q?alVmjNznULZ1Y6FnfNBxmPltZC8xBX0T/x+9qFGR49tPn/rxnOjXbIF6rvLBcL0ag?= =?utf-8?q?SmToD8wLRQJZ8yQUC518g5OPqcaZQB1MKyBuEc7RTtjdAtk0rXrvUYap0pL7CN7JX?= =?utf-8?q?hbaMEBCeA5BMhYyIun/fhuutGQTpWdCA23AljVVJKCE3cQWGD3u8dBdya9u9XCviR?= =?utf-8?q?mLgkkFcnDs9TyovFej4fy1BjSrbKRF2dSfBjFlb3jDrwSmy9Xo0Izq4pw3vSET0Q3?= =?utf-8?q?AwxURnKGpmBu/KeehiY2QIuJv6vp+0q2gN6w6Wo1/OsnrmFGB7/vbHlkedkguRsY5?= =?utf-8?q?lC6NZEwDJZMhqZHGFwwltVEREhL0ziFzmzvgg589G0wsyF9+SfEEtXjideW9UAp5T?= =?utf-8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3f5EPIa4Fst1rn56l3jasIAY6Mq1mllovsKHtKU3uVTnR4UlBD5zh9oEq6JNbV2?= =?utf-8?q?s4qSlEF8iVLcZT0dbwpUoXgYUtoJk?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-1: jxRLUkvkNaTELVcAIFtjfoddys3ZnzNW+VAD4eP9Kb2tp03N4ZxXBknFwHxphj1RAejV/Sbnf5pB85yr4bMd/xHaKo9Ab4qmXnBsyddZm9EL1XawvtQTKCzDtSRKHREYSHBwhBaYlDE7s6VJsRqGRdHFm+1YTZ1prX/nfuugQDEWt1b63QyjFLcEOpTu5BybMxrJzWTZYnsJnkCLWYDaBdDlxiRr7TxdKuucz5DW89aYgE395Q2KTIQ/ X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f71382c8-a5f5-4dea-8729-08dbdfe6abd4 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:10:02.6678 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bOrPVwLWrBdgGibc5ZVKru25iResNf7qVJwFa4avaDgxflczKz/0CwrpJr0BssO0P15N251XVfYWfh3mbBF5qajgXrQF9m7o2k7z6X/S7J4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4369 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-ORIG-GUID: 19DkSrY6hSvgdGYU7F6M7I9O8_jRJTDT X-Proofpoint-GUID: 19DkSrY6hSvgdGYU7F6M7I9O8_jRJTDT X-Rspamd-Queue-Id: 8E4D6180010 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: ag4ix7imn9rthaxokrq4jyctd56te44f X-HE-Tag: 1699398637-427561 X-HE-Meta: U2FsdGVkX1/CBRPDqJofRUmCmSDGrxriC858+esOFpXu+Up/CJ7Bz/bIzALnNbhKsVbiIcweQmtOi8NmSXdky3wYMkYkLFiEqE1I9yFwcD1EBlcSlEtMLSZNr8hI/pLC0FoaEJchbqbFUV1+LldulrzNcprpg8OZ7PKtPOgxMOkiAO60hfqMyNBlsAZksHeDDmWn4tX1Fyfu8htfX9zUFAgHHPRSYPymWkgRwBBJ+MBuRcnf3XHrHwdoMb43xLL3WxwjLkjvhDfRl7hAk9b9hFYqFua1L9vfTBV4zNIk5F5FTLT7/aUyyh7eqsjOXGZ9LiutO2JaK8nRvHRUrOOYmAoTs63oq/nR1Xp8fKEF4LZVAr1a3E2hhR2Q3H7Wmsy2LOrXlFREqDQ5IQ7Tpgtunm7CEUzwmFJYuPFk28om34zO+s5LMiiO/9QepSX836yaH5t39SeYLs9dp2RA5NN10NwzFY10TR6eyKUkZ+6s1JDFfBrU9gxUypQ7uegDJ684A5dzUPBLN2/0RxzV9WVTLZH0QdsFzDsUbuKvnUwRalCVB0rU9qEaXxXAraIJe0uRHAyBlNUGMEizYQl003IueLMO68BwcAc8gLgD1RoSW1qSE7A/YaZdNfMPmRMd0D3MlS4rD9YiMjshuFKDXleT93NpEayjGBB1LtpceJT29IOUpLN3RODkvDs1CA390kIhFbYagsKs+F/GIdQmHkhbwowL2qJyRB21q7DpA5jRi7b6dZRB9ZAEupdyj4CPlU/yhT7MYOEueI9eQy7e67wngXfY3fOi6buyrK0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y6AvfGKkFDoQqGDybxf+dpUMODL+583QZQUshorixTvRcak+1VNmLqacKz7Eo+QBFHjUPvdFY8tN/s7cI0rfkwbnkR9Rlo0Vmxl3G8 EPRtH3Iy Lc9+gPFRI2LP3rgdXbn7UXI+LLS0RcBb0xm12UXwHgjEWpjqHqIAsZ6KTM9alwgKNG+ho9gftfGct+0ZoSfiM9axtQYUrTklXoOFPobGUXpbacUjY+muTA98kJ532NNm0jqnu+V+zVsIg6Bwt2Ek87PAeOU0ae6B8nUVjgIeUKeinyEcIsG/jKd2K//AjZt+v0FptPUAHH3dTQk5X9K9JJ04lAGgxgiPM4ZCyQAW6I5ekcd3fajOAP6obnt1oiMeYT+EKj5SpgKVrrWygV6EKZIDU+BwjYn+wwX+xlSr309bP+LcPGc9XMew6EcJTfs5fvgwssBj+30= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. The cond_resched() calls here are all kinds. Those from set-1 or set-2 are quite straight-forward to handle. There are quite a few from set-3, where as noted above, we use cond_resched() as if it were a amulent. Which I supppose it is, in that it wards off softlockup or RCU splats. Those are now cond_resched_stall(), but in most cases, given that the timeouts are in milliseconds, they could be easily timed waits. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Oded Gabbay Cc: Miguel Ojeda Cc: Jens Axboe Cc: Minchan Kim Cc: Sergey Senozhatsky Cc: Sudip Mukherjee Cc: "Theodore Ts'o" Cc: "Jason A. Donenfeld" Cc: Amit Shah Cc: Gonglei Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: "David S. Miller" Cc: Davidlohr Bueso Cc: Jonathan Cameron Cc: Dave Jiang Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Dan Williams Cc: Sumit Semwal Cc: "Christian König" Cc: Andi Shyti Cc: Ray Jui Cc: Scott Branden Cc: Chris Packham Cc: Shawn Guo Cc: Sascha Hauer Cc: Junxian Huang Cc: Dmitry Torokhov Cc: Will Deacon Cc: Joerg Roedel Cc: Mauro Carvalho Chehab Cc: Srinivas Pandruvada Cc: Hans de Goede Cc: "Ilpo Järvinen" Cc: Mark Gross Cc: Finn Thain Cc: Michael Schmitz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: Mark Brown Cc: Neil Armstrong Cc: Jens Wiklander Cc: Alex Williamson Cc: Helge Deller Cc: David Hildenbrand Signed-off-by: Ankur Arora Reviewed-by: Chris Packham --- drivers/accel/ivpu/ivpu_drv.c | 2 -- drivers/accel/ivpu/ivpu_gem.c | 1 - drivers/accel/ivpu/ivpu_pm.c | 8 ++++++-- drivers/accel/qaic/qaic_data.c | 2 -- drivers/auxdisplay/charlcd.c | 11 ----------- drivers/base/power/domain.c | 1 - drivers/block/aoe/aoecmd.c | 3 +-- drivers/block/brd.c | 1 - drivers/block/drbd/drbd_bitmap.c | 4 ---- drivers/block/drbd/drbd_debugfs.c | 1 - drivers/block/loop.c | 3 --- drivers/block/xen-blkback/blkback.c | 3 --- drivers/block/zram/zram_drv.c | 2 -- drivers/bluetooth/virtio_bt.c | 1 - drivers/char/hw_random/arm_smccc_trng.c | 1 - drivers/char/lp.c | 2 -- drivers/char/mem.c | 4 ---- drivers/char/mwave/3780i.c | 4 +--- drivers/char/ppdev.c | 4 ---- drivers/char/random.c | 2 -- drivers/char/virtio_console.c | 1 - drivers/crypto/virtio/virtio_crypto_core.c | 1 - drivers/cxl/pci.c | 1 - drivers/dma-buf/selftest.c | 1 - drivers/dma-buf/st-dma-fence-chain.c | 1 - drivers/fsi/fsi-sbefifo.c | 14 ++++++++++++-- drivers/i2c/busses/i2c-bcm-iproc.c | 9 +++++++-- drivers/i2c/busses/i2c-highlander.c | 9 +++++++-- drivers/i2c/busses/i2c-ibm_iic.c | 11 +++++++---- drivers/i2c/busses/i2c-mpc.c | 2 +- drivers/i2c/busses/i2c-mxs.c | 9 ++++++++- drivers/i2c/busses/scx200_acb.c | 9 +++++++-- drivers/infiniband/core/umem.c | 1 - drivers/infiniband/hw/hfi1/driver.c | 1 - drivers/infiniband/hw/hfi1/firmware.c | 2 +- drivers/infiniband/hw/hfi1/init.c | 1 - drivers/infiniband/hw/hfi1/ruc.c | 1 - drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 ++++- drivers/infiniband/hw/qib/qib_init.c | 1 - drivers/infiniband/sw/rxe/rxe_qp.c | 3 +-- drivers/infiniband/sw/rxe/rxe_task.c | 4 ++-- drivers/input/evdev.c | 1 - drivers/input/keyboard/clps711x-keypad.c | 2 +- drivers/input/misc/uinput.c | 1 - drivers/input/mousedev.c | 1 - drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 -- drivers/media/i2c/vpx3220.c | 3 --- drivers/media/pci/cobalt/cobalt-i2c.c | 4 ++-- drivers/misc/bcm-vk/bcm_vk_dev.c | 3 +-- drivers/misc/bcm-vk/bcm_vk_msg.c | 3 +-- drivers/misc/genwqe/card_base.c | 3 +-- drivers/misc/genwqe/card_ddcb.c | 6 ------ drivers/misc/genwqe/card_dev.c | 2 -- drivers/misc/vmw_balloon.c | 4 ---- drivers/mmc/host/mmc_spi.c | 3 --- drivers/nvdimm/btt.c | 2 -- drivers/nvme/target/zns.c | 2 -- drivers/parport/parport_ip32.c | 1 - drivers/parport/parport_pc.c | 4 ---- drivers/pci/pci-sysfs.c | 1 - drivers/pci/proc.c | 1 - .../x86/intel/speed_select_if/isst_if_mbox_pci.c | 4 ++-- drivers/s390/cio/css.c | 8 -------- drivers/scsi/NCR5380.c | 2 -- drivers/scsi/megaraid.c | 1 - drivers/scsi/qedi/qedi_main.c | 1 - drivers/scsi/qla2xxx/qla_nx.c | 2 -- drivers/scsi/qla2xxx/qla_sup.c | 5 ----- drivers/scsi/qla4xxx/ql4_nx.c | 1 - drivers/scsi/xen-scsifront.c | 2 +- drivers/spi/spi-lantiq-ssc.c | 3 +-- drivers/spi/spi-meson-spifc.c | 2 +- drivers/spi/spi.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 -- drivers/tee/optee/ffa_abi.c | 1 - drivers/tee/optee/smc_abi.c | 1 - drivers/tty/hvc/hvc_console.c | 6 ++---- drivers/tty/tty_buffer.c | 3 --- drivers/tty/tty_io.c | 1 - drivers/usb/gadget/udc/max3420_udc.c | 1 - drivers/usb/host/max3421-hcd.c | 2 +- drivers/usb/host/xen-hcd.c | 2 +- drivers/vfio/vfio_iommu_spapr_tce.c | 2 -- drivers/vfio/vfio_iommu_type1.c | 7 ------- drivers/vhost/vhost.c | 1 - drivers/video/console/vgacon.c | 4 ---- drivers/virtio/virtio_mem.c | 8 -------- 88 files changed, 82 insertions(+), 190 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c index 7e9359611d69..479801a1d961 100644 --- a/drivers/accel/ivpu/ivpu_drv.c +++ b/drivers/accel/ivpu/ivpu_drv.c @@ -314,8 +314,6 @@ static int ivpu_wait_for_ready(struct ivpu_device *vdev) ret = ivpu_ipc_receive(vdev, &cons, &ipc_hdr, NULL, 0); if (ret != -ETIMEDOUT || time_after_eq(jiffies, timeout)) break; - - cond_resched(); } ivpu_ipc_consumer_del(vdev, &cons); diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c index d09f13b35902..06e4c1eceae8 100644 --- a/drivers/accel/ivpu/ivpu_gem.c +++ b/drivers/accel/ivpu/ivpu_gem.c @@ -156,7 +156,6 @@ static int __must_check internal_alloc_pages_locked(struct ivpu_bo *bo) ret = -ENOMEM; goto err_free_pages; } - cond_resched(); } bo->pages = pages; diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index ffff2496e8e8..aa9cc4a1903c 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/ivpu/ivpu_pm.c @@ -105,7 +105,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work) retry: ret = pci_try_reset_function(to_pci_dev(vdev->drm.dev)); if (ret == -EAGAIN && !drm_dev_is_unplugged(&vdev->drm)) { - cond_resched(); + cond_resched_stall(); goto retry; } @@ -146,7 +146,11 @@ int ivpu_pm_suspend_cb(struct device *dev) timeout = jiffies + msecs_to_jiffies(vdev->timeout.tdr); while (!ivpu_hw_is_idle(vdev)) { - cond_resched(); + + /* The timeout is in thousands of msecs. Maybe this should be a + * timed wait instead? + */ + cond_resched_stall(); if (time_after_eq(jiffies, timeout)) { ivpu_err(vdev, "Failed to enter idle on system suspend\n"); return -EBUSY; diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c index f4b06792c6f1..d06fd9d765f2 100644 --- a/drivers/accel/qaic/qaic_data.c +++ b/drivers/accel/qaic/qaic_data.c @@ -1516,7 +1516,6 @@ void irq_polling_work(struct work_struct *work) return; } - cond_resched(); usleep_range(datapath_poll_interval_us, 2 * datapath_poll_interval_us); } } @@ -1547,7 +1546,6 @@ irqreturn_t dbc_irq_threaded_fn(int irq, void *data) if (!event_count) { event_count = NUM_EVENTS; - cond_resched(); } /* diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 6d309e4971b6..cb1213e292f4 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -470,14 +470,6 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf, char c; for (; count-- > 0; (*ppos)++, tmp++) { - if (((count + 1) & 0x1f) == 0) { - /* - * charlcd_write() is invoked as a VFS->write() callback - * and as such it is always invoked from preemptible - * context and may sleep. - */ - cond_resched(); - } if (get_user(c, tmp)) return -EFAULT; @@ -539,9 +531,6 @@ static void charlcd_puts(struct charlcd *lcd, const char *s) int count = strlen(s); for (; count-- > 0; tmp++) { - if (((count + 1) & 0x1f) == 0) - cond_resched(); - charlcd_write_char(lcd, *tmp); } } diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 5cb2023581d4..6b77bdfe1de9 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2696,7 +2696,6 @@ static void genpd_dev_pm_detach(struct device *dev, bool power_off) break; mdelay(i); - cond_resched(); } if (ret < 0) { diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index d7317425be51..d212b0df661f 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -1235,8 +1235,7 @@ kthread(void *vp) if (!more) { schedule(); remove_wait_queue(k->waitq, &wait); - } else - cond_resched(); + } } while (!kthread_should_stop()); complete(&k->rendez); /* tell spawner we're stopping */ return 0; diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 970bd6ff38c4..be1577cd4d4b 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -111,7 +111,6 @@ static void brd_free_pages(struct brd_device *brd) xa_for_each(&brd->brd_pages, idx, page) { __free_page(page); - cond_resched(); } xa_destroy(&brd->brd_pages); diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 85ca000a0564..f12de044c540 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -563,7 +563,6 @@ static unsigned long bm_count_bits(struct drbd_bitmap *b) p_addr = __bm_map_pidx(b, idx); bits += bitmap_weight(p_addr, BITS_PER_PAGE); __bm_unmap(p_addr); - cond_resched(); } /* last (or only) page */ last_word = ((b->bm_bits - 1) & BITS_PER_PAGE_MASK) >> LN2_BPL; @@ -1118,7 +1117,6 @@ static int bm_rw(struct drbd_device *device, const unsigned int flags, unsigned atomic_inc(&ctx->in_flight); bm_page_io_async(ctx, i); ++count; - cond_resched(); } } else if (flags & BM_AIO_WRITE_HINTED) { /* ASSERT: BM_AIO_WRITE_ALL_PAGES is not set. */ @@ -1158,7 +1156,6 @@ static int bm_rw(struct drbd_device *device, const unsigned int flags, unsigned atomic_inc(&ctx->in_flight); bm_page_io_async(ctx, i); ++count; - cond_resched(); } } @@ -1545,7 +1542,6 @@ void _drbd_bm_set_bits(struct drbd_device *device, const unsigned long s, const for (page_nr = first_page; page_nr < last_page; page_nr++) { bm_set_full_words_within_one_page(device->bitmap, page_nr, first_word, last_word); spin_unlock_irq(&b->bm_lock); - cond_resched(); first_word = 0; spin_lock_irq(&b->bm_lock); } diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c index 12460b584bcb..48a85882dfc4 100644 --- a/drivers/block/drbd/drbd_debugfs.c +++ b/drivers/block/drbd/drbd_debugfs.c @@ -318,7 +318,6 @@ static void seq_print_resource_transfer_log_summary(struct seq_file *m, struct drbd_request *req_next; kref_get(&req->kref); spin_unlock_irq(&resource->req_lock); - cond_resched(); spin_lock_irq(&resource->req_lock); req_next = list_next_entry(req, tl_requests); if (kref_put(&req->kref, drbd_req_destroy)) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 9f2d412fc560..0ea0d37b2f28 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -271,7 +271,6 @@ static int lo_write_simple(struct loop_device *lo, struct request *rq, ret = lo_write_bvec(lo->lo_backing_file, &bvec, &pos); if (ret < 0) break; - cond_resched(); } return ret; @@ -300,7 +299,6 @@ static int lo_read_simple(struct loop_device *lo, struct request *rq, zero_fill_bio(bio); break; } - cond_resched(); } return 0; @@ -1948,7 +1946,6 @@ static void loop_process_work(struct loop_worker *worker, spin_unlock_irq(&lo->lo_work_lock); loop_handle_cmd(cmd); - cond_resched(); spin_lock_irq(&lo->lo_work_lock); } diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index c362f4ad80ab..9bcef880df30 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -1259,9 +1259,6 @@ __do_block_io_op(struct xen_blkif_ring *ring, unsigned int *eoi_flags) goto done; break; } - - /* Yield point for this unbounded loop. */ - cond_resched(); } done: return more_to_do; diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 06673c6ca255..b1f9312e7905 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1819,8 +1819,6 @@ static ssize_t recompress_store(struct device *dev, ret = err; break; } - - cond_resched(); } __free_page(page); diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c index 2ac70b560c46..c570c45d1480 100644 --- a/drivers/bluetooth/virtio_bt.c +++ b/drivers/bluetooth/virtio_bt.c @@ -79,7 +79,6 @@ static int virtbt_close_vdev(struct virtio_bluetooth *vbt) while ((skb = virtqueue_detach_unused_buf(vq))) kfree_skb(skb); - cond_resched(); } return 0; diff --git a/drivers/char/hw_random/arm_smccc_trng.c b/drivers/char/hw_random/arm_smccc_trng.c index 7e954341b09f..f60d101920e4 100644 --- a/drivers/char/hw_random/arm_smccc_trng.c +++ b/drivers/char/hw_random/arm_smccc_trng.c @@ -84,7 +84,6 @@ static int smccc_trng_read(struct hwrng *rng, void *data, size_t max, bool wait) tries++; if (tries >= SMCCC_TRNG_MAX_TRIES) return copied; - cond_resched(); break; default: return -EIO; diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 2f171d14b9b5..1d58105112b5 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -478,8 +478,6 @@ static ssize_t lp_read(struct file *file, char __user *buf, retval = -ERESTARTSYS; break; } - - cond_resched(); } parport_negotiate(lp_table[minor].dev->port, IEEE1284_MODE_COMPAT); out: diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 1052b0f2d4cf..6f97ab7004d9 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -92,8 +92,6 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size) static inline bool should_stop_iteration(void) { - if (need_resched()) - cond_resched(); return signal_pending(current); } @@ -497,7 +495,6 @@ static ssize_t read_iter_zero(struct kiocb *iocb, struct iov_iter *iter) continue; if (iocb->ki_flags & IOCB_NOWAIT) return written ? written : -EAGAIN; - cond_resched(); } return written; } @@ -523,7 +520,6 @@ static ssize_t read_zero(struct file *file, char __user *buf, if (signal_pending(current)) break; - cond_resched(); } return cleared; diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index 4a8937f80570..927a1cca1168 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c @@ -51,7 +51,7 @@ #include #include #include -#include /* cond_resched() */ +#include #include #include @@ -64,9 +64,7 @@ static DEFINE_SPINLOCK(dsp_lock); static void PaceMsaAccess(unsigned short usDspBaseIO) { - cond_resched(); udelay(100); - cond_resched(); } unsigned short dsp3780I_ReadMsaCfg(unsigned short usDspBaseIO, diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index 4c188e9e477c..7463228ba9bf 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -176,8 +176,6 @@ static ssize_t pp_read(struct file *file, char __user *buf, size_t count, bytes_read = -ERESTARTSYS; break; } - - cond_resched(); } parport_set_timeout(pp->pdev, pp->default_inactivity); @@ -256,8 +254,6 @@ static ssize_t pp_write(struct file *file, const char __user *buf, if (signal_pending(current)) break; - - cond_resched(); } parport_set_timeout(pp->pdev, pp->default_inactivity); diff --git a/drivers/char/random.c b/drivers/char/random.c index 3cb37760dfec..9e25f3a5c83d 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -457,7 +457,6 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter) if (ret % PAGE_SIZE == 0) { if (signal_pending(current)) break; - cond_resched(); } } @@ -1417,7 +1416,6 @@ static ssize_t write_pool_user(struct iov_iter *iter) if (ret % PAGE_SIZE == 0) { if (signal_pending(current)) break; - cond_resched(); } } diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 680d1ef2a217..1f8da0a71ce9 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1936,7 +1936,6 @@ static void remove_vqs(struct ports_device *portdev) flush_bufs(vq, true); while ((buf = virtqueue_detach_unused_buf(vq))) free_buf(buf, true); - cond_resched(); } portdev->vdev->config->del_vqs(portdev->vdev); kfree(portdev->in_vqs); diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c index 43a0838d31ff..3842915ea743 100644 --- a/drivers/crypto/virtio/virtio_crypto_core.c +++ b/drivers/crypto/virtio/virtio_crypto_core.c @@ -490,7 +490,6 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto) kfree(vc_req->req_data); kfree(vc_req->sgs); } - cond_resched(); } } diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 44a21ab7add5..2c7e670d9a91 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -634,7 +634,6 @@ static irqreturn_t cxl_event_thread(int irq, void *id) if (!status) break; cxl_mem_get_event_records(mds, status); - cond_resched(); } while (status); return IRQ_HANDLED; diff --git a/drivers/dma-buf/selftest.c b/drivers/dma-buf/selftest.c index c60b6944b4bd..ddf94da3d412 100644 --- a/drivers/dma-buf/selftest.c +++ b/drivers/dma-buf/selftest.c @@ -93,7 +93,6 @@ __subtests(const char *caller, const struct subtest *st, int count, void *data) int err; for (; count--; st++) { - cond_resched(); if (signal_pending(current)) return -EINTR; diff --git a/drivers/dma-buf/st-dma-fence-chain.c b/drivers/dma-buf/st-dma-fence-chain.c index c0979c8049b5..cde69fadb4f4 100644 --- a/drivers/dma-buf/st-dma-fence-chain.c +++ b/drivers/dma-buf/st-dma-fence-chain.c @@ -431,7 +431,6 @@ static int __find_race(void *arg) signal: seqno = get_random_u32_below(data->fc.chain_length - 1); dma_fence_signal(data->fc.fences[seqno]); - cond_resched(); } if (atomic_dec_and_test(&data->children)) diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c index 0a98517f3959..0e58ebae0130 100644 --- a/drivers/fsi/fsi-sbefifo.c +++ b/drivers/fsi/fsi-sbefifo.c @@ -372,7 +372,13 @@ static int sbefifo_request_reset(struct sbefifo *sbefifo) return 0; } - cond_resched(); + /* + * Use cond_resched_stall() to avoid spinning in a + * tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should be a timed or event wait? + */ + cond_resched_stall(); } dev_err(dev, "FIFO reset timed out\n"); @@ -462,7 +468,11 @@ static int sbefifo_wait(struct sbefifo *sbefifo, bool up, end_time = jiffies + timeout; while (!time_after(jiffies, end_time)) { - cond_resched(); + /* + * As above, maybe this should be a timed or event wait? + */ + cond_resched_stall(); + rc = sbefifo_regr(sbefifo, addr, &sts); if (rc < 0) { dev_err(dev, "FSI error %d reading status register\n", rc); diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 51aab662050b..6efe6d18d859 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -788,8 +788,13 @@ static int bcm_iproc_i2c_xfer_wait(struct bcm_iproc_i2c_dev *iproc_i2c, break; } - cpu_relax(); - cond_resched(); + /* + * Use cond_resched_stall() to avoid spinning in a + * tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should be a timed or event wait? + */ + cond_resched_stall(); } while (!iproc_i2c->xfer_is_done); } diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c index 7922bc917c33..06eed7e1c4f3 100644 --- a/drivers/i2c/busses/i2c-highlander.c +++ b/drivers/i2c/busses/i2c-highlander.c @@ -187,8 +187,13 @@ static void highlander_i2c_poll(struct highlander_i2c_dev *dev) if (time_after(jiffies, timeout)) break; - cpu_relax(); - cond_resched(); + /* + * Use cond_resched_stall() to avoid spinning in a + * tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should be a timed or event wait? + */ + cond_resched_stall(); } dev_err(dev->dev, "polling timed out\n"); diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 408820319ec4..b486d8b9636b 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -207,9 +207,6 @@ static void iic_dev_reset(struct ibm_iic_private* dev) udelay(10); dc ^= DIRCNTL_SCC; out_8(&iic->directcntl, dc); - - /* be nice */ - cond_resched(); } } @@ -231,7 +228,13 @@ static int iic_dc_wait(volatile struct iic_regs __iomem *iic, u8 mask) while ((in_8(&iic->directcntl) & mask) != mask){ if (unlikely(time_after(jiffies, x))) return -1; - cond_resched(); + /* + * Use cond_resched_stall() to avoid spinning in a + * tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should be a timed or event wait? + */ + cond_resched_stall(); } return 0; } diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index e4e4995ab224..82d24523c6a7 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c @@ -712,7 +712,7 @@ static int mpc_i2c_execute_msg(struct mpc_i2c *i2c) } return -EIO; } - cond_resched(); + cond_resched_stall(); } return i2c->rc; diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 36def0a9c95c..d4d69cd7ef46 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c @@ -310,7 +310,14 @@ static int mxs_i2c_pio_wait_xfer_end(struct mxs_i2c_dev *i2c) return -ENXIO; if (time_after(jiffies, timeout)) return -ETIMEDOUT; - cond_resched(); + + /* + * Use cond_resched_stall() to avoid spinning in a + * tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should be a timed or event wait? + */ + cond_resched_stall(); } return 0; diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 83c1db610f54..5646130c003f 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -232,8 +232,13 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface) } if (time_after(jiffies, timeout)) break; - cpu_relax(); - cond_resched(); + /* + * Use cond_resched_stall() to avoid spinning in a + * tight loop. + * Though, given that the timeout is in milliseconds, + * maybe this should timeout or event wait? + */ + cond_resched_stall(); } dev_err(&iface->adapter.dev, "timeout in state %s\n", diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index f9ab671c8eda..6b4d3d3193a2 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -215,7 +215,6 @@ struct ib_umem *ib_umem_get(struct ib_device *device, unsigned long addr, gup_flags |= FOLL_WRITE; while (npages) { - cond_resched(); pinned = pin_user_pages_fast(cur_base, min_t(unsigned long, npages, PAGE_SIZE / diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c index f4492fa407e0..b390eb169a60 100644 --- a/drivers/infiniband/hw/hfi1/driver.c +++ b/drivers/infiniband/hw/hfi1/driver.c @@ -668,7 +668,6 @@ static noinline int max_packet_exceeded(struct hfi1_packet *packet, int thread) if ((packet->numpkt & (MAX_PKT_RECV_THREAD - 1)) == 0) /* allow defered processing */ process_rcv_qp_work(packet); - cond_resched(); return RCV_PKT_OK; } else { this_cpu_inc(*packet->rcd->dd->rcv_limit); diff --git a/drivers/infiniband/hw/hfi1/firmware.c b/drivers/infiniband/hw/hfi1/firmware.c index 0c0cef5b1e0e..717ccb0e69b4 100644 --- a/drivers/infiniband/hw/hfi1/firmware.c +++ b/drivers/infiniband/hw/hfi1/firmware.c @@ -560,7 +560,7 @@ static void __obtain_firmware(struct hfi1_devdata *dd) * something that holds for 30 seconds. If we do that twice * in a row it triggers task blocked warning. */ - cond_resched(); + cond_resched_stall(); if (fw_8051_load) dispose_one_firmware(&fw_8051); if (fw_fabric_serdes_load) diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index 6de37c5d7d27..3b5abcd72660 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -1958,7 +1958,6 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) for (idx = 0; idx < rcd->egrbufs.alloced; idx++) { hfi1_put_tid(dd, rcd->eager_base + idx, PT_EAGER, rcd->egrbufs.rcvtids[idx].dma, order); - cond_resched(); } return 0; diff --git a/drivers/infiniband/hw/hfi1/ruc.c b/drivers/infiniband/hw/hfi1/ruc.c index b0151b7293f5..35fa25211351 100644 --- a/drivers/infiniband/hw/hfi1/ruc.c +++ b/drivers/infiniband/hw/hfi1/ruc.c @@ -459,7 +459,6 @@ bool hfi1_schedule_send_yield(struct rvt_qp *qp, struct hfi1_pkt_state *ps, return true; } - cond_resched(); this_cpu_inc(*ps->ppd->dd->send_schedule); ps->timeout = jiffies + ps->timeout_int; } diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index d82daff2d9bd..c76610422255 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -2985,7 +2985,10 @@ static int v2_wait_mbox_complete(struct hns_roce_dev *hr_dev, u32 timeout, return -ETIMEDOUT; } - cond_resched(); + /* The timeout is in hundreds of msecs. Maybe this should be a + * timed wait instead? + */ + cond_resched_stall(); ret = -EBUSY; } diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index 33667becd52b..0d8e0abb5090 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -1674,7 +1674,6 @@ int qib_setup_eagerbufs(struct qib_ctxtdata *rcd) RCVHQ_RCV_TYPE_EAGER, pa); pa += egrsize; } - cond_resched(); /* don't hog the cpu */ } return 0; diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c index 28e379c108bc..b0fb5a993bae 100644 --- a/drivers/infiniband/sw/rxe/rxe_qp.c +++ b/drivers/infiniband/sw/rxe/rxe_qp.c @@ -778,12 +778,11 @@ int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask) rxe_av_to_attr(&qp->alt_av, &attr->alt_ah_attr); /* Applications that get this state typically spin on it. - * Yield the processor + * Giving up the spinlock will reschedule if needed. */ spin_lock_irqsave(&qp->state_lock, flags); if (qp->attr.sq_draining) { spin_unlock_irqrestore(&qp->state_lock, flags); - cond_resched(); } else { spin_unlock_irqrestore(&qp->state_lock, flags); } diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c index 1501120d4f52..692f57fdfdc9 100644 --- a/drivers/infiniband/sw/rxe/rxe_task.c +++ b/drivers/infiniband/sw/rxe/rxe_task.c @@ -227,7 +227,7 @@ void rxe_cleanup_task(struct rxe_task *task) * for the previously scheduled tasks to finish. */ while (!is_done(task)) - cond_resched(); + cond_resched_stall(); spin_lock_irqsave(&task->lock, flags); task->state = TASK_STATE_INVALID; @@ -289,7 +289,7 @@ void rxe_disable_task(struct rxe_task *task) spin_unlock_irqrestore(&task->lock, flags); while (!is_done(task)) - cond_resched(); + cond_resched_stall(); spin_lock_irqsave(&task->lock, flags); task->state = TASK_STATE_DRAINED; diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 95f90699d2b1..effbc991be41 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -529,7 +529,6 @@ static ssize_t evdev_write(struct file *file, const char __user *buffer, input_inject_event(&evdev->handle, event.type, event.code, event.value); - cond_resched(); } out: diff --git a/drivers/input/keyboard/clps711x-keypad.c b/drivers/input/keyboard/clps711x-keypad.c index 4c1a3e611edd..e02f6d35ed51 100644 --- a/drivers/input/keyboard/clps711x-keypad.c +++ b/drivers/input/keyboard/clps711x-keypad.c @@ -52,7 +52,7 @@ static void clps711x_keypad_poll(struct input_dev *input) /* Read twice for protection against fluctuations */ do { state = gpiod_get_value_cansleep(data->desc); - cond_resched(); + cond_resched_stall(); state1 = gpiod_get_value_cansleep(data->desc); } while (state != state1); diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index d98212d55108..a6c95916ac7e 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -624,7 +624,6 @@ static ssize_t uinput_inject_events(struct uinput_device *udev, input_event(udev->dev, ev.type, ev.code, ev.value); bytes += input_event_size(); - cond_resched(); } return bytes; diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 505c562a5daa..7ce9ffca6d12 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -704,7 +704,6 @@ static ssize_t mousedev_write(struct file *file, const char __user *buffer, mousedev_generate_response(client, c); spin_unlock_irq(&client->packet_lock); - cond_resched(); } kill_fasync(&client->fasync, SIGIO, POLL_IN); diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index bd0a596f9863..8f517a80a831 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -1582,8 +1582,6 @@ static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev) for (i = 0; i < ARRAY_SIZE(evt); ++i) dev_info(smmu->dev, "\t0x%016llx\n", (unsigned long long)evt[i]); - - cond_resched(); } /* diff --git a/drivers/media/i2c/vpx3220.c b/drivers/media/i2c/vpx3220.c index 1eaae886f217..c673dba9a592 100644 --- a/drivers/media/i2c/vpx3220.c +++ b/drivers/media/i2c/vpx3220.c @@ -81,9 +81,6 @@ static int vpx3220_fp_status(struct v4l2_subdev *sd) return 0; udelay(10); - - if (need_resched()) - cond_resched(); } return -1; diff --git a/drivers/media/pci/cobalt/cobalt-i2c.c b/drivers/media/pci/cobalt/cobalt-i2c.c index 10c9ee33f73e..2a11dd49559a 100644 --- a/drivers/media/pci/cobalt/cobalt-i2c.c +++ b/drivers/media/pci/cobalt/cobalt-i2c.c @@ -140,7 +140,7 @@ static int cobalt_tx_bytes(struct cobalt_i2c_regs __iomem *regs, while (status & M00018_SR_BITMAP_TIP_MSK) { if (time_after(jiffies, start_time + adap->timeout)) return -ETIMEDOUT; - cond_resched(); + cond_resched_stall(); status = ioread8(®s->cr_sr); } @@ -199,7 +199,7 @@ static int cobalt_rx_bytes(struct cobalt_i2c_regs __iomem *regs, while (status & M00018_SR_BITMAP_TIP_MSK) { if (time_after(jiffies, start_time + adap->timeout)) return -ETIMEDOUT; - cond_resched(); + cond_resched_stall(); status = ioread8(®s->cr_sr); } diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c index d4a96137728d..d262e4c5b4e3 100644 --- a/drivers/misc/bcm-vk/bcm_vk_dev.c +++ b/drivers/misc/bcm-vk/bcm_vk_dev.c @@ -364,8 +364,7 @@ static inline int bcm_vk_wait(struct bcm_vk *vk, enum pci_barno bar, if (time_after(jiffies, timeout)) return -ETIMEDOUT; - cpu_relax(); - cond_resched(); + cond_resched_stall(); } while ((rd_val & mask) != value); return 0; diff --git a/drivers/misc/bcm-vk/bcm_vk_msg.c b/drivers/misc/bcm-vk/bcm_vk_msg.c index e17d81231ea6..1b5a71382e76 100644 --- a/drivers/misc/bcm-vk/bcm_vk_msg.c +++ b/drivers/misc/bcm-vk/bcm_vk_msg.c @@ -1295,8 +1295,7 @@ int bcm_vk_release(struct inode *inode, struct file *p_file) break; } dma_cnt = atomic_read(&ctx->dma_cnt); - cpu_relax(); - cond_resched(); + cond_resched_stall(); } while (dma_cnt); dev_dbg(dev, "Draining for [fd-%d] pid %d - delay %d ms\n", ctx->idx, pid, jiffies_to_msecs(jiffies - start_time)); diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c index 224a7e97cbea..03ed8a426d49 100644 --- a/drivers/misc/genwqe/card_base.c +++ b/drivers/misc/genwqe/card_base.c @@ -1004,7 +1004,6 @@ static int genwqe_health_thread(void *data) } cd->last_gfir = gfir; - cond_resched(); } return 0; @@ -1041,7 +1040,7 @@ static int genwqe_health_thread(void *data) /* genwqe_bus_reset failed(). Now wait for genwqe_remove(). */ while (!kthread_should_stop()) - cond_resched(); + cond_resched_stall(); return -EIO; } diff --git a/drivers/misc/genwqe/card_ddcb.c b/drivers/misc/genwqe/card_ddcb.c index 500b1feaf1f6..793faf4bdc06 100644 --- a/drivers/misc/genwqe/card_ddcb.c +++ b/drivers/misc/genwqe/card_ddcb.c @@ -1207,12 +1207,6 @@ static int genwqe_card_thread(void *data) } if (should_stop) break; - - /* - * Avoid soft lockups on heavy loads; we do not want - * to disable our interrupts. - */ - cond_resched(); } return 0; } diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index 55fc5b80e649..ec1112dc7d5a 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c @@ -1322,7 +1322,6 @@ static int genwqe_inform_and_stop_processes(struct genwqe_dev *cd) genwqe_open_files(cd); i++) { dev_info(&pci_dev->dev, " %d sec ...", i); - cond_resched(); msleep(1000); } @@ -1340,7 +1339,6 @@ static int genwqe_inform_and_stop_processes(struct genwqe_dev *cd) genwqe_open_files(cd); i++) { dev_warn(&pci_dev->dev, " %d sec ...", i); - cond_resched(); msleep(1000); } } diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 9ce9b9e0e9b6..7cf977e70935 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -1158,8 +1158,6 @@ static void vmballoon_inflate(struct vmballoon *b) vmballoon_split_refused_pages(&ctl); ctl.page_size--; } - - cond_resched(); } /* @@ -1282,8 +1280,6 @@ static unsigned long vmballoon_deflate(struct vmballoon *b, uint64_t n_frames, break; ctl.page_size++; } - - cond_resched(); } return deflated_frames; diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index cc333ad67cac..e05d99437547 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c @@ -192,9 +192,6 @@ static int mmc_spi_skip(struct mmc_spi_host *host, unsigned long timeout, if (cp[i] != byte) return cp[i]; } - - /* If we need long timeouts, we may release the CPU */ - cond_resched(); } while (time_is_after_jiffies(start + timeout)); return -ETIMEDOUT; } diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index d5593b0dc700..5e97555db441 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -435,7 +435,6 @@ static int btt_map_init(struct arena_info *arena) offset += size; mapsize -= size; - cond_resched(); } free: @@ -479,7 +478,6 @@ static int btt_log_init(struct arena_info *arena) offset += size; logsize -= size; - cond_resched(); } for (i = 0; i < arena->nfree; i++) { diff --git a/drivers/nvme/target/zns.c b/drivers/nvme/target/zns.c index 5b5c1e481722..12eee9a87e42 100644 --- a/drivers/nvme/target/zns.c +++ b/drivers/nvme/target/zns.c @@ -432,8 +432,6 @@ static u16 nvmet_bdev_zone_mgmt_emulate_all(struct nvmet_req *req) zsa_req_op(req->cmd->zms.zsa) | REQ_SYNC, GFP_KERNEL); bio->bi_iter.bi_sector = sector; - /* This may take a while, so be nice to others */ - cond_resched(); } sector += bdev_zone_sectors(bdev); } diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c index 0919ed99ba94..8c52008bbb7c 100644 --- a/drivers/parport/parport_ip32.c +++ b/drivers/parport/parport_ip32.c @@ -1238,7 +1238,6 @@ static size_t parport_ip32_epp_write_addr(struct parport *p, const void *buf, static unsigned int parport_ip32_fifo_wait_break(struct parport *p, unsigned long expire) { - cond_resched(); if (time_after(jiffies, expire)) { pr_debug1(PPIP32 "%s: FIFO write timed out\n", p->name); return 1; diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 1f236aaf7867..a482b5b835ec 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -663,8 +663,6 @@ static size_t parport_pc_fifo_write_block_dma(struct parport *port, } /* Is serviceIntr set? */ if (!(inb(ECONTROL(port)) & (1<<2))) { - cond_resched(); - goto false_alarm; } @@ -674,8 +672,6 @@ static size_t parport_pc_fifo_write_block_dma(struct parport *port, count = get_dma_residue(port->dma); release_dma_lock(dmaflag); - cond_resched(); /* Can't yield the port. */ - /* Anyone else waiting for the port? */ if (port->waithead) { printk(KERN_DEBUG "Somebody wants the port\n"); diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index d9eede2dbc0e..e7bb03c3c148 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -719,7 +719,6 @@ static ssize_t pci_read_config(struct file *filp, struct kobject *kobj, data[off - init_off + 3] = (val >> 24) & 0xff; off += 4; size -= 4; - cond_resched(); } if (size >= 2) { diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index f967709082d6..7d3cd2201e64 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -83,7 +83,6 @@ static ssize_t proc_bus_pci_read(struct file *file, char __user *buf, buf += 4; pos += 4; cnt -= 4; - cond_resched(); } if (cnt >= 2) { diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_pci.c b/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_pci.c index df1fc6c719f3..c202ae0d0656 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_pci.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_pci.c @@ -56,7 +56,7 @@ static int isst_if_mbox_cmd(struct pci_dev *pdev, ret = -EBUSY; tm_delta = ktime_us_delta(ktime_get(), tm); if (tm_delta > OS_MAILBOX_TIMEOUT_AVG_US) - cond_resched(); + cond_resched_stall(); continue; } ret = 0; @@ -95,7 +95,7 @@ static int isst_if_mbox_cmd(struct pci_dev *pdev, ret = -EBUSY; tm_delta = ktime_us_delta(ktime_get(), tm); if (tm_delta > OS_MAILBOX_TIMEOUT_AVG_US) - cond_resched(); + cond_resched_stall(); continue; } diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 3ff46fc694f8..6122a4a057fa 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -659,11 +659,6 @@ static int slow_eval_known_fn(struct subchannel *sch, void *data) rc = css_evaluate_known_subchannel(sch, 1); if (rc == -EAGAIN) css_schedule_eval(sch->schid); - /* - * The loop might take long time for platforms with lots of - * known devices. Allow scheduling here. - */ - cond_resched(); } return 0; } @@ -695,9 +690,6 @@ static int slow_eval_unknown_fn(struct subchannel_id schid, void *data) default: rc = 0; } - /* Allow scheduling here since the containing loop might - * take a while. */ - cond_resched(); } return rc; } diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index cea3a79d538e..40e66afd77cf 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -738,8 +738,6 @@ static void NCR5380_main(struct work_struct *work) maybe_release_dma_irq(instance); } spin_unlock_irq(&hostdata->lock); - if (!done) - cond_resched(); } while (!done); } diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index e92f1a73cc9b..675504f8149a 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -1696,7 +1696,6 @@ __mega_busywait_mbox (adapter_t *adapter) if (!mbox->m_in.busy) return 0; udelay(100); - cond_resched(); } return -1; /* give up after 1 second */ } diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index cd0180b1f5b9..9e2596199458 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -1943,7 +1943,6 @@ static int qedi_percpu_io_thread(void *arg) if (!work->is_solicited) kfree(work); } - cond_resched(); spin_lock_irqsave(&p->p_work_lock, flags); } set_current_state(TASK_INTERRUPTIBLE); diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index 6dfb70edb9a6..e1a5c2dbe134 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -972,7 +972,6 @@ qla82xx_flash_wait_write_finish(struct qla_hw_data *ha) if (ret < 0 || (val & 1) == 0) return ret; udelay(10); - cond_resched(); } ql_log(ql_log_warn, vha, 0xb00d, "Timeout reached waiting for write finish.\n"); @@ -1037,7 +1036,6 @@ ql82xx_rom_lock_d(struct qla_hw_data *ha) while ((qla82xx_rom_lock(ha) != 0) && (loops < 50000)) { udelay(100); - cond_resched(); loops++; } if (loops >= 50000) { diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index c092a6b1ced4..40fc521ba89f 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -463,7 +463,6 @@ qla24xx_read_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t *data) return QLA_SUCCESS; } udelay(10); - cond_resched(); } ql_log(ql_log_warn, pci_get_drvdata(ha->pdev), 0x7090, @@ -505,7 +504,6 @@ qla24xx_write_flash_dword(struct qla_hw_data *ha, uint32_t addr, uint32_t data) if (!(rd_reg_dword(®->flash_addr) & FARX_DATA_FLAG)) return QLA_SUCCESS; udelay(10); - cond_resched(); } ql_log(ql_log_warn, pci_get_drvdata(ha->pdev), 0x7090, @@ -2151,7 +2149,6 @@ qla2x00_poll_flash(struct qla_hw_data *ha, uint32_t addr, uint8_t poll_data, } udelay(10); barrier(); - cond_resched(); } return status; } @@ -2301,7 +2298,6 @@ qla2x00_read_flash_data(struct qla_hw_data *ha, uint8_t *tmp_buf, if (saddr % 100) udelay(10); *tmp_buf = data; - cond_resched(); } } @@ -2589,7 +2585,6 @@ qla2x00_write_optrom_data(struct scsi_qla_host *vha, void *buf, rval = QLA_FUNCTION_FAILED; break; } - cond_resched(); } } while (0); qla2x00_flash_disable(ha); diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 47adff9f0506..e40a525a2202 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -3643,7 +3643,6 @@ qla4_82xx_read_flash_data(struct scsi_qla_host *ha, uint32_t *dwptr, int loops = 0; while ((qla4_82xx_rom_lock(ha) != 0) && (loops < 50000)) { udelay(100); - cond_resched(); loops++; } if (loops >= 50000) { diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 9ec55ddc1204..6f8e0c69f832 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -442,7 +442,7 @@ static irqreturn_t scsifront_irq_fn(int irq, void *dev_id) while (scsifront_cmd_done(info, &eoiflag)) /* Yield point for this unbounded loop. */ - cond_resched(); + cond_resched_stall(); xen_irq_lateeoi(irq, eoiflag); diff --git a/drivers/spi/spi-lantiq-ssc.c b/drivers/spi/spi-lantiq-ssc.c index 938e9e577e4f..151b381fc098 100644 --- a/drivers/spi/spi-lantiq-ssc.c +++ b/drivers/spi/spi-lantiq-ssc.c @@ -775,8 +775,7 @@ static void lantiq_ssc_bussy_work(struct work_struct *work) spi_finalize_current_transfer(spi->host); return; } - - cond_resched(); + cond_resched_stall(); } while (!time_after_eq(jiffies, end)); if (spi->host->cur_msg) diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c index 06626f406f68..ff3550ebb22b 100644 --- a/drivers/spi/spi-meson-spifc.c +++ b/drivers/spi/spi-meson-spifc.c @@ -100,7 +100,7 @@ static int meson_spifc_wait_ready(struct meson_spifc *spifc) regmap_read(spifc->regmap, REG_SLAVE, &data); if (data & SLAVE_TRST_DONE) return 0; - cond_resched(); + cond_resched_stall(); } while (!time_after(jiffies, deadline)); return -ETIMEDOUT; diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 8d6304cb061e..3ddbfa9babdc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1808,7 +1808,7 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread) /* Prod the scheduler in case transfer_one() was busy waiting */ if (!ret) - cond_resched(); + cond_resched_stall(); return; out_unlock: diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 985683767a40..2a2ebdf12a45 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -3775,7 +3775,7 @@ unsigned int send_beacon(struct adapter *padapter) issue_beacon(padapter, 100); issue++; do { - cond_resched(); + cond_resched_stall(); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok)); poll++; } while ((poll%10) != 0 && false == bxmitok && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c index a392d5b4caf2..c263fbc71201 100644 --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c @@ -576,8 +576,6 @@ void LPS_Leave_check(struct adapter *padapter) bReady = false; start_time = jiffies; - cond_resched(); - while (1) { mutex_lock(&pwrpriv->lock); diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index 0828240f27e6..49f55c051d71 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -581,7 +581,6 @@ static int optee_ffa_yielding_call(struct tee_context *ctx, * filled in by ffa_mem_ops->sync_send_receive() returning * above. */ - cond_resched(); optee_handle_ffa_rpc(ctx, optee, data->data1, rpc_arg); cmd = OPTEE_FFA_YIELDING_CALL_RESUME; data->data0 = cmd; diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c index d5b28fd35d66..86e01454422c 100644 --- a/drivers/tee/optee/smc_abi.c +++ b/drivers/tee/optee/smc_abi.c @@ -943,7 +943,6 @@ static int optee_smc_do_call_with_arg(struct tee_context *ctx, */ optee_cq_wait_for_completion(&optee->call_queue, &w); } else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) { - cond_resched(); param.a0 = res.a0; param.a1 = res.a1; param.a2 = res.a2; diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 959fae54ca39..11bb4204b78d 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -538,7 +538,6 @@ static ssize_t hvc_write(struct tty_struct *tty, const u8 *buf, size_t count) if (count) { if (hp->n_outbuf > 0) hvc_flush(hp); - cond_resched(); } } @@ -653,7 +652,7 @@ static int __hvc_poll(struct hvc_struct *hp, bool may_sleep) if (may_sleep) { spin_unlock_irqrestore(&hp->lock, flags); - cond_resched(); + spin_lock_irqsave(&hp->lock, flags); } @@ -725,7 +724,7 @@ static int __hvc_poll(struct hvc_struct *hp, bool may_sleep) if (may_sleep) { /* Keep going until the flip is full */ spin_unlock_irqrestore(&hp->lock, flags); - cond_resched(); + spin_lock_irqsave(&hp->lock, flags); goto read_again; } else if (read_total < HVC_ATOMIC_READ_MAX) { @@ -802,7 +801,6 @@ static int khvcd(void *unused) mutex_lock(&hvc_structs_mutex); list_for_each_entry(hp, &hvc_structs, next) { poll_mask |= __hvc_poll(hp, true); - cond_resched(); } mutex_unlock(&hvc_structs_mutex); } else diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 5f6d0cf67571..c70d695ed69d 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -498,9 +498,6 @@ static void flush_to_ldisc(struct work_struct *work) lookahead_bufs(port, head); if (!rcvd) break; - - if (need_resched()) - cond_resched(); } mutex_unlock(&buf->lock); diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 8a94e5a43c6d..0221ff17a4bf 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1032,7 +1032,6 @@ static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, ret = -ERESTARTSYS; if (signal_pending(current)) break; - cond_resched(); } if (written) { tty_update_time(tty, true); diff --git a/drivers/usb/gadget/udc/max3420_udc.c b/drivers/usb/gadget/udc/max3420_udc.c index 2d57786d3db7..b9051c341b10 100644 --- a/drivers/usb/gadget/udc/max3420_udc.c +++ b/drivers/usb/gadget/udc/max3420_udc.c @@ -451,7 +451,6 @@ static void __max3420_start(struct max3420_udc *udc) val = spi_rd8(udc, MAX3420_REG_USBIRQ); if (val & OSCOKIRQ) break; - cond_resched(); } /* Enable PULL-UP only when Vbus detected */ diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index d152d72de126..64f12f5113a2 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c @@ -1294,7 +1294,7 @@ max3421_reset_hcd(struct usb_hcd *hcd) "timed out waiting for oscillator OK signal"); return 1; } - cond_resched(); + cond_resched_stall(); } /* diff --git a/drivers/usb/host/xen-hcd.c b/drivers/usb/host/xen-hcd.c index 46fdab940092..0b78f371c30a 100644 --- a/drivers/usb/host/xen-hcd.c +++ b/drivers/usb/host/xen-hcd.c @@ -1086,7 +1086,7 @@ static irqreturn_t xenhcd_int(int irq, void *dev_id) while (xenhcd_urb_request_done(info, &eoiflag) | xenhcd_conn_notify(info, &eoiflag)) /* Yield point for this unbounded loop. */ - cond_resched(); + cond_resched_stall(); xen_irq_lateeoi(irq, eoiflag); return IRQ_HANDLED; diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c index a94ec6225d31..523c6685818d 100644 --- a/drivers/vfio/vfio_iommu_spapr_tce.c +++ b/drivers/vfio/vfio_iommu_spapr_tce.c @@ -457,8 +457,6 @@ static int tce_iommu_clear(struct tce_container *container, } } - cond_resched(); - direction = DMA_NONE; oldhpa = 0; ret = iommu_tce_xchg_no_kill(container->mm, tbl, entry, &oldhpa, diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index eacd6ec04de5..afc9724051ce 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -962,8 +962,6 @@ static long vfio_sync_unpin(struct vfio_dma *dma, struct vfio_domain *domain, kfree(entry); } - cond_resched(); - return unlocked; } @@ -1029,7 +1027,6 @@ static size_t unmap_unpin_slow(struct vfio_domain *domain, unmapped >> PAGE_SHIFT, false); *iova += unmapped; - cond_resched(); } return unmapped; } @@ -1062,7 +1059,6 @@ static long vfio_unmap_unpin(struct vfio_iommu *iommu, struct vfio_dma *dma, list_for_each_entry_continue(d, &iommu->domain_list, next) { iommu_unmap(d->domain, dma->iova, dma->size); - cond_resched(); } iommu_iotlb_gather_init(&iotlb_gather); @@ -1439,8 +1435,6 @@ static int vfio_iommu_map(struct vfio_iommu *iommu, dma_addr_t iova, GFP_KERNEL); if (ret) goto unwind; - - cond_resched(); } return 0; @@ -1448,7 +1442,6 @@ static int vfio_iommu_map(struct vfio_iommu *iommu, dma_addr_t iova, unwind: list_for_each_entry_continue_reverse(d, &iommu->domain_list, next) { iommu_unmap(d->domain, iova, npage << PAGE_SHIFT); - cond_resched(); } return ret; diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index e0c181ad17e3..8939be49c47d 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -410,7 +410,6 @@ static bool vhost_worker(void *data) kcov_remote_start_common(worker->kcov_handle); work->fn(work); kcov_remote_stop(); - cond_resched(); } } diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 7ad047bcae17..e17e7937e11d 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -870,12 +870,10 @@ static int vgacon_do_font_op(struct vgastate *state, char *arg, int set, if (set) for (i = 0; i < cmapsz; i++) { vga_writeb(arg[i], charmap + i); - cond_resched(); } else for (i = 0; i < cmapsz; i++) { arg[i] = vga_readb(charmap + i); - cond_resched(); } /* @@ -889,12 +887,10 @@ static int vgacon_do_font_op(struct vgastate *state, char *arg, int set, if (set) for (i = 0; i < cmapsz; i++) { vga_writeb(arg[i], charmap + i); - cond_resched(); } else for (i = 0; i < cmapsz; i++) { arg[i] = vga_readb(charmap + i); - cond_resched(); } } } diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index fa5226c198cc..c9c66aac49ca 100644 --- a/drivers/virtio/virtio_mem.c +++ b/drivers/virtio/virtio_mem.c @@ -1754,7 +1754,6 @@ static int virtio_mem_sbm_plug_request(struct virtio_mem *vm, uint64_t diff) rc = virtio_mem_sbm_plug_any_sb(vm, mb_id, &nb_sb); if (rc || !nb_sb) goto out_unlock; - cond_resched(); } } @@ -1772,7 +1771,6 @@ static int virtio_mem_sbm_plug_request(struct virtio_mem *vm, uint64_t diff) rc = virtio_mem_sbm_plug_and_add_mb(vm, mb_id, &nb_sb); if (rc || !nb_sb) return rc; - cond_resched(); } /* Try to prepare, plug and add new blocks */ @@ -1786,7 +1784,6 @@ static int virtio_mem_sbm_plug_request(struct virtio_mem *vm, uint64_t diff) rc = virtio_mem_sbm_plug_and_add_mb(vm, mb_id, &nb_sb); if (rc) return rc; - cond_resched(); } return 0; @@ -1869,7 +1866,6 @@ static int virtio_mem_bbm_plug_request(struct virtio_mem *vm, uint64_t diff) nb_bb--; if (rc || !nb_bb) return rc; - cond_resched(); } /* Try to prepare, plug and add new big blocks */ @@ -1885,7 +1881,6 @@ static int virtio_mem_bbm_plug_request(struct virtio_mem *vm, uint64_t diff) nb_bb--; if (rc) return rc; - cond_resched(); } return 0; @@ -2107,7 +2102,6 @@ static int virtio_mem_sbm_unplug_request(struct virtio_mem *vm, uint64_t diff) if (rc || !nb_sb) goto out_unlock; mutex_unlock(&vm->hotplug_mutex); - cond_resched(); mutex_lock(&vm->hotplug_mutex); } if (!unplug_online && i == 1) { @@ -2250,8 +2244,6 @@ static int virtio_mem_bbm_unplug_request(struct virtio_mem *vm, uint64_t diff) */ for (i = 0; i < 3; i++) { virtio_mem_bbm_for_each_bb_rev(vm, bb_id, VIRTIO_MEM_BBM_BB_ADDED) { - cond_resched(); - /* * As we're holding no locks, these checks are racy, * but we don't care. From patchwork Tue Nov 7 23:08:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CB38C4332F for ; Tue, 7 Nov 2023 23:10:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD148280020; Tue, 7 Nov 2023 18:10:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A32EE280008; Tue, 7 Nov 2023 18:10:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C273280020; Tue, 7 Nov 2023 18:10:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 600A0280008 for ; Tue, 7 Nov 2023 18:10:39 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 41232160B26 for ; Tue, 7 Nov 2023 23:10:39 +0000 (UTC) X-FDA: 81432704598.27.FE80C96 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf11.hostedemail.com (Postfix) with ESMTP id E170840004 for ; Tue, 7 Nov 2023 23:10:35 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=4T4vUd9I; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JBwQTfVZ; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398636; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NIc4sxhZAhOKoo2VZ88Y6fbqmbPRGrl3S9o4NPWPM9I=; b=n1wuciGLxZPUnC8zfUZDJGX9+iYfFdpHLAJWrs2Vq1QFWbnhHkfDZzckycuv17w2RX+KM5 criY+vq6Os/boxATOl9f5D34jnnuDct98qCP1l6VoSPx7EEMIkYJPfJ2T/Gmmyj23KC7EI gA8gW8dEBMDNWXT4rGNXZR5GqAj9Ye0= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398636; a=rsa-sha256; cv=pass; b=1F5KqDY3CfCJFkWFMYvk9epFcRLSpbzr+pAIixEihtPRrgKoCMtNh/NEA/rJ9iM75UX3qa QlLBtLf01MQFFF0Ej+PF5pg3Q1CZrdsC6l9HQEgBMhIHpZlMhq70QtTL4DRXrz0ebNqfEC aEVSapJqclACKn+EqADvVytdmj177Xw= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=4T4vUd9I; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JBwQTfVZ; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf11.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJfbZ014961; Tue, 7 Nov 2023 23:10:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=NIc4sxhZAhOKoo2VZ88Y6fbqmbPRGrl3S9o4NPWPM9I=; b=4T4vUd9IxkPvU94N34Z3y7eAp+4dKg9RrMRxJFgN140I+didke9VvhBbwtsDtiu6Wz8a vFtIPyywoikwVV0cmVWH7/b4C8eh+EenjCmP8MmHd4M58ZDuQF8b6pGhXevKqEltWnpC Wrkfv+//+E1eKjiidpvIKq69kHk5vp/7iwuj25bzaxrrbYuYQ4jFus4NMH/izBkKSENO mCyC8kF68konlv023lNx/LZoRG/CQpTqF88uFQX3DxzweD5Hrf6XJp3lJ0DawXuZ7Ffr 6as40jf8jYoaWFAAYW3qy45Ko9qUKiR0Bdiza3oMwSHj7WwqC4tOPsnNwWwa5sjUEgd1 1A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w26r63v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:10:12 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2hOA003851; Tue, 7 Nov 2023 23:10:11 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vvcpu-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:10:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VJSiMkehQBhYD9XSGpjyPA6h3kBuiuRPRnmangY1iKXnKxg7DMLgCzrkr9gp4H3rflk8VnA6BJXGof3zK2mBTvKEPZPSnX0a/8ASHphWNf4TnvQL5R0W9LgCFbXb3cOYfhHeLjP3SLcXCNS+rQDrOvnhFkSXc0mXpP4dfob6DaE4i6nv1t9oNKt09/anx4QsYywA38CeLmhdg4AtPt5fowSa6Z2Hm+F3r5C3Vk9F/w3qcjfNn1N9onAuvHI+sOLL5Jcpj3mTeK1tfsYzrNYNMxR2Y5VNPxJuLYpAnq3O+dXycuYKYGfcKD2gCQTayGuD7VhHDvV3ue+0D2RzUeQhEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NIc4sxhZAhOKoo2VZ88Y6fbqmbPRGrl3S9o4NPWPM9I=; b=T8rFaifas9wnSjcuuuTpKzmkjlwiuiovCuba4MQxXrOR1rFt9oxTt30p9KT8XU/cuuOPocw/sOfo0LpGN34RHpjX+eFTHqhBSJzIt1CEvoImTGKAGPiZ5NbmdJqUS+LV9P+innExOTn4BmfStv2n6ryzmQVe7OpryhMtWyj3Ff7YNj6KYWI00RJVs1YIaTgyhAjQULUoDvmx2HoV9qPg/kCNgNrIKAB3xxAPjemjtAv6pMMYth/H91U/thc5vA4R4WrPX9L1STIzuRN7TiJT7pfEZA44KuoMYhwRVnnZCF0Rqf4IupmcpzkWY+zo0wtDSFe61dOwMJ9959W/jdB7VQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NIc4sxhZAhOKoo2VZ88Y6fbqmbPRGrl3S9o4NPWPM9I=; b=JBwQTfVZbp/BJ2c20xblXhueNUwPdKvHe0Bk2HlxwDWsb5usYGYWsBt0nirk6n6zdX7QaXp6vu2lLD1MF3ScujGaxvPIxMGMOpqWuOUJxiiYBaR9dmhjFBD5xUajWes8q+PuCyIkoo0uA/PHkiz5OlqHA2cgCF9B0JHCAG92c+w= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by BY5PR10MB4369.namprd10.prod.outlook.com (2603:10b6:a03:204::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Tue, 7 Nov 2023 23:10:05 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:10:05 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora Subject: [RFC PATCH 86/86] sched: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:22 -0800 Message-Id: <20231107230822.371443-30-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR03CA0309.namprd03.prod.outlook.com (2603:10b6:303:dd::14) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|BY5PR10MB4369:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ab9e4a8-eeea-4599-c2c4-08dbdfe6adb3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cisvorvAi0nLDv7P/e1asv3CdYcyDpfyDp52dDRFhi/vIvM9JEG+WbxXygxkaKHbbxfuODJQrsrRPI5qbafXC0HZ5bbMqoQwoHrzWUDSgT2w/N4AtidU3JugMNEQne+vJqnteqi7GPu6HHNWQVEwbHqV1YPxAZGAJhL9Ex5nLeDbvpprHijz6ZlAYMQjtlWQEy2Ehdoggfou1kw02D8OFbomneo+hHZ1UbDdbkqv+/fW1W8DWpO15sJtz87P/sI3lwn41bwbsxs+1TKhY7GFdU8WqKfMKjom7WWv7OqRG6dIIZstfF6IibjWca4rToKPeuHqN7ezZ9xRwAQvT6OLcClox4G/g8jjWjXA4YqBSN69waqc9t28WqZYrrOgv3eJRXtE62Bps1GJR0YYlBSt1HJdNQJqG9MOlG7EUGGiaVqjkp1iedfdOvE2qCS6nWamW3dmjBkxPsmEXNRGDiRGaXuAS+AG3UAg1Ow9JlLLQUT7An+ME1a6p7WQbJdtnD8bvL4pb6kS0CB1ROtIltnKhTP1lzKPBOTw0/i2EdNPXjS8TIjMn8O5kulmrEHg6w14 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(396003)(366004)(376002)(39860400002)(346002)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(66476007)(66946007)(66556008)(38100700002)(36756003)(86362001)(103116003)(83380400001)(26005)(2616005)(107886003)(6666004)(1076003)(6512007)(6506007)(6916009)(7416002)(7406005)(2906002)(316002)(6486002)(478600001)(8936002)(5660300002)(4326008)(8676002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +/CeseBlY95e5aiG8p/Ps8YXI61fJlJTldjmPJ7vDyeA054KISJQs6TXOSYGynlkaMKE7b8X+uVkFhjIzeVnAT2vujsr6GkqfZpnmq6T+ywssaQxBgAjPY6axhvaVyx1CtHwxv9Jbf1DePra8nvS0SVO4dPwYUTj+RkHWWJ4xGhVC4iTEY3i79Gu1c9QzCEKLQSqXKZe5YeAQl3HW3E1dSeuCu8kR367LC4QUNrInWIOEMHgUHIpXCI+lfFTbBy13RszxyKpRL/4yy+C1I9g9huGpkYdzrcc9rExvuAfmEsToG+nK4szrPoNn5FD1X1rFvugAScer0CaFFI5CLffFeqfytENd1W1q9JCHGEU80+K/TkUYaDWH4v+rSdvRZRpRtkBN+zjeIFdZRZeExFz/ed1M2s7ou4XWMc5/ywYNnHi+P4UcQk/8pyTE3SroIkwBbVBqeu+AhVBBaqDU9a8Njm4vCY8QUjNX1+KTbzDdKfSLbUab1WYle9MWGeL6qADNJ7dl+VsP/o6HUQpNTM4mvaQc3d+Bv7QhUPka1Giw+upZAbgMK4tvNtG4Zfv0JoOFeTp730Dp7GY5VIQRFT+GCQ7dP7brL5raNCOv13ZDwKegRiLp4P/3bR/CoOsp5d1/0g6F7GHEIv2nRqT/u+t9gQLus5elN3ORJ3n1LSCr3vbRUD0G0+TImIr+iTXX7miIfB3PksmlrHxq49PVHbIoAaOtIdzChiCNBEcLYElvTcN6jXV+DqJDv0QNA/CzvWjt7N1FTVfkuqB2WBmfneejZhslvVdfWaXPZhI746bzSZGTac7bRUPBb0BPHPkyUGUIB46e7ZVTUWnq/JF5u10q2aCZq1kY7+HvaaZz8MCSRPpDUcQgHt7SArKjJn9XuWXLSd91kKv+Wg9QaRqZk4Ri5Yo9Ttc47+vGyQeoWFRuTrf84S/ZYNyWVCO0agK+OucsdogLbcGfSljOKGE3fKiEf2ObsjcHvETdm/hSlloBoi5JKQbCZosbr1jOtWm6G/yT9oGAv9E1ZoJhhX48ZfQYfhQkuWheNyW1xEGxblhuHqpJ37Qx837ShMnfz90elqJOa226sJL9Av5goahSOgGuNrarwDEV9Ab0qBiJpDSoDxuhvE++NBugownU3BTaZoTzfqtm9klzkhG/I4dbjon2W1LpkuoBXndFYsJsvPsqm90CO38VjOrBE5lsjWfoQqE47W1XOl1EccYg2prgKmsdEZ7uRTAkNAudXPWo43qnCyLTSqSdA4T/BscPOxHBtz3OiAlEvb6EyRvYqfyuYzKDbwcoLN0EdenbrGXRWf6kmA2D8doKJFhWBwz88uziR+1ygriSLdzsMQxW+srwHPl4JF9Pyke6H0wAYZUV5WiMMUBKOYLtchLY7GGNjZ2wqATai9UeRpDtNFL6BsICIDVw175NkKICKufTP/ARng41U7bmmF9G5PcemVG48pRqonvPUQMhqeQYkCIKtCUKe7zkERvPWZrWIdyLH/hETX+hmb1zJEwHAqBe+JYjTwYwviSNspsx1eWl0KzI3sq7YGd6J4WQvmuOLtZ3pVBbNU0ujvtzVxJISkPPJlN7iVShzC3LFEKklEaxT+/gbTmSB4bQA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: LCx+7TTtqCxso/1nKIZiPPUsRlj/oLE88Piyj7ThHtOYcsKluJoNsGiwU0z85MtU2VXg6pG/Q2lW5mMj4nCi6bBrCvhltLh4VcgeTp2st5x16kTBOtDUHNAmRq75Oj0fx++8vdY4CEw3sq3W1oN3BqXVyFityECF3a1fA7ACsTP9Vuy+YEDZmlzZnd4f0vCCLaE0AlCdkZpi99iBFE1X0BHYqG9tQwd7usfqiDnHYlYsx4I6ZAN0Lr/hp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6pZ+0iJXPvVTiswazqR8xiOm1b4ebHcx4TPU/KaxZYmDLp2nFFM6Q9AopmH2oaQwESvzfnkdUQbjZw10eou3Lty/mwVgtF2ajIqMK4CNY5X0nAxbx2LaJBBz24Wvr67hQXM8Vz8D1JLS5/0hDnrFIt0FnVBBeVl6IoLKfV7yVwglao0cDEAagMSp8EOl0A1il8iYtzHq15xdxgrDrgeVZtkfVg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ab9e4a8-eeea-4599-c2c4-08dbdfe6adb3 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:10:05.5080 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vLhjYNL0kdzDNHPPsX+neUSOF7lg1wPFI50ovP052Z4JJg27xjVWJeBByRDMDiwG4U17JZoNbtUCB6GoXB6shFnABkwZKFoa7XMpZTru0C0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4369 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=977 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: JorJD4555ZgyZRHWCma8OOr1r2tuLm2r X-Proofpoint-ORIG-GUID: JorJD4555ZgyZRHWCma8OOr1r2tuLm2r X-Stat-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PppQOGQkU3glxCVZOT+fBYC sRPkZTn9 W3moSAGeGoywi9rvZVQFHYCCXxFY5O/koRnzuYZft1Y0ratcGH8kbQRR3bY3PT0xF7nmHdcmgSFMtFgjBXlDYfhSUJFAhK5h60FJtqRgNYR15uQfi5hKY5oZ7E17aUNcu92B6CllWgfuR7U2+/phPMcxdWIsYYI7t4pJJprz3RTLqPrOY/cNg8mOVoKHgFbmTrjjMNIj1OxY8LsANlALT/kIdkdPNVRQOnVF5P9mLBbxkx9du9gzBNsB6HKU4pTD/+tTQOnxcDIX6e30umWX4qNlPOEWGA1QnuF89POtVQ7psxBhCiCNUJvV9lSHmKOFFIwvCo1wyba4cHn5G5v/gMrsMKLXx1909X/MtKr/YV6v7NfQTpvS7a6p0V/57ANIsXAhJpI5GRMPiBIrKIUw3EQbhxyLD8TspIdN1XphHRp42NDmILT/7aAUPdeqg5OawpdzeRf1NbteHG1YnIehKT27ZEJVFM4OQK/5qsjdTm0hW1YG07fUTOdO62lOpa4XrI4wtkSSkChujuhVL1E6bbsPn8dCTbstMzE4d5Pf9+/56bFyY+3OZ+6dyZQGoRi7V1kOtIM6pSYm57NZ6HO6MNB+3+ep32D7Br+Aj X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that we don't have any users of cond_resched() in the tree, we can finally remove it. Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Signed-off-by: Ankur Arora --- include/linux/sched.h | 16 ++++------------ kernel/sched/core.c | 13 ------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index bae6eed534dd..bbb981c1a142 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2083,19 +2083,11 @@ static inline bool test_tsk_need_resched_any(struct task_struct *tsk) } /* - * cond_resched() and cond_resched_lock(): latency reduction via - * explicit rescheduling in places that are safe. The return - * value indicates whether a reschedule was done in fact. - * cond_resched_lock() will drop the spinlock before scheduling, + * cond_resched_lock(): latency reduction via explicit rescheduling + * in places that are safe. The return value indicates whether a + * reschedule was done in fact. cond_resched_lock() will drop the + * spinlock before scheduling. */ -#ifdef CONFIG_PREEMPTION -static inline int _cond_resched(void) { return 0; } -#endif - -#define cond_resched() ({ \ - __might_resched(__FILE__, __LINE__, 0); \ - _cond_resched(); \ -}) extern int __cond_resched_lock(spinlock_t *lock); extern int __cond_resched_rwlock_read(rwlock_t *lock); diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 691b50791e04..6940893e3930 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8580,19 +8580,6 @@ SYSCALL_DEFINE0(sched_yield) return 0; } -#ifndef CONFIG_PREEMPTION -int __sched _cond_resched(void) -{ - if (should_resched(0)) { - preempt_schedule_common(); - return 1; - } - - return 0; -} -EXPORT_SYMBOL(_cond_resched); -#endif - /* * __cond_resched_lock() - if a reschedule is pending, drop the given lock * (implicitly calling schedule), and reacquire the lock.