From patchwork Wed Nov 27 01:27:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13886473 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 3C136D66BA3 for ; Wed, 27 Nov 2024 01:28:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AAB626B0082; Tue, 26 Nov 2024 20:28:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A34A36B0083; Tue, 26 Nov 2024 20:28:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8DE056B0085; Tue, 26 Nov 2024 20:28:30 -0500 (EST) 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 5FDD56B0082 for ; Tue, 26 Nov 2024 20:28:30 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0C2D11C7BA8 for ; Wed, 27 Nov 2024 01:28:30 +0000 (UTC) X-FDA: 82830139812.10.5E86A23 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by imf16.hostedemail.com (Postfix) with ESMTP id 271F8180008 for ; Wed, 27 Nov 2024 01:28:22 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PQncUIrz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732670906; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=f6gPCclMocc+nn9cASgN9QW7LVgy1RTFJRdot69pu2Q=; b=OPr3606MDG6PuUl53z/QNnJEv5WRGrMWFCKIhxaePIs0v0GwdGO9ab6pXuMHPqieyjngaW APpUqkJP4kb4+2PWZaxBbMbB8Ba6WNNX8yXpTYvMPqQxW8XSxuHxTXVvpnEMz8Phb396ER FbLZZsOhIIA0IJvPsjMEN5T9zsDI0Uo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732670906; a=rsa-sha256; cv=none; b=FbDZYOZXFCDbMdKEetEYV9TVT5saWlNh7qWRCB/owftgG+sqKrFvuRV1SIB2eTLuDWBjHP pfJuv3aX4bsSWTeR2vqnkthMCQN8Ph6udq2te4C9vr6pqMBlrsyLZZ1SAU1Gd6dpbLhSke XLYlG0ty4VqW88GOQlgKX8vrBTStieg= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PQncUIrz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-aa51d32fa69so650307866b.2 for ; Tue, 26 Nov 2024 17:28:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732670907; x=1733275707; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=f6gPCclMocc+nn9cASgN9QW7LVgy1RTFJRdot69pu2Q=; b=PQncUIrz8pZ0tzpMZRAVXJMDc0m/snTZ6CAk10F4iy69ME/w6bi8h45/EUNozJ6QU3 TG5sC/HnR7tjRrnN33+wWorP5TkFqi7dRGdR2BdCD/hZ2Y8z2Vob1ZimHtzNoJSiCP9x ClHYLdVDBj/Hl9N/+euzYj1OVhC+5TU4N6soJA5aDMPHqm3j57ZChcrVI3vs5bwGIDGB hyAzZ+6kLD4hQQ1cDFXpb8Evs1oAzDvV4Kd2Iho2vaQbf0VOvLJvv2fYHwpgSP8KmRMs u3aA/7H48qrCceOuaQ+WFo/hTlx1h4fMs4TpfU4SHW4O5CgpnFiUkmINwNtxyrn/ph2g 8g6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732670907; x=1733275707; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f6gPCclMocc+nn9cASgN9QW7LVgy1RTFJRdot69pu2Q=; b=eakOvr5UfH88TvQPDrNQrDHm9tA1JkVJOC+m6dro3FHxoZNlGwfAQHUgTmu+ivTAk+ ywwrfPfT1eItNVstWojutiFlY3xYR7V8lN+SKcCCRNtzzriqEllB7NZ9fPpRVFKgcWke s5H0REjINq9lM3wdW+ubBgyrMxImUraEkV4Fjp02sRwma7SQ7g8L4omXXHl8SJsA8wyT zZLuLsHn/EZAiryQgku1FHPso6Q258WJpqlQRzdObHg4fEyMSuJWD1NidtuJqhKzyNiv 5KlGH4O+KquG+TrGC8AiF0BiZJKNQnzP5pPK+M3iOy6NlE2BkqPcbM0I/xBSdejQXqb+ gzRQ== X-Forwarded-Encrypted: i=1; AJvYcCXUXwHUe4OYJhAPGqdXf0KuVvHcZhDV8gaA/gLEScvs2Qi9vkm/AmUD743LosO1toT4XHAbyHl+Tg==@kvack.org X-Gm-Message-State: AOJu0YzXGRe9G42AN9ZSmsiQTATcH66C1ZkZjvcSQ04gVBHUskHD3rPz ltybqbvQsND+0SgU28orKb4syQlge5pKLY2YJXt9wGm8X7TM7BI2 X-Gm-Gg: ASbGncujeTQ8YxYXo2xeGDUA6Zndf5hvpj9BiZOIgt8et/nGXAWRHhnEbBHPCwgpcha cQQxj6OiZiQS68YoCrIdygTjQG4UrEV0PRcvcKQAKlS5xfYvdLk5qCBp6a/f1kW82y+hqyeo23F RbToY23fszpprOgMyleAmqw4//m7DCUEXWICLukkwRdZGPCjpo4iECT6FDRRiB66IDJjdQwtD4P dz+zXRlM6xCe0ZxgSwtThZ77WVu6DQ2pSMuEvHHwOvDeOelLQ== X-Google-Smtp-Source: AGHT+IE9MIazI7cixNRuaSmJc1T2w/+uAr2whe3+ac5dv2Rb4NpBQPmkgstTxzddz3XtWLylIVgesw== X-Received: by 2002:a17:907:77c9:b0:aa5:1dbf:fcfe with SMTP id a640c23a62f3a-aa580f071cemr67802166b.14.1732670906545; Tue, 26 Nov 2024 17:28:26 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa5372002aasm490315666b.66.2024.11.26.17.28.24 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Nov 2024 17:28:24 -0800 (PST) From: Wei Yang To: akpm@linux-foundation.org, Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang Subject: [PATCH 0/7] spanning write related cleanup Date: Wed, 27 Nov 2024 01:27:46 +0000 Message-Id: <20241127012753.3393-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: biw8kxhsmnnuoauy3b8cm5fgex5xdege X-Rspamd-Queue-Id: 271F8180008 X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1732670902-849643 X-HE-Meta: U2FsdGVkX19jsfcsb1AgjcXvbY9vqVPsTZJgzeyNMaPXTAyRAGrdjj6z9oeBeG5aOYGaQtkHKTECVJjqKmuPKOM0GzRiZLzrMsHdzmIgreWy3R+Ac5EwaRkhkYF8ZKx+/sNwwF+tO5C+B2Ey6Uz94vj96CoYR4egXqp4M1ALwJCkNv6lEi4HNR0TjzetbpE7vBQ9fa1Y3HD+lfKcj3k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n+Hb4PMsiEqBLG+83UWmjS7Fb/X5mhtur3WDytaxSLkl278JvqYeDGRNMLtwRmvh6cbEPoU7DfAEBPzUgYEloDsvA1T+kkhZL6jzw5yK5YMKzApGlnJ+++y X-Bogosity: Ham, tests=bogofilter, spamicity=0.018460, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Here is some cleanup related to spanning write. Wei Yang (7): maple_tree: not necessary to check ahead if !content maple_tree: validate we won't split on NULL maple_tree: check mid_split only may have maple_tree: the return value of mast_spanning_rebalance() is not used maple_tree: the type of left subtree is already saved in bnode->type maple_tree: always need to update max of new left node maple_tree: only ascend left subtree to get the old node for replacement lib/maple_tree.c | 56 +++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 27 deletions(-)