From patchwork Tue Jun 4 17:41:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13685725 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 EF859C25B78 for ; Tue, 4 Jun 2024 17:42:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F9DD6B009A; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 650246B009B; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 42CF76B009C; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) 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 258D46B0099 for ; Tue, 4 Jun 2024 13:42:20 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A5130140D99 for ; Tue, 4 Jun 2024 17:42:19 +0000 (UTC) X-FDA: 82193925198.15.823ADEE Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 3CE42C001A for ; Tue, 4 Jun 2024 17:42:16 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=VRHgwHDU; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=XakMCM3A; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf22.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=quarantine) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717522936; 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=IFa12ztC6344mQoKk7BmgG7Jc7jYdExwlXq1ZppxlRg=; b=ktSsIytuXF48tyJCv8fkLrtr8G9gVkcTAPVHb9FNzuC8KRl58OgVUHIm/0piR57V+9L/X3 8K9q2Wr+JmcaxsrqQpk66HDB2p56k2kLBOtoliCayHdPwX3aW20f0quERZm5l+clRf76kx wCmTw1c2dyWkjD57uZoRtRqaA6SD7vQ= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=VRHgwHDU; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=XakMCM3A; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf22.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=quarantine) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1717522936; a=rsa-sha256; cv=pass; b=vX4ZNaAuJNYS3TXFdETNXVbzBgANud0tJ/+U9MDpL/zRAOW5Iqw2OP0KEZKk0NhjgPTLOR wJ0HGcOyqh7/v45jJtys3pjUiv9Yh6y9WorUfFTbC70hEdndunoPCDR7iZ3sA8HS+7yH08 u1pjbdllIPklDLzqTsCIIPQLcPAU9mg= 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 454BoOW2000986; Tue, 4 Jun 2024 17:42:04 GMT DKIM-Signature: =?utf-8?q?v=3D1=3B_a=3Drsa-sha256=3B_c=3Drelaxed/relaxed=3B_?= =?utf-8?q?d=3Doracle=2Ecom=3B_h=3Dcc=3Acontent-transfer-encoding=3Acontent-?= =?utf-8?q?type=3Adate=3Afrom=3Ain-reply-to=3Amessage-id=3Amime-version=3Are?= =?utf-8?q?ferences=3Asubject=3Ato=3B_s=3Dcorp-2023-11-20=3B_bh=3DIFa12ztC63?= =?utf-8?q?44mQoKk7BmgG7Jc7jYdExwlXq1ZppxlRg=3D=3B_b=3DVRHgwHDUnOlAdjcyamNN7?= =?utf-8?q?L4J37enDUziA0fG6GG9MHExQ5Y+GXnBKfCV306dLVDxUcTd_KZwcMYqUUBwudfAzm?= =?utf-8?q?SWmVkC4FLXvMIam4wINlNqEdu9Xsg7BrS9/J4XCd9Okrh/aX4Wg_9coEiXr2p97Fb?= =?utf-8?q?Fu4JIHYE4tuQGjKdBRzCEpqNY2VP+EzVSim/3istU1abApznMkPuYTc_ewhZwaqwn?= =?utf-8?q?5DFYZvYrPZTDJ4GXv1xJAMOYnEPIXHoWEYWHf9H1y2YoQ9iCGPUyU4M9Amn_JxOXo?= =?utf-8?q?t1m2sa4d3CzORoMjlvv7hKR/j5pIxeb05RiVMjbmxbsAV/s4h4YILp2bKgzreXi_D?= =?utf-8?q?g=3D=3D_?= Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3yfv6u5jg8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:04 +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 454HL73e016288; Tue, 4 Jun 2024 17:42:03 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2048.outbound.protection.outlook.com [104.47.55.48]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ygrsaf2s6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jun 2024 17:42:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bkNDAv1AlDySpzbUPJZs6BXFzH04AuO6GiTScyYhJovGCIWFcHRAOadzAbg5+EhAIBWur0/tTLgp7fWt0NT2lFg4LXy1gKeRHQzgGmLevoQg3/4q1ymjAeRMGDo8teWl54M945LI/xrUiiXMHhpzy+Us6qQPAAdxG7crXohnm6yXADAeU59OlK7NIEflWIFQ0xvDSaJO+28QiY5dTvMQCTgEQT/B+AITUXwpJeb0hwM7WlSTkfLFUR/IF5Nb/3BjK7F2+pPHgOGtuPQo3CKsHRyMCwr2qzW5erpeqt8jvTWzu5uAllb9hJK7ivLGJDnQ4cRKmEVSIpa/k3SCRH+XYw== 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=IFa12ztC6344mQoKk7BmgG7Jc7jYdExwlXq1ZppxlRg=; b=KArCMdJ9k1kT3mHnrVm3k21H0Q8xrkLybCYA57Z+JzkLMriwLUf9qw36Z7SoUagkWJT9+kwy++OXNDnC01UxuWXnLz3B6XLQKr0pjp1x8m/l+UIw4n7ImAxSvKFpwuOCba5FuGBZNhaiDIKXVknYhQX0fSpgKmfBZyGZ4c6u7at2RAUJXrETPgwQ4Fv+CPksrrOmpAY+6uUg9tKSA+OEnZMUTVoeXvm/qD8oGF35HbkIJ1aZokeUemHQF6hEjqlJUIPV2nuViBPNwz2S97VTe4O7KOapgfiq7TSf5tJl64zfuQRpQYavg2uWrVUlULcPF2Bs621bXlquPw/o3TQFOw== 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=IFa12ztC6344mQoKk7BmgG7Jc7jYdExwlXq1ZppxlRg=; b=XakMCM3AfyljSSwFBE8EYUmgdHdX51t0FwxKu3GenjdAh56c1Gt1AUBY6fw4yan7IUhA7wH9w1V67dro7M1e3kDIAi7+8HlltCNoUZiGMzUxyMox+0mKC+ihRqaTA7I6pmg0CR1dF13FyntH2VDrPLgG3vtGP4rYbZutiPyc/tw= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by DS0PR10MB7269.namprd10.prod.outlook.com (2603:10b6:8:f3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Tue, 4 Jun 2024 17:42:00 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::eab6:6dcc:f05f:5cb2%7]) with mapi id 15.20.7633.021; Tue, 4 Jun 2024 17:42:00 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, liam.howlett@oracle.com, zhangpeng.00@bytedance.com, willy@infradead.org, Sidhartha Kumar Subject: [PATCH 03/18] maple_tree: move up mas_wr_store_setup() and mas_wr_prealloc_setup() Date: Tue, 4 Jun 2024 10:41:30 -0700 Message-ID: <20240604174145.563900-4-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240604174145.563900-1-sidhartha.kumar@oracle.com> References: <20240604174145.563900-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: BYAPR05CA0088.namprd05.prod.outlook.com (2603:10b6:a03:e0::29) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|DS0PR10MB7269:EE_ X-MS-Office365-Filtering-Correlation-Id: 189ec041-9209-413c-0d4f-08dc84bda311 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: SPo9OZeyy2vibTrfnc1UJWiXBAXKYOOv6WP88bNYi1XrPY7HyoKT+2tdrmwD/sddj09/sV77EvvqRSk90OgqAz+KO3elfxedluSZHY+SJjF35LIeuKALlXdT86iNCnyULQgDvizej+nBJsDTEDH1/A6dX0rmWmnHRgSYyMnMTuW5zSrvoeFvm6zN/Gzaa4S2AXo1ALSbx+D8wyqAvKRHTxYXTA47K8/0EtIbWayHFE3vSD50TXQAjrQ+SAmo/8C8sp8RLX39BFA1iaMT0fKxQVLNvd2KeY5niQCaEVdwy/pLHUhalON2WolT/FkvvXuhUqmylZsscFa0zwM6fHEQ8BaCFrbl8qCpEJnUDGsnY2GN2HP9fHgWokyGx9/3+RJe1gKpjZ5mNm29Sve5hnofkvAlSeCYo5uvNPE7bqJ7Z4AaMGAf7f2sR3/HPnsafbUWIdBaW/K0C9OBhI2Vc47BNKM6cdxXqD70Qppdmiy97L+PF6Vp6wY945qGXqxmFbZwE/bj8c6HL46oFRdjYKxgJMUG4JL0CsrE4epQsMedujCfiod7T2V49beufJMc8owDpcDJvSTl8uI6afNP9k0Q++a3Rz0JPFmg0G93gbje6H7igsQFy0ESZm3pUj5W8EOsMLx1e8iIz/h0DQuV5neQyu3+6fyZ4Wm6ONcbhikwPTiHLvnQr3mGESqoAds6xq1/pj0Qualvz6rAsJN5O0UIyuLI3NdglPoLcyadxsVDayxpTghlhbBZ+rWNygWMzCFiK1lkAyWV+otyehHmCoPHsK2+Q2NEqOim1ZeN8mx3weIHHf9Xaq0SYnwACmOpLxxOyPWFmr5IyvKl+Ow3a6+APWvAbZzshRKd0+NlRCkiyGwMD75pkquKOb20FxQRMD9DEmpo2YeIB74Jn94cm4mJYDX1NJQG8VguA1A/xgPaSyk4OXvGLf+SWt5XEzHrVHtdy43+XzHG346BsXc/3okiu54wKxf/FOCF+rgQ8BlBHIJtY5sZVFX7Vu8hc4MQLBXJXnqT/txhXSRX895pGTv4PWWWBu29FZSIQYnIfgOLMBM/JkA+bIddvGzgWKmOPglCJW97MIlIQgKCKOiJVbhZCPyRqfDBDpOpLQRnUftz/gv74qKT3rWaX48s1lEISzs1bO0URQZ03AvsU693axe3dUVVhqyV3RBeFm2uWNCvn2ql/YgS6u5v/aiQqO7kmu1710fk7e9ZP7G+FQOFHuk+a3CnQzTeGDVKOiqsYjipwDvKUtmV0xwMFvCmlN2KKjDtaskmzvna5SD5mau4fn9eXe4fyXkn1w5JSAS5HOSXYpo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +R+Scbix0Vxmi1exU3+pZKvVrsInYeb7iDfLg7qIMIkGsLwySm/7eyGmZJHiGAOGKmiAW9yqfDy2eO9gJqz3dqGkjGZy0qT0oKTYX15yPrwQXgA6oK/wFNJV9bYIz/n1/vVqDJYhhmtxsgnS6VbCZV3Ma9xKcbCPzm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TywzccE6re0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 189ec041-9209-413c-0d4f-08dc84bda311 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 17:42:00.1196 (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: od+GEj1D5yWLvI6cJ+bapcnSEOF/IM2uYF68lF2q1zsLWYThhsar5MQ7ix0NpZ7YXqeg2yQA4sRT3vKe/azmBQWJyvVsdSsqSaTa+Ma88P8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7269 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-04_09,2024-06-04_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406040142 X-Proofpoint-ORIG-GUID: imfhJuZMVcmblS4F39nelFij2xIZ3W1T X-Proofpoint-GUID: imfhJuZMVcmblS4F39nelFij2xIZ3W1T X-Stat-Signature: 3enkmk67g6wzrnwqzbwrmx9nsmo5pw6f X-Rspamd-Queue-Id: 3CE42C001A X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1717522936-645599 X-HE-Meta: U2FsdGVkX18A+ifkNsLsH4xjh8z7Da1QnYsP2vs96sTos7UWfsFTXlWOIn5GRTqz6OulcZ+nC54KvR1m7dC6gJU9VNW3dHm5hW87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gHaPJ3RrEi686F6CkljvA6r4j1V0726xpo2CPcfmYkbu1KGPPfmqrgGB9CVQN3gzCfR233uHLnixNv6H97JelWAOO8nVXRAcs4e+iCoJDxPnxWfyDFEz78rEU9igogafo1seAvHAQ3ELnflhrDgadGGJZiJnZ1+4KY0aXUyUTDwFJIk1nzpUuhV2gIIZm3UVBv0a1qfOr4DQva9YVati7N3nRALaWIHT7/GYjFJQNrjTfBZRhwUVDbVyY7uVxw+9By9dYjIrCoTIM5eKktKjiyUNvOUQw== 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: Subsequent patches require these definitions to be higher, no functional changes intended. Signed-off-by: Sidhartha Kumar --- lib/maple_tree.c | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index ccbec0f66562..2558d15bb748 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4230,6 +4230,54 @@ static inline void *mas_wr_store_entry(struct ma_wr_state *wr_mas) return wr_mas->content; } +static void mas_wr_store_setup(struct ma_wr_state *wr_mas) +{ + if (!mas_is_active(wr_mas->mas)) { + if (mas_is_start(wr_mas->mas)) + return; + + if (unlikely(mas_is_paused(wr_mas->mas))) + goto reset; + + if (unlikely(mas_is_none(wr_mas->mas))) + goto reset; + + if (unlikely(mas_is_overflow(wr_mas->mas))) + goto reset; + + if (unlikely(mas_is_underflow(wr_mas->mas))) + goto reset; + } + + /* + * A less strict version of mas_is_span_wr() where we allow spanning + * writes within this node. This is to stop partial walks in + * mas_prealloc() from being reset. + */ + if (wr_mas->mas->last > wr_mas->mas->max) + goto reset; + + if (wr_mas->entry) + return; + + if (mte_is_leaf(wr_mas->mas->node) && + wr_mas->mas->last == wr_mas->mas->max) + goto reset; + + return; + +reset: + mas_reset(wr_mas->mas); +} + +static inline void mas_wr_prealloc_setup(struct ma_wr_state *wr_mas) +{ + struct ma_state *mas = wr_mas->mas; + + mas_wr_store_setup(wr_mas); + wr_mas->content = mas_start(mas); +} + /** * mas_insert() - Internal call to insert a value * @mas: The maple state @@ -5361,54 +5409,6 @@ static inline void mte_destroy_walk(struct maple_enode *enode, mt_destroy_walk(enode, mt, true); } } - -static void mas_wr_store_setup(struct ma_wr_state *wr_mas) -{ - if (!mas_is_active(wr_mas->mas)) { - if (mas_is_start(wr_mas->mas)) - return; - - if (unlikely(mas_is_paused(wr_mas->mas))) - goto reset; - - if (unlikely(mas_is_none(wr_mas->mas))) - goto reset; - - if (unlikely(mas_is_overflow(wr_mas->mas))) - goto reset; - - if (unlikely(mas_is_underflow(wr_mas->mas))) - goto reset; - } - - /* - * A less strict version of mas_is_span_wr() where we allow spanning - * writes within this node. This is to stop partial walks in - * mas_prealloc() from being reset. - */ - if (wr_mas->mas->last > wr_mas->mas->max) - goto reset; - - if (wr_mas->entry) - return; - - if (mte_is_leaf(wr_mas->mas->node) && - wr_mas->mas->last == wr_mas->mas->max) - goto reset; - - return; - -reset: - mas_reset(wr_mas->mas); -} - -static inline void mas_wr_prealloc_setup(struct ma_wr_state *wr_mas) -{ - struct ma_state *mas = wr_mas->mas; - - mas_wr_store_setup(wr_mas); - wr_mas->content = mas_start(mas); -} /* Interface */ /**