Message ID | 20240814161944.55347-13-sidhartha.kumar@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 D4BD3C531DD for <linux-mm@archiver.kernel.org>; Wed, 14 Aug 2024 16:20:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C59B36B0093; Wed, 14 Aug 2024 12:20:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C0B186B009A; Wed, 14 Aug 2024 12:20:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A32336B0098; Wed, 14 Aug 2024 12:20:06 -0400 (EDT) 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 88A546B0088 for <linux-mm@kvack.org>; Wed, 14 Aug 2024 12:20:06 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1AA9E1C4A22 for <linux-mm@kvack.org>; Wed, 14 Aug 2024 16:20:05 +0000 (UTC) X-FDA: 82451362812.15.CE6B3F6 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf29.hostedemail.com (Postfix) with ESMTP id 666DC120009 for <linux-mm@kvack.org>; Wed, 14 Aug 2024 16:20:03 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=hEGTWlE3; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf29.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723652391; a=rsa-sha256; cv=none; b=Y5k45RDOFczgr3DOQqmUsXa2W+4QlD31QtCSJ8uEGfJlYO1RO4s5xLPMnK9W/1SkcIhFir bPOxOyPRt16UV4ddEPkJfndxTLSD/4ww4MYaDlf2wmgTSuP32v7f8QRqIbl5qpnbR+RJ9F S7U+vTyLk00ld7tvcoQdl/A8SZAKswE= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=hEGTWlE3; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf29.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723652391; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lOqX+rCceq/tSGDWm6o1Tnunt1j5x96KRSeMshi7zdM=; b=U7TY2Xgi3NJUI2tLhgrt2KIBQFQ+sOd0PYdm3EyEQOOp8/CGE+x73U1Tt21JGQ2WL1hT6w uYnJlJyyRvqgxdWnHmH4ugm+3QsC9ls6JbpXTNbMAwvdUqUH4gA3YnpwItsTPiiKzDtaH/ Y5/d70gL7mii+RFI7p4Lnn4t9a2FOwQ= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47EBtWdj023335; Wed, 14 Aug 2024 16:19: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 :mime-version:content-transfer-encoding; s=corp-2023-11-20; bh=l OqX+rCceq/tSGDWm6o1Tnunt1j5x96KRSeMshi7zdM=; b=hEGTWlE3FUBaaykV9 QBO2pUGH+qBaZaALNI2hRgT7fQMOaUfagEjT36aP2SvGeHjkwjvrLMEDnJydpjeA QTIPUwja6X88b/j+HTKz+hTAmKdGjla8HmsPb/vybHSK7ESgkrGVsX5QHyR2MYjI AXW/6ViUeo0lT98+c+KFaD65EEvPiWUDpgSQjZx30+dPj77h9pUPK9Ninav6gbZS QlMklMSK55xfqoxXgaHAtEIuTj8AEDWjpWwPJv3f5041NSualldCjhefmmOvZnXS n1nBJ628mLnwAZybWFSfmAOT8BCyudU7YGuYqr13C1Y7dQUM/oB3WnYkgD0mLofK QnOkQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4104gakdt5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Aug 2024 16:19:57 +0000 (GMT) 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 47EF5PPm021193; Wed, 14 Aug 2024 16:19:57 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40wxngn7rp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Aug 2024 16:19:57 +0000 Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 47EGIvCK035951; Wed, 14 Aug 2024 16:19:56 GMT Received: from sidkumar-mac.us.oracle.com (dhcp-10-65-174-212.vpn.oracle.com [10.65.174.212]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 40wxngn7gt-13; Wed, 14 Aug 2024 16:19:56 +0000 From: Sidhartha Kumar <sidhartha.kumar@oracle.com> To: linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, liam.howlett@oracle.com, willy@infradead.org, surenb@google.com, Sidhartha Kumar <sidhartha.kumar@oracle.com>, "Liam R. Howlett" <Liam.Howlett@oracle.com> Subject: [PATCH v4 12/17] maple_tree: remove mas_wr_modify() Date: Wed, 14 Aug 2024 12:19:39 -0400 Message-ID: <20240814161944.55347-13-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240814161944.55347-1-sidhartha.kumar@oracle.com> References: <20240814161944.55347-1-sidhartha.kumar@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-08-14_12,2024-08-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 bulkscore=0 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408140111 X-Proofpoint-GUID: 7bCT3OyQlrF79LGUa3r-rM7oUGHDZ4BB X-Proofpoint-ORIG-GUID: 7bCT3OyQlrF79LGUa3r-rM7oUGHDZ4BB X-Rspam-User: X-Rspamd-Queue-Id: 666DC120009 X-Rspamd-Server: rspam01 X-Stat-Signature: z41dx7z9x4oynso34nq6xag8nnj3pgd1 X-HE-Tag: 1723652403-369693 X-HE-Meta: U2FsdGVkX183j2XOzDhoCzD9QWno9pEXqeCip98rksMcI+RRviJeUdC9KJ13D0uyGXfysw7EOKp2i1whkoZKz1mMAmCwD8aWOgbVTe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Dq8orBmFsznLixTnu9NMZG5L7oXGugNY7G9hghPJgmvAnwLyNjQv1Lu0kx6DZ3npodhUNrHlRBvySmTFvYSi3ArY/qEVlqZ5QmlTs= 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 |
Introduce a store type enum for the Maple tree
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 0314e9b52621..6640ca775808 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4108,44 +4108,6 @@ static void mas_wr_bnode(struct ma_wr_state *wr_mas) mas_commit_b_node(wr_mas, &b_node); } -static inline void mas_wr_modify(struct ma_wr_state *wr_mas) -{ - struct ma_state *mas = wr_mas->mas; - unsigned char new_end; - - /* Direct replacement */ - if (wr_mas->r_min == mas->index && wr_mas->r_max == mas->last) { - rcu_assign_pointer(wr_mas->slots[mas->offset], wr_mas->entry); - if (!!wr_mas->entry ^ !!wr_mas->content) - mas_update_gap(mas); - return; - } - - /* - * new_end exceeds the size of the maple node and cannot enter the fast - * path. - */ - new_end = mas_wr_new_end(wr_mas); - if (new_end >= mt_slots[wr_mas->type]) - goto slow_path; - - /* Attempt to append */ - if (mas_wr_append(wr_mas, new_end)) - return; - - if (new_end == mas->end && mas_wr_slot_store(wr_mas)) - return; - - if (mas_wr_node_store(wr_mas, new_end)) - return; - - if (mas_is_err(mas)) - return; - -slow_path: - mas_wr_bnode(wr_mas); -} - /* * mas_wr_store_entry() - Internal call to store a value * @mas: The maple state