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/LltALamcylxMSims1de06zy6HdbVtwccYIE9PF7Aq0mtTJTXtZbO67qeE1bKY6jc0K7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yPXMyl0Y1u9Ert2ql6YrXotwfYHIpBzTthWpg+0CRFBzrO0WpSfuJaoWFSa3/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();