From patchwork Sat Sep 7 08:49:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13795160 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 A72A5E6FE53 for ; Sat, 7 Sep 2024 08:50:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E74076B0088; Sat, 7 Sep 2024 04:50:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E21DC6B008C; Sat, 7 Sep 2024 04:50:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE9216B0092; Sat, 7 Sep 2024 04:50:34 -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 AFB176B0088 for ; Sat, 7 Sep 2024 04:50:34 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2D5B11609C0 for ; Sat, 7 Sep 2024 08:50:34 +0000 (UTC) X-FDA: 82537321188.28.2B41EA0 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by imf28.hostedemail.com (Postfix) with ESMTP id 76AF7C000F for ; Sat, 7 Sep 2024 08:50:32 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PPD5qYRh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.176 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=1725698922; 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=2pL2MvT5s323jilvJgnS7nWbKGVP6tvPwn17EqYs0G8=; b=M9tX2LTqFdjjihpaQkIXOceqmRNgh/Znd+pY/DKeqMQoVhChzDQMWYNiulPo2pKvNXdWnV tnP9U9Jyg4W4MkJ9Y5tBGgjcBAa+03hSksipNGcsutVJVyro0u0BNfk80HuhovMLWcyDjR NcsoHooCXIXl6sRoWnWeX/+5od8oE00= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725698922; a=rsa-sha256; cv=none; b=GvYyUA8r11BbPo76ODdDd+4jeKsWvDBmz2kBdwWrAuc6L33bWb8nzCGEBTqom67NqOQYlz 4abGhmxFuJaLZ6S7hcqndtanfJ6PqyP5Nuoyokice0SMBP7VjKtntW7ySM2EoWuNn5JvAT 3sATyB0yjxkvk77eOv4UrCc3ToHo8Ig= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PPD5qYRh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.176 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2f75b13c2a8so4865501fa.3 for ; Sat, 07 Sep 2024 01:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725699030; x=1726303830; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2pL2MvT5s323jilvJgnS7nWbKGVP6tvPwn17EqYs0G8=; b=PPD5qYRhqC1T59NUxrMmC3amk39IEqjY+IPF3scZA4cMLahxHR3ZL1Z6wOS5GJ9Jnc 9Mluyf0PPhNIcfZYRLRVYTL56tl2UpYkNoLVQtQB7pllK8r/Xlsgyn/LwOnjHsA2frq2 L38oOPws7+NTOBrc2twe81vs7EFtvOfRwKOp79WK04p3POo0+CI6zATqR6BD43dF9PcI tB2Fmyex09Px551B5pKriQahnVgtVVx9JxiUYYVOnGjTnTnX3QV6ndFuK2eEBVSNt1w5 1hVuDRB3+Qqrc3YCt1Zr96BXgaANFMrj3VYGTlkws6WEUSM3wf2Khq0FaAnM6Qv7saXM 4sDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725699030; x=1726303830; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2pL2MvT5s323jilvJgnS7nWbKGVP6tvPwn17EqYs0G8=; b=oNWTA5oEktY7+jwo/FUw1juRAV7ImMWI43keFt2N3O8bg5xszGQ1O/MlaRjB6MIm8N GR86SyoN26LjXBP7uX6PGb6cZV/+obB9Db+2dK0fOWQCpiF3D3fbd1XBaYl3KBTBABhd YTo4opC5gLt8A7q/gjlzplGIkvGj1NnUHjsDZY6CLb7OiPV4JJkJJHoyzKdPsjn4uHsc AmOYeaCLGmc/uiZNc6gBr2FTXsP/Ru8jUbnonMgFdOvhtiHfMrNR0t8tK9aSoYeEa+hH lkVYu3FJheGeNVOB8pwxQ8C6Hx2WWgXfZZKSBGqlJ6zOJPlTJ3Ub/r/iKhzlPBe+5SJj I/9A== X-Forwarded-Encrypted: i=1; AJvYcCV4olipwQZ6eZ/ddb5cU5W3L7IWfcR0kKVMhYT3JFqj6d4aRChQ0XpnCVbWcYedPUFL4AAGVV7+Ug==@kvack.org X-Gm-Message-State: AOJu0YwNqRDqdJSHYdJWD6yv2Fh15rlvvWOur7iULc90k075liSzlQXY FrDVQLROGNVPsUz4okdzDb2b4/fhA43P137FsaMvp5UpO+kflp3+ X-Google-Smtp-Source: AGHT+IGaJhwhrqcPLvOCft/dRN2yrZw4uxqZgjYN9K3kJ4gFl6TxVDIvk8Y2W/OH0vUDiwqwOPG8Xg== X-Received: by 2002:a05:6512:2806:b0:533:4689:973c with SMTP id 2adb3069b0e04-536587b220fmr3299833e87.23.1725699029799; Sat, 07 Sep 2024 01:50:29 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25d3597asm47288366b.186.2024.09.07.01.50.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Sep 2024 01:50:28 -0700 (PDT) From: Wei Yang To: Liam.Howlett@oracle.com, akpm@linux-foundation.org Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang , "Liam R . Howlett" Subject: [PATCH 1/2] maple_tree: remove maple_big_node.parent Date: Sat, 7 Sep 2024 08:49:26 +0000 Message-Id: <20240907084927.1547-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 76AF7C000F X-Stat-Signature: rnu47as7jmhezq8gsd49isxipdcraqux X-Rspam-User: X-HE-Tag: 1725699032-566993 X-HE-Meta: U2FsdGVkX1/xdkS6/dFOU8bDc1jMV4WSHG0q3qRm5EFULTTGDNUSx4Ih8QqPBL/6qWOziYp/NQiH9q1fUn4Gb3BeBii0qrsJ67rPn0Ez0+yysxiwhKx0O3PAIfh06AuuNx9bbXdNoSxuN7sWuHofs72tOYcZJyi2Rm10u2zBXvgXBNoHQAv4dvPTQBan9DaSsUChWrJpeFJw4wk+ayhOxN9mxNkZXsnrwEOlWO56xbL9tMzDvenS30YhyZxt8/olERCncEkojf4R+E5BuxMVjm4rIGz7LnTU4mwWYEump9VEuLaIijL8zX7FxYhEVgvDmIgp7sez8TxwGvhQeE/9pgRnHdq1YEJPc7tsBqUFOXQQhBoe364afq8/8x8ATDVItiCsaQtsy03HhRp2Q8OBT/OMmt4AoBPTzuWlNISlRxtBVOiZczVQPMadP40Hdz+Kdb5oROelfhC7EnyfsWMt+TQVUTvVOv8BfNZle5ztV9M7fzL4dxwkPEz0XB84ICQqmirjjDWA9mYYuoMfthOCbqwICGxKlYgpOQEW2nuwwlL1Bsot0SOoYbDWB830QGGhp0vtpUth6vu1DoO8P2ST6cX+S90PhVgYYytms/QiGHgd9KPzB8prG78r04En3MxBHQi1HJWfbmxChAIU2BU7d3vgWxnjrV0Qz2XanAINrkMIvtgAZoBMY/ggtOBolJRMrKqquJbLrQDtwf7lXwmC15Bdy9lbIcK5BpuTFG+JavDSy/9LNcXM9QVHZPcaB1mXwuyXV9Qttj/LaXbO4jx8tK3z6e9666/btShiN1Vswpul/G8rE8agJwP6OUaoLq+Z5oOJye3Qm1RHDyJMqGrX7eOjdaEenCZp4umbui+IPdkJgQZ81zwh0TWESBxbh/wbvbBDHouQiK9Z6d2pgbmvtp1k99RJQ+skOXNEHU+UUPhYGpeLhHLDMstmZ06eOrev9UIVnDLTMkd0CvUaUds T3AOM/hN 4n15VOArb4v4TpzrtwRx22u2iEtVOXEfrSnXaVN1suLuR2HS7Tu8JvskUMfMEUYIyqo25xUHFfMEW7NaYUSbZMQiDtexorv6ecXwMINTwXijvjwO+U6kw+64GVQmiMF2061BHkIYHkQuU17b5SaLV7YSJW8m5K94LdGIUHsmWLTequiw4oljAW10PwfRsd8+5dN5wFdtibQKUnseGaoG5e5pHSUie9npXXPpm83RNOkfeRTvUv7y7iSrPuP5aOLwrli3Yb2rwzC4P2QgS8WuExFmQSYdNvm8VBTv/4mhj1YNclwMgIDh/Piznsaav05U6k3/Xdftf0AYwueBNdRenvetEC/QZ959CzKqSerm2WtLhAKpFIISMDsqTpJSQGq1y2a1mup01uMpREnsCMYprm1qVupl2pR0qip2NoTdSZ2jvdZXG9e73JVuMsG3OVPSxHPKreJq7XcSMG2UTIF+vkTvfQcX8uvzg8cLCbs/Oc6xBgpOa595QKHAOEmFp0WTioxvC X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The member parent of maple_big_node is never used. Let's remove it. Signed-off-by: Wei Yang CC: Liam R. Howlett --- lib/maple_tree.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 994dd4c8c051..d8f10773e451 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -120,7 +120,6 @@ static const unsigned char mt_min_slots[] = { #define MAPLE_BIG_NODE_GAPS (MAPLE_ARANGE64_SLOTS * 2 + 1) struct maple_big_node { - struct maple_pnode *parent; unsigned long pivot[MAPLE_BIG_NODE_SLOTS - 1]; union { struct maple_enode *slot[MAPLE_BIG_NODE_SLOTS]; From patchwork Sat Sep 7 08:49:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13795161 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 B1F1FE6FE55 for ; Sat, 7 Sep 2024 08:50:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F8C36B008C; Sat, 7 Sep 2024 04:50:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 681126B0092; Sat, 7 Sep 2024 04:50:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56F3D6B0093; Sat, 7 Sep 2024 04:50:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 3C0A96B008C for ; Sat, 7 Sep 2024 04:50:35 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D71F71609C0 for ; Sat, 7 Sep 2024 08:50:34 +0000 (UTC) X-FDA: 82537321188.26.76F9F82 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by imf11.hostedemail.com (Postfix) with ESMTP id 0FE524000A for ; Sat, 7 Sep 2024 08:50:32 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="O7qVI/l2"; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.51 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=1725698935; 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:in-reply-to: references:references:dkim-signature; bh=P2WwYUfzR6zC3Dz2NYj6+ze9q0tWarjPk2ZkGpAiH3g=; b=Q7VGIOOK62PNVdlqN8Q3TUZz9gwMenclmbIN9lXx51G9gl21NHIyFZo/2NBhEs4i7FTeQc OHBfcVTkmJJu4NFOjZtcwABOx1pDEIf5sj4TQKrIyXHrJxcUiZEi9ipUorx/mtXFlTVGqk +qfjFGgYk4X6waRHXiUhLYOvEblwwpo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725698935; a=rsa-sha256; cv=none; b=ptceM4NUXVHmTf5XQNehg1Vt+JDRV/xF23BAjo6+snxC92iIeTbldaYkfNzkP+6a0rEUkf YlQ/qskQkhd5hjTLzWXsJ2gbYffp4JZHmMQQgE7Oybf6rFJ6zvnm0kujwtGq4iIbTUpa3P 3XgIVj6jwQnvKDP3ErTDbUXy4II6eRg= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="O7qVI/l2"; spf=pass (imf11.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.51 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5c24ebaa427so5855379a12.1 for ; Sat, 07 Sep 2024 01:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725699031; x=1726303831; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=P2WwYUfzR6zC3Dz2NYj6+ze9q0tWarjPk2ZkGpAiH3g=; b=O7qVI/l2Fr0ZGhlWpTBkmqc4N8YoU94F+wdo0JAwFV9pFH8jsbbUVFOfie3jLy6C3Y LFeDB5QxjM7Qo3gsynb0EPO/OGbJz85XowiQtp7hnFImKzD6b+EkOaXS+700SdWKCwYu v1F8n2tUu7vCKmiMLlD558Ab8VB/08Wxyss7S81BKtCgR0HHAZSSy17nTa3NtZo23Uo2 fSKUCR7wEVzDUhLULyDaXuarsrhXUzAMTl1arA/AQPQw1Q5UD1LEicI2glpOTdsefMmQ vi7XLFoup5+bGOFF8/6Z424/Pd1JdkQobuGs638VcWvwkE8ZTwXhHzUVjSXtkR8ZHFqp 7P5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725699031; x=1726303831; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P2WwYUfzR6zC3Dz2NYj6+ze9q0tWarjPk2ZkGpAiH3g=; b=QLUlnPeQSYDmM5vxdFWu02QX0YyUbXclsmX1twh0OZrMlBhJGNNe92ul30uaCgfuOw a5QeIKlVgn/uDG/fsgzp4NAancupRbdd5nWrNvoDJLY+vdhwxKrRQP+C6myVjJoA7f7D QobqbqBm1jbjpXFGZQeFa8D6GBjtQb4jchleYZClKuZkduuwVMLmXdNXPbep/z84dvfp siiVZ1Dv65fYTSp3zHKnmSW484IpWjJuYZ1wpkps+Osp2kBrWwtvJPDBUVZRS/FQLaQf 7qXR9l8lbvbi28Z5zSQk341aS0kEYz7uCbpm6d9tT1IHEKe1D1+FcTcoKMTMzre/uIIi Wb2A== X-Forwarded-Encrypted: i=1; AJvYcCVl46lazsgbCqM5a1Z4Ar0Bl/N8pFqCQR/8dTJSJC4la9cUjUABkb8W8fGSZ0JAi00tA7/zy8JNPg==@kvack.org X-Gm-Message-State: AOJu0Yw6cDonAfS3UJKuU+n9Aq2OFkQMT9eD0F89bKWdCZL9LIO9PEky qWxubbosjVB70Zsl3jfON8twBNRnd/qWajkEeNEKtRc/QDB/zi/n X-Google-Smtp-Source: AGHT+IHgUX3hbrWnUU2USmuxHUvaBlHWd0M5acSQsLGx3XvQsbAt3+VAwArqDgQXg+8SoRUTIM8m5g== X-Received: by 2002:a17:907:c06:b0:a87:370:8dfc with SMTP id a640c23a62f3a-a8a8603e91fmr519607766b.14.1725699031055; Sat, 07 Sep 2024 01:50:31 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25d65742sm47433666b.216.2024.09.07.01.50.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Sep 2024 01:50:30 -0700 (PDT) From: Wei Yang To: Liam.Howlett@oracle.com, akpm@linux-foundation.org Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang , "Liam R . Howlett" Subject: [PATCH 2/2] maple_tree: memset maple_big_node as a whole Date: Sat, 7 Sep 2024 08:49:27 +0000 Message-Id: <20240907084927.1547-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240907084927.1547-1-richard.weiyang@gmail.com> References: <20240907084927.1547-1-richard.weiyang@gmail.com> X-Rspamd-Queue-Id: 0FE524000A X-Stat-Signature: zkct3hariqb7uzqqocfepr6uwi6bg9an X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1725699032-598870 X-HE-Meta: U2FsdGVkX1//eESYaeFIvBHeeVFj2PuBcqf/GEu8M9owTbKVumLq7Gt5mh9VNKeJKFhwNxICc+nxQ1HzuxmCzcHUyirQwFTyYBavNC/KhQUhaAKm6bWbq6CYvcgyeisr/jM9HLPOW4pYRq4zJOdaBPDd3c65rWqeR18GwrODToDYp4kkMxCCwa7CtJnLkUtTdZnPi+/2moZZqnKbnTStlvQXiW+O1T2ie+qYYsR4FVXR607SkcfIa5x6C1E1VcfxSm2FLKFU0Y7ZTDM5ovV1PgLYBNPJMKKEkMeoHjJrVJtFsHCwnUactG2SdfwLfnezL6164rVrlVlHD4CnDviVYpgZRWrHfwgEvTD8KxbjsLL1WUcsiOWNFD274h8YFAz/sIXxksiUZ4b+0Kc7i3hCuQ02jWoDqDQVtqFma1FZ0K6S6EYD/qBXfvqKn4rz/J/dQggaBWx0vsdbQNLh/z915b0mXIfn/akafSEew8wx9PpL4dO/Nv5F9bg8WOk1PipydA5Dy/C133P9xPtdF9j57qz0B4wYI4ol4WZLfVU5n8DRrQPWOUasq84LohKsYNM0gC6nxauj0KiZ2c/4bVQiECMFiRU7iZLa9jyJ/fQ+2qDIzQotsobMf6rT06t60Nj+Ghbz61tBG6OkL0A/FGzt33kBPbeMb8k7xxMz3hn7bTGUzZJUNbr6fnJTbeXzH8vS1YjpPA5sw9m0RnzDxFMZ2Bt6lmj8sYxEjBndeeIcga02JmCzsDst3y9wzPS1uX4e2+/qiANkVoJPy3CLu6uO4NyRn+a+1/QzVghHE0okvEEHYHG4K5a/9oS7THpZINiJaJe37uAej3+I1KoDuL4PbmbJZz/fr3+3CHFP2yKjZfjtO4+KVEs4OQpSD2eo/QVx26GkmnGgQPfBTYQi1vTQu4elnNdlH1lVCIFq82Ks7OIKJc6lEMq2Dz1iw4xZ8TDJdTh2Y/Po1jIm3cq5Dkj WFKsrXaB 7bvPIiIrtzp08tL0C3+7KiUWytaq68mksWO8fyvFMGxapQcjDx995sHLAxNBpfuANqHdCqIIODL5w7y7i6tP753guwMQ7mBXkLtSGRJif9oOHpS1BQIWGaliIWQXNtXa0lik0730wlCXkqU/VSLnlGxGbf5X4pa2OWqjhlihy9xeIh85SV2+LWUi6nHP9w1/h7ynZld9lsB3UL9pzKWek95OK9qc6yYUaCg7Bumg2hhSPm8YMNVtQVe+4rxleNeXCJKj4705Q6rhG/bZG+IC6lC74mEJm8Z2RH38Xa0OtwRfRz9vpTnq5/UGpLFYFwK50Qbodeat7s6bAQD3zl9VNW52iSuMcq12RxD7W56pLCGvlS8V3LZQt/tajZcF3epkzUEmRQHomH6JUZBsdL96YWxDs2ncbdqWMZntskhsHNGF4DscoNL0LRwIHRTFA6e+p+nFz1n2yVHQOexbDxpxvNHyw52EdRZWXdeiG X-Bogosity: Ham, tests=bogofilter, spamicity=0.066479, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: In maple_big_node, we define slot and padding/gap in a union. And based on current definition of MAPLE_BIG_NODE_SLOTS/GAPS, padding is always less then slot and part of the gap is overlapped by slot. For example on 64bit system: MAPLE_BIG_NODE_SLOT is 34 MAPLE_BIG_NODE_GAP is 21 With this knowledge, current code actually clear the whole maple_big_node and even clear some space twice. Instead of clear maple_big_node each field separately, let's clear it in one memset. Signed-off-by: Wei Yang CC: Liam R. Howlett --- Liam: This looks obvious, so I just run the ./maple test to see it doesn't break anything. Do you think I need to add a benchmark and run a perf for this kind of change? --- lib/maple_tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index d8f10773e451..911c5e04e634 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3134,10 +3134,7 @@ static inline void mast_fill_bnode(struct maple_subtree_state *mast, bool cp = true; unsigned char split; - memset(mast->bn->gap, 0, sizeof(unsigned long) * ARRAY_SIZE(mast->bn->gap)); - memset(mast->bn->slot, 0, sizeof(unsigned long) * ARRAY_SIZE(mast->bn->slot)); - memset(mast->bn->pivot, 0, sizeof(unsigned long) * ARRAY_SIZE(mast->bn->pivot)); - mast->bn->b_end = 0; + memset(mast->bn, 0, sizeof(struct maple_big_node)); if (mte_is_root(mas->node)) { cp = false;