Message ID | 20231107215742.363031-56-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 474C2C4167B for <linux-mm@archiver.kernel.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <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 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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+Zvxci2aFE8e6ZhZrzYbD4kY3szSeiHfgj73LCpkb9+3J2LbAomDV3Pj//woTjrj3ii8J5mTJxVRBiRT+i/u6x7djdY/mJSoVDVkj5LGZp20x5pajnMQkUbE/48Hh3Wa9Bfdtcp42g9eC8z4cXJaNn8Xs44db06/DA88H9jeL6tUTQQsi1IFqhaTWOwWYAcN8FVy4in0qf31VjGHf3c6MaVAsfC6W44L84kS4xvxA3ducnTua2xZWFXPpdtHF8KzVYG3jc08X5pF6vdQfcR4BwC2zrQoqOP8ONEEl7qH1XDHnjKdopG/7YkqXsped9KxHi0ibvJfy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0MOLs/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+kVspUeNVZu5nOR1MQszImBp2oGalxiJYKMWjIo2SaARkLXcMohDLutJK4an7iTMw7eavQzss76tSf7wMTH1pERchNzvBO0zZqJlAb9jZxtCVXCmKTz8i0wtT31T1Pip0GPLBOiZVD9XoHBY8TsUAYbPuyxxHjRznqyCqmCY3t9BWEm9YWwn1sx64CjaMR/einmAjr998QReo5NXK7dbrV8/a/68PyD5uwGL4V0/uZKK9rSMe5CKw72WYAe7wLv17czLZvTApamuaPmxoKXdkG+97DI//SDReglgS4Q3sgzwgF/hG6P++7pI8cdWMjv6xOsOMTncT5frcmYGVFE6KblNDbwROyjL2gF6sHRmo4/SIlKxIfu0t+8aezDOwvtfXJZuUp5LqPy+AKwT1/FoEg1lt+pKqxIvUyWgKdjme/jO4V4edfuQ03U2SMFPd2/Ju+bdNFB/webBwt2C77jjcR7C6mk3rUvSPPZxSy/3W6jgSvf4XptVB0QuA1KviLH0fHuopRc+SiwwZDfaXI11ljHL2ZHRodMlbmeSkXkqIWKoYgMEoFdqrfDtz/Swl1YF+ZG8jeMIuNG8/emmHLa/mmQtCjmhcHBPEXCNLc5clo0exq5Cs7ZFu6854EhP9fb6QVN8IHF8OTheG9dht8mZUPM d8W3Jf5F ZzYcdIXDxkck4+gg479WivSUKoqOJ2s1S2UXf1JyW7NdJnCMIiUds1TsHK+HKXTHDELdWDIOknW/MX7NMMnPaoodXFzXv4U+womPZTZ88J4AiyxT7IXLViexLrkwWNrfEFMAEnBYv2QH7Xz3ju/hm+LMvWZfLZroOa/CGil7kHAy8I9eLL8DTspi7q3MrDSZRpvUs3ceNjlwE1jAsf8YbTCafdbQ64nZJS57xydZFwLCwpcete6pMrvoH/uOrCAb3U1NVPRwNLDU+TMSJNTuFWKSX/FLHcRqUSE2imNDlZXO0iquK4rJ2aG9mHLbasKKjIsB3as+mZGYu3ZMGMG7OHAh3Lczog7YqoUQQ5XTEsOb0+RG6J6x/+Ux+nXxtGCqWHzjVVXoq0SKGwm7iJTV+4+RbJE/sb2Hj2LLD8cpknUFwbcH1W5txFDyJofovLy4VXFwJGg589dwu/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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Make the kernel preemptible
|
expand
|
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. *
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 <ankur.a.arora@oracle.com> --- include/linux/xarray.h | 14 ++++++++++++++ kernel/sched/core.c | 17 +++++++++++++++++ 2 files changed, 31 insertions(+)