From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA151EE14D3 for ; Thu, 7 Sep 2023 04:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239913AbjIGELP (ORCPT ); Thu, 7 Sep 2023 00:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbjIGELC (ORCPT ); Thu, 7 Sep 2023 00:11:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E556199F for ; Wed, 6 Sep 2023 21:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=9UzaIJHInJlgwQfLKiyRFrgprSJsNB4MmXDA+n+Rqa8=; b=NxbZcGmtObKKKMrOvJ4xI4xAVD BtXfbfHyyWOqXFD8wSsX7y+5BcvzIuBPwKYz5OB5RsNrOgQb7l3Jb+NEbK0SY0rKOasI/0alHzm7J 6e2l78Dbr0lyi4IRrFdu9H0eYlrKK5vzstp4QJ44jY1ss5V8M8yhBmY4z1P7Hr8wbo4+2Pd3AMCAb lrdoMuTHYMFncAofbakz8JPzNYQ7/MDSf584PYJ/PCwMr2pNF5ogkBAL9bX5F3mpYGD64EkST+t+T 0HTlJleUKJJRmVknlB6nSlHsqtdyhLviKK2levIK/tNF4w+h8vCkPuZK8QxO4Uk+qwonCTTdBerEt 0S9cwQ/g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qe6Lk-0084Ax-QE; Thu, 07 Sep 2023 04:10:36 +0000 Date: Thu, 7 Sep 2023 05:10:36 +0100 From: Matthew Wilcox To: Peng Zhang Cc: =?utf-8?B?7Ius7J6s7ISg?= , "liam.howlett@oracle.com" , "surenb@google.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "jaewon31.kim@gmail.com" , "maple-tree@lists.infradead.org" Subject: Re: [PATCH] maple_tree: use GFP_KERNEL on mas_node_count Message-ID: References: <20230907033914epcms1p61c5eed4d34d5c4212436c201f33292b3@epcms1p6> <06a8624e-00bb-a332-4271-860847faf4a3@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <06a8624e-00bb-a332-4271-860847faf4a3@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 07, 2023 at 12:02:02PM +0800, Peng Zhang wrote: > > > 在 2023/9/7 11:49, Matthew Wilcox 写道: > > On Thu, Sep 07, 2023 at 12:39:14PM +0900, 심재선 wrote: > > > Use GFP_KERNEL on mas_node_count instead of GFP_NOWAIT | __GFP_NOWARN > > > in order to allow memory reclaim. > There are many paths that call maple tree's mas_node_count(). Some paths > cannot reclaim memory. Right ... but we should be handling the ENOMEM inside the maple tree and allocating some nodes with GFP_KERNEL instead of failing fork(). > > What testing did you do of this patch? In particular, did you try it > > with lockdep enabled?