Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4918167rwb; Tue, 8 Aug 2023 16:39:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuX12ZEIB0kN/3eYnNcd6+5lY9r93XxK7PIfrygK+AlaVZB8Ys38hphwmrf2xlttmEKNF8 X-Received: by 2002:a05:6358:9214:b0:13a:1e90:4813 with SMTP id d20-20020a056358921400b0013a1e904813mr906071rwb.29.1691537940285; Tue, 08 Aug 2023 16:39:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691537940; cv=pass; d=google.com; s=arc-20160816; b=iN5TgaE9CBtGp4czsG2t2uDpd1xstwDlyPdlq/RyS6qm8avyi0jF1a94tBW84bWO6K 9Ocg2yt1hmzfvlMPY6Q2aSisiiMuZXplevJKUNwakfDyN1thJsNDUDNx3cXGLa4jbPXF A15mx1gOV/aJzV0szIkH6FyfUSUbxhdSsvDw01lWk0S0XhDuPg0kpt6pJISP4KQs0yaP CCDzqR2aZUeE2yJWAs6FCuGAbw/wbyDXNIXTmptFwDR8amsD30O00r4dvaXUC6Z0ZFtm Boqn+IcgEKHYNQWszbXdMUGf+DMHrQtXqqGwdJM8Zpn3U+HFazNn8KgbUUXdmz3v9Pcj qPlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:in-reply-to :content-transfer-encoding:content-disposition:references :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=KH+BOwlkHhafFNvrg7GE+uUnGIdDGG7B7eTuNuw2cFk=; fh=wM74Ldsic3UhNJYl7wxj385yMLm23ebJxKr9s2cY/UM=; b=LzJP6YmkZi++1P5GAUdkR9Y6KD1k/lMVz+PNtElYrXHcuqyyF9MdEK4yjVUbSrgfvA dEXK5jlxCZdLq2SZPCYmGb0oASCtrC/0qlzAB5U5UsHmZluUCiOJD9koZKMVJXKH6gY4 WHyUxSiPDmVkkuskEFOCM0/2cRFJvCkiKOVGO06oywPMpy5BjW8xWwMtJ302+QpcGQfB 0ysQ7lik/DhxVoINLq7eLEh6e6UbAlavu1+gRXFBEANKilPdZ0gv0VgInlbYW0FVAfws cuUJX+N+zY8JQ5/xv7f29eI4d9ZIojaoz5lswe2I9ti5pBI7NX4bTyhJSQHH5OtFl5dP SbkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=pM+2ALKc; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=vpJTmaYX; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s184-20020a632cc1000000b00563e13802e8si8044790pgs.753.2023.08.08.16.38.48; Tue, 08 Aug 2023 16:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=pM+2ALKc; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=vpJTmaYX; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbjHHUes (ORCPT + 99 others); Tue, 8 Aug 2023 16:34:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjHHUef (ORCPT ); Tue, 8 Aug 2023 16:34:35 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F22A1F41C for ; Tue, 8 Aug 2023 13:01:27 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 378JiXmo023283; Tue, 8 Aug 2023 20:01:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : content-transfer-encoding : in-reply-to : mime-version; s=corp-2023-03-30; bh=KH+BOwlkHhafFNvrg7GE+uUnGIdDGG7B7eTuNuw2cFk=; b=pM+2ALKcx4FYa1YU1RZlLVXozB3RzDGbrRBudbnioPlsdk91mIl12j9lLztGhZb2gUMQ bhAXmgj5W20Sq1IbLYFbT1VSj/zTrfc10c0tWwcECdBihW2nqRbV7tPezpzUrhwjHjPZ ZBnd+ebISUIxqTny69GqA9ILq3QDkbpsWLxDUBDnMam8EV8b9ShCrftY1x+Tf1w9zEnq XZchDQoSnOfhdlgTsaxIaL/ei/ffrcq6+60UzYVmK38TQOYlL2ibeg94o0NYx/WKUYjO xIPxDmaCpuHdJS6FuUJfsivOA4y9kzrK2rC6tRgUe4aHmc5f3H3BZ7mk9KlBt/hrJ9b+ 6A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3s9dbc6862-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 Aug 2023 20:01:05 +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 378IWwFY032731; Tue, 8 Aug 2023 20:01:04 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3s9cvchuu4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 Aug 2023 20:01:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ByU72cmjIaWw+VWcGu4SyQDlLqmS1/e1DnJUaEW96MDqo5ltC6Z67nPZo6TT5OxXs7GDcj8SCWr8FDvMe+O6fWAaxlCOUbr0Ue7B+/TBQ1SITeJbt7Qx8bfGt0GjDWAsHj6Ol2xuv51J3nlUAzSLyur+Ntz3enPTyuuRnWvfK1XXoM1u6LQrK90mF5YdVooQrSJRS6A1tYKNBohB1bFnBgOSNQvogHTUjQXIwyVJZQDyw+lSuSSgSHCp+jnAnsdTyzsceM6NOmed6Jtl8JHljjiSTu6uKseGjfIOQUPJ1wik+UKCDeIRt0rrqJ0oj0HtdskTzqHZZex8cQoIicxWXg== 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=KH+BOwlkHhafFNvrg7GE+uUnGIdDGG7B7eTuNuw2cFk=; b=jd1IHQ1ufFS8re0HECilxBRj12+60J82WCcUGM35rVdIUSqK6yxQG6cE6gM0FuRzy8yR0cypzv33l6qFPWsiDp2tYwofDujNuJCwt6qTaK+zolBhFREx7D3Lo62g1/hSx4RYocNaQjU61D3ebW9R3U/0+Wu9JHGzLpi0Qfek2OlaoZXAHbt1VBkXdo6xlVRRyr0j7lsviLrIXINZ8vYddARcGU7sqKI54y3XxQbM9ffnw3AbcBPvajjYX8rFvKKnmAIVprHkm7gd/UnJ7/nOJMc/kdiyevW9U8O/UCc+BWheeu5tzOoMw2fwz6KZHiaDIzZFE/fW8qiQWmdTg36hAw== 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=KH+BOwlkHhafFNvrg7GE+uUnGIdDGG7B7eTuNuw2cFk=; b=vpJTmaYXjWOGvsbK2eEVsBqX8/hWCVKLanXO2Eb5H6NaHekM33+46bHu4yt76tNV0UXcoB9+HE005s6WAtYN9t2PozxDnURRTMphuEraF3irpD9esxbTIjyxxzCvKWwwBUV+fXS0S3s6lXZ/C/MJCxzekMbcBImvhTC3tKs1FIc= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by MW4PR10MB6348.namprd10.prod.outlook.com (2603:10b6:303:1ea::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 20:01:00 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::26d3:6f41:6415:8c35]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::26d3:6f41:6415:8c35%3]) with mapi id 15.20.6652.026; Tue, 8 Aug 2023 20:01:00 +0000 Date: Tue, 8 Aug 2023 16:00:57 -0400 From: "Liam R. Howlett" To: John Hsu =?utf-8?B?KOioseawuOe/sCk=?= Cc: Andrew Yang =?utf-8?B?KOaliuaZuuW8tyk=?= , "linux-kernel@vger.kernel.org" , Qun-wei Lin =?utf-8?B?KOael+e+pOW0tCk=?= , "surenb@google.com" , "linux-mm@kvack.org" , Chinwen Chang =?utf-8?B?KOW8temMpuaWhyk=?= , Kuan-Ying Lee =?utf-8?B?KOadjuWGoOepjik=?= , Casper Li =?utf-8?B?KOadjuS4reamrik=?= , "akpm@linux-foundation.org" , "yuzhao@google.com" , "maple-tree@lists.infradead.org" Subject: Re: [BUG] trigger BUG_ON in mas_store_prealloc when low memory Message-ID: <20230808200057.p3pqwkumghqbdvbi@revolver> Mail-Followup-To: "Liam R. Howlett" , John Hsu =?utf-8?B?KOioseawuOe/sCk=?= , Andrew Yang =?utf-8?B?KOaliuaZuuW8tyk=?= , "linux-kernel@vger.kernel.org" , Qun-wei Lin =?utf-8?B?KOael+e+pOW0tCk=?= , "surenb@google.com" , "linux-mm@kvack.org" , Chinwen Chang =?utf-8?B?KOW8temMpuaWhyk=?= , Kuan-Ying Lee =?utf-8?B?KOadjuWGoOepjik=?= , Casper Li =?utf-8?B?KOadjuS4reamrik=?= , "akpm@linux-foundation.org" , "yuzhao@google.com" , "maple-tree@lists.infradead.org" References: <20230613141114.bwbnqsdazqbmyj3u@revolver> <3b14df2fc2a7f18fe12f87a27574b7d40f2899ba.camel@mediatek.com> <20230614155826.cxcpv33hs763gyrg@revolver> <20230706185436.agobbv72o3hma43z@revolver> <3507fdacf001c49f4c73f2952257beabfe9e1a53.camel@mediatek.com> <20230710142425.t5vhrqkjd7ugbmad@revolver> <20230719185135.nyun5fvcuv3ydku4@revolver> <981aac92a51c4e2cfd2ca83d11742e5741e60285.camel@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <981aac92a51c4e2cfd2ca83d11742e5741e60285.camel@mediatek.com> User-Agent: NeoMutt/20220429 X-ClientProxiedBy: YT2PR01CA0006.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:38::11) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|MW4PR10MB6348:EE_ X-MS-Office365-Filtering-Correlation-Id: 4fb71cea-8dd7-431c-f07b-08db984a300c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hI6iUIVrwr/aN6+006TM/YqCDSpQ0DK/l/0jSd3i3GXKM80VM8KDNhazm0FySPH6J7T6RIZ2pmZ1eXeWnIA7ekyLTBZjK7uAcpDdQmQYkGj0odRif/aKHyMT4KBja6Yuq82z0cvZolFZ6avy7UNU1rdNYPP/z9cVehdccz/DNyPZvNs2RPgA0CAc76mtN0bzDDk/r1hmq5/HmySF2VSsIjCqw8ggJ56OOksV6d844EE7LycEjOH3Fp+OqR5U2Z/gglcrNpm7FL7yY5Bq94GbHjb+QpbfOZ89wfgBRrLLQat2JvUvtSfCkkfphr94nGO4aptK6GdDwnkUzUHRAYVBCzzNVIX0UMrAl84vKU0zSJ6GW6y5lU9cmU2yWClBl2nFN4vO9H2DkFoot2NHlMzURIz2DkAe/zvfokO88FO5yGeNb+DOi7hryAUpA6F89BkwjfWK1VmSdynP9Avgitw6O7n5096+f+5+H/QDCnIfd9jyAOutkSobDR1El4adkt99Fhmal3FtZ6Gtb/ogOyVYbXioQjLZNuX3We3ARpUIYLs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(376002)(346002)(136003)(396003)(366004)(39860400002)(1800799003)(186006)(451199021)(316002)(83380400001)(2906002)(8936002)(8676002)(26005)(38100700002)(5660300002)(6666004)(6486002)(7416002)(41300700001)(66476007)(33716001)(6916009)(66556008)(4326008)(66946007)(1076003)(6506007)(478600001)(54906003)(86362001)(9686003)(966005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVZHMVVEcEdCNVZod0c0SURrd0hmb1d6b1gydmRML0t5SVFTNWN3YlpZdDNZ?= =?utf-8?B?ZGNqeXRZWjBVWkhrOVVUTkpoMXJPZEFIVlNieDEwd3hnTDdJYmJmL1ZpKytD?= =?utf-8?B?ZitDZjVjbXdadlcveVFoQXQ1WmpUZmFlamRYQ215YmtqV2lCcHM3UEFIek9O?= =?utf-8?B?eHVZck1SMkFia3JQTEMyWmpvdmVqTU9wS0szNElVb0V0amFGUndhTkFxbzJa?= =?utf-8?B?SVNwQWxrVUU1bzRmYW5jYUczWVNyTlhocjhkbFRUd3dZSFJ1NkJCK3FGSUVF?= =?utf-8?B?amUrY0IwZW9PRmRwWXVNRkU1QUZSOU03R2pUVUswZkd2b0IrVEtWTVd3WTVl?= =?utf-8?B?UURERjYrZExVWlJ6Y2tKcnY2Ri9raDRnWkU0b1VXTU9kWjREWURtZklwWEc2?= =?utf-8?B?NFNUdkxvTDhXcW9MOXR5a3hCS3JCRWU5MWh3ZGRva1VNUVI3UjM3S2JHVEJS?= =?utf-8?B?SUs0R3h2RndTbTFpRDJmeEs0d051T1oyb0ZYaS96VXZISHB0RHhZZ0ZqTVJs?= =?utf-8?B?cWloUGJuOC9wVW5jUkROcFVIazFHVG85VklHQ1J1b1MyQnNoQ1lGU3N5QVZZ?= =?utf-8?B?Q3lTSkpTSkd3THNIYTFXbWs0MUpPYVBDU2lWU3ROMTR0cENBVkUrV0hOZjhH?= =?utf-8?B?Q01MRTNsSGFjdXpKQWhvQTc1aVhZOFl6aU1vTmd1YmFqU3B4MThMcW5iT2RB?= =?utf-8?B?TXZoa2JpR2NrUjE3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RIbnAxcVBFRVpYTlByUjZVR0ovUUZySno2Y0doOXhL?= =?utf-8?B?TnhWRUVUWmtjRGFpaTBRdEg1SldLSWdKYW9aN3crL0JCTXNmL1ZlOWk0SzhY?= =?utf-8?B?MDhJT0VyVTB3WkM4MDFjWkdHb2JhK2tQZklJS0tmZWZQRjUyZz09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fb71cea-8dd7-431c-f07b-08db984a300c X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 20:01:00.5172 (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: rBQH2CCk0UK9/bFD8gLhIP05DAf2Ma4aIjpINYDr2ehPPgEjJIcYXAU9ButK0Gt18AWpeK5o1ZakCwJWjs5adw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6348 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-08_18,2023-08-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308080177 X-Proofpoint-ORIG-GUID: IzOflIOWKKPJIqi1YLqAx12hVN8ntf48 X-Proofpoint-GUID: IzOflIOWKKPJIqi1YLqAx12hVN8ntf48 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * John Hsu (=E8=A8=B1=E6=B0=B8=E7=BF=B0) [230807 05= :55]: > On Wed, 2023-07-19 at 14:51 -0400, Liam R. Howlett wrote: ... > > > As I know, following is rb_tree flow in 5.15.186: > > >=20 > > > ... > > > mmap_write_lock_killable(mm) > > > ... > > > do_mmap() > > > ... > > > mmap_region() > > > ... > > > vm_area_alloc(mm) > > > ... > > > mmap_write_unlock(mm) > > >=20 > > > vm_area_alloc is in the mmap_lock hoding period. > > > It seems that the flow would sleep here in rb_tree flow. > > > If I miss anything, please tell me, thanks! > >=20 > > Before the mmap_write_unlock(mm) in the above sequence, the > > i_mmap_lock_write(), anon_vma_lock_write(), and/or the > > flush_dcache_mmap_lock() may be taken. Check __vma_adjust(). > >=20 > > The insertion into the tree needs to hold some subset of these locks. > > The rb-tree insert did not allocate within these locks, but the maple > > tree would need to allocate within these locks to insert into the > > tree. > > This is why the preallocation exists and why it is necessary. > >=20 >=20 > Yap, preallocation is necessary. anon_vma_lock_write() and > flush_dcache_mmap_lock() hold the lock and manipulate rb_tree. I think > that there is no maple tree manipulations during the lock holding > period. Is there any future work in this section? __vma_adjust() does modify the maple tree during the lock holding section through vma_mas_store() in 6.1. Prior to 6.1, there is no maple tree. ... > > There are also config options to debug the tree operations, but they > > do > > not detect the redundant write issues. Perhaps I can look at adding > > support for detecting redundant writes, but that will not be > > backported > > to a stable kernel. > >=20 >=20 > The sufficient test cases of maple tree ensure the function work well. > But the redundant operations (alloc node, free node, tree > manipulations) of maple_tree are not easy to detect (e.g. the case > reported this time and mas_preallocate() allocates redundant nodes with > the worst case). >=20 > The detecting redundant writes mechanism may help the developers to > find out the problems easier. Hope it can be establised successfully!! When I went to add this, I had found I already added it here [1]. This operation was not caught by MA_STATE_PREALLOC because there are two writes before a mas_destroy(), so there may be nodes left which avoid the warning. I'll look at improving this situation. Thanks, Liam [1] https://lore.kernel.org/linux-mm/20220722160546.1478722-2-Liam.Howlett@= oracle.com/