From patchwork Tue Oct 15 12:07:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13836271 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 9A3AFCFC293 for ; Tue, 15 Oct 2024 12:08:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7C7C6B0085; Tue, 15 Oct 2024 08:08:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2C2C6B0088; Tue, 15 Oct 2024 08:08:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1AE06B008A; Tue, 15 Oct 2024 08:08:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A30486B0085 for ; Tue, 15 Oct 2024 08:08:24 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5B3A1121583 for ; Tue, 15 Oct 2024 12:08:16 +0000 (UTC) X-FDA: 82675713918.12.8369DEE Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by imf13.hostedemail.com (Postfix) with ESMTP id DF57720003 for ; Tue, 15 Oct 2024 12:08:14 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=BpMTM+2l; spf=pass (imf13.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.41 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728994030; 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=mykhe2wOJLgvZ6Zcwk8kOrK3b9G1OqLDydUvgXAbqFE=; b=Kjd3m0UseaSnlhXso982Wifshdz4ub3gcbCZsyw+V3WyPGWz+0PWkYHHyf5A62YVLu+6mQ kBb2u6p0swpt4v/yaBLUT/hIQaL+QX/6x8PLXFDp5SaXrBQzSGKyCrCILwNW99Bw2YM2MQ pDyYwqu0SRblNgXwMtu92s8JDzUUS4c= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=BpMTM+2l; spf=pass (imf13.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.41 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728994030; a=rsa-sha256; cv=none; b=wfMuqKHexY+ZaZlhQkGOidac05x8pfFAHXyJ9I+MAeQ7e3o1yfW+v0xOKMahNxPU15lxa2 clYxpg6GR2a2p5wOI4ZnCCNulcR8yvcDzcivtnelMAzHaOwztehEyMH/lfgoeDDmpDSGLO 16ncmfArpu+5xkpoE7H7fCgc82UdQ2g= Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5c935d99dc5so5990971a12.1 for ; Tue, 15 Oct 2024 05:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728994101; x=1729598901; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mykhe2wOJLgvZ6Zcwk8kOrK3b9G1OqLDydUvgXAbqFE=; b=BpMTM+2lBB4mti2ioA5ohYLj8vs6PHvXkNRlaTHB95/4bamlGWXJcgGoE50upLbRxb GwZT2TaH5BpKH0AKHc8PKjH90b5BGvYQ10AT3waBKFep++T+HvOj0auiCK6bqvWZTbQ8 GLlkTqmY4xslV/++qs0w7SBi+S8Tn7dwotFVx6H2MnOcP8105q7VlGl1kqRojBnuGhdJ cCo91wKSc8VEV3GnlZRvCLMW0WVO1wYH18NDp+1F9LPrvrGlWyE7S4KppaM8z2e0KZOO 2bUY0F2H8QbH1pbacYMS2aolH2LzKYlZOHNAqb8RpPtxNyGDUGe8qRmm7Pq+LWr4RaqA 7P2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728994101; x=1729598901; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mykhe2wOJLgvZ6Zcwk8kOrK3b9G1OqLDydUvgXAbqFE=; b=epR95X+855YPBwhklfJODrTYOdCmBXvefkKFen9ZH5WaghMTn2beJ9hUzUxOjFe7k+ D5ZYCO379eF6RAFHbOBsbCaXck7qYEEhuGuED3g7dcNF77hHE0lhqJA+EGGh8CH9GS+x 71/XOD1QubcN8KX9NghowBsc/LNn4zaTDRcCNnxOB/YJWdNMzbw1RVfhCVXY3GCXii7o g9gJOuT13v02JuHBugp7+IkGwiGfCAx0DXP8YUuzQZuX+6rPpOk5fuDHc5h7YK2h8YYe 0n1HXp9w4pLjvEzT8BPfgOYnmtrafCZ1wXdg2j2fzlxPLs6E6C+QwScUrWSphkekHqa8 PBFg== X-Forwarded-Encrypted: i=1; AJvYcCU8L5dRzxmzOWR7d/Ua6SccL2888k0ZC+D7WTGe92lxjNeT8NvOCdeHD4x2cjpyooC/ofCD00tWsg==@kvack.org X-Gm-Message-State: AOJu0Yz1TF5YJiILjmvE5/DiS56dCgEA7s7ZVRCEMIscjzdLdQRZog/P DXWC57oXczobJHpkKffuY06WC/yAux1++PB4+Fa8CExoVFnWbfAj X-Google-Smtp-Source: AGHT+IGYyMVqQMtJ+otRMeDNeUKgRcZ4Wc/hHnlUyB2VfhCPBDCcpka9RuH2bRO8BdjhxDMUhAsDKg== X-Received: by 2002:a05:6402:2710:b0:5c9:6f56:b042 with SMTP id 4fb4d7f45d1cf-5c9950946d4mr64543a12.4.1728994100626; Tue, 15 Oct 2024 05:08:20 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c98d4f940bsm631303a12.36.2024.10.15.05.08.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Oct 2024 05:08:19 -0700 (PDT) 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 v2 0/3] cleanup maple_alloc related functions Date: Tue, 15 Oct 2024 12:07:43 +0000 Message-Id: <20241015120746.15850-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: DF57720003 X-Stat-Signature: 96t468nh3shtfufraqhmuzfihf9ut3gp X-HE-Tag: 1728994094-912558 X-HE-Meta: U2FsdGVkX1/oCnxN0sjPoxS1NzmODVy/jB74kc9+twrxDWWpzTLGStWeJwK8W/s080oTX3tjDhfxjWrSexmaQU+1OCBhabnlnyf0U/S+rI6K4yRYUbcgQq+4usuLBieAuCNdMxbi7atVIbYMRjX3m/hAklzB5CgUImF9y42ekDe0VqONmzufux6QgkyZvmNFWiq90SzbdPqLM1fkyhDhcSCHQ8vymkE7SpHU+FgdyCoIA5YaDlICX5HbglDfpf/kdgRONcPUbXyqYoih2cDRzK3OJXQtBkHamWMuEeCDDNA0m8TyDZRHRpdDEHYiaeNZlIyG7Wd+EL5rlYL//YHLKU3Owk+IjAOmqJIGCJB1C8w6DUBbqkok/D7/SlawLGiL73dzSQMjQcUOqlJqR+u+JcRzAkrvZNoQUCFn9gUkfhHuVybmMd5j7f22vkoQto9lp+FR240QqIR0hhmwJyxqLz74y58ozYfjiwYV1ZDCID+JOhPmJcuimY2QnJR8nb8VpaIIVKvBsuqL/qpMHvOLBRnWBGefb9BPFJnoEeR4PWfiuEyH/ryvdu8d0Lx4QPVZZiIrR80w3QB7DfdxB9XcW1JBQ21vmKsTObsvjsQ6gLpiuYGsQHSb+MPOvcef85f009BHfN4UzW8piP6BY0+u//NJXbKRd2EISveEiLN4v9LyuATp+/OwiJpb8urNQNiThk1JYoHLkOCaFPzhQ7q1CNirb261XGrtUVNzFU+MFsp3B9P8ToX0f3bLrXYsIMPt52SAoi2JkszxEpt9QPxfRd6pKUzn1yPHa2ZqAZCqMJtYf5XhnGeXnj77T2AYr+Ev0TbwZoeeIOojScmCHjGwDKvhKyNqD1bIJUmes47/StPCCbnmdWgYuScc2LYHZKvCe7DlS2WW3eOYMX2wdPCwVTfA8CP9iILebCCcrkJbs+378H4kLO1ha8q2I/tzh8pmrUBBTCMG1e1LVlOShRH EGRKO947 UBIlWcQ6dBd9EJCOUTq1FFuskFHuJpzVo/nBwFOn+AVFxuRaZDoMynzSmwQGNnwuSkCgcMj6IWusGRc1wWrf5S+n83BOXkvaDG4UKSiNI14Pi2LV0KiobfG9IUq85hRfvbwt9azz1YZ6TS5V3we/oTzpx9hJkvOc8xOznzS5aKhpCDpo1Qw+vcfTL3S4uo21vnKkkGZYdVbT+JvsA9CNVbVqSG/r4NPM/F0G7LirbT02Dm3Y7WhLicCi3JlVDqEItCTajrgAD8dxyPbZEYe+iv5/5/pcFW9EP0wQgJQ9T9fSZcYBODUjDf2dS6kXamiP/hH0KsuIa7nWUgHzM6gm8hwATfEauPRVUJwm9J48cNZy4uwxmysZb5zdMN5i8SOAHvq7YT3yA7HMrbbuxL+Mwx9tTUp4+otr6SKFvPw8HU6yxQXGpj/E92Vj7SmTRKQOjknkHZuenc+Wp8LM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.011449, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Patch 1/2: some fields of the maple_alloc is not necessary to change, so we can skip some operations Patch 3: a valid alloc check could be hide in current code, so we don't need to do a separate check v2: refine the change log of patch 3. Wei Yang (3): maple_tree: clear request_count for new allocated one maple_tree: total is not changed for nomem_one case maple_tree: simplify mas_push_node() lib/maple_tree.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)