Message ID | 20231107215742.363031-37-ankur.a.arora@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 <linux-mm@archiver.kernel.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <ankur.a.arora@oracle.com> 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 <ankur.a.arora@oracle.com> 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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/A1bWSypGvBSr5SVA4SdNcr3v5MqvU0ZaneIg/4TGtOCgCjiR0F49Et564NB6CvxZZH8pSRyQSnbRhOYHLFbRxuKMsWrl4Bg04rudh2llKH6+kSh3zsV71kVBX/DyvWO2NJSxJ/GfoQYmkXaO3n3qNqhu3gqD6oQxF7a4n1dHdNE1ed/b39tsYM/QaWEj+2c0B8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5FrUfvK48JsNOgAta5+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+dd7zBEFovninEGp4KU837H5dBl45/tTVtmTdrhwpxc6d4C6IdJ1x18MRbWtmdp34fS6urqyBNiShNKVIztf/FpNukCleeVV/Kj7daydjkcYLjroy/rY863KkixMbaw/F0hlY8KKilF+/T0EV1g9jCgb1sa3HpY9KDYljMUZVmkL271pZevGCFneD5q2CTnFsV0qp0slqx5T8UTh15YNLiu9NrJJB9HKBgxG9kwsBPWIjl4cW8IbTipaECsXoMKZxn11/yyXQnSRoQZOrG7W7A+yZuRvW6IYI5UOa1B3H7UjkrHeW97fUEHN9tzYPs0kp6pmdxIZdH6mUhT4FJEbI2v8h5/1/gvPw572mdrH8O9ibpuBZNU6/Vzr8Sv+Fer28H7pcPARbXVt8/Y/5dWeNLNVpVxynfVvyOiNcEDiYe9oUlvFM7vRy//oXEkLVa25A/YYo4vt+UY8+ubNRpfIIc5/CPdAcoyxalH6QYXgvOldshkBn1v0Dx2mDniJsZl4Kj5YPqCH1CFCa0lag4cFX54qsjpIjTq2soI8oYg3EYNpujoN2Cgs+35swbUhvYwlcbzX T9nIrhn+ 4KWM1e1q6dkmhkZ2sH2eloKndUPF33GabF91vCNRFE0ZVwH0Z8vLXAlvW0lWycb9txp7jMYvwblvDEqZc1DvNcQsqzRZkRJUXUsNjH3WCbV/pkod7VglrxmmVLFKfgJucNW2lOwaNYIzRNei3wX1xkEQmBdGHyJLGxtGg1/aaV+pXbW6fD1eowETxwgbmLg9ot5KtA1D8uJMKbmI5hhHdGqrJr/Nz0ASqEY/oB51gWFoHS0+D/hF6BrGAgiP10V5pnOkczf1OAefMWBaI9YPWKKPF02tyZA3zG0OK9ebXlKRpVF6TCp2KTjxrMtRelEGHyTyTgSXfCEafVlVvUuYrOr1I0w5tA2ojmhn9B2hKUZhatgsbMYtD31ZTRD66RlPMWe6t8eQQScyIvTt7/TDY/TO9sGOxZRWqwrA3+P3ORrD5OQry8/Yhv6wdjVcRImENCuSu3fSsaTUDzJPKlVsRB0/mxg== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Make the kernel preemptible
|
expand
|
On Tue, Nov 07, 2023 at 01:57:22PM -0800, Ankur Arora wrote: > 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 <ankur.a.arora@oracle.com> > --- > 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(); See, I'm reading this like if we're eager to preempt, but then it's not actually eager at all and only wants to preempt when forced. This naming sucks...
Peter Zijlstra <peterz@infradead.org> writes: > On Tue, Nov 07, 2023 at 01:57:22PM -0800, Ankur Arora wrote: >> 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 <ankur.a.arora@oracle.com> >> --- >> 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(); > > See, I'm reading this like if we're eager to preempt, but then it's not > actually eager at all and only wants to preempt when forced. > > This naming sucks... Yeah, it reads like it's trying to say something when it is just trying to check a bit. Does the new one read better? -- ankur
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(); } }
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 <ankur.a.arora@oracle.com> --- kernel/entry/common.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)