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 ABEF0C7EE26 for ; Tue, 23 May 2023 21:41:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235733AbjEWVlT convert rfc822-to-8bit (ORCPT ); Tue, 23 May 2023 17:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234835AbjEWVlT (ORCPT ); Tue, 23 May 2023 17:41:19 -0400 X-Greylist: delayed 600 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 23 May 2023 14:41:18 PDT Received: from pio-pvt-msa3.bahnhof.se (pio-pvt-msa3.bahnhof.se [79.136.2.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DA4AFA for ; Tue, 23 May 2023 14:41:18 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTP id 53B533F4FA; Tue, 23 May 2023 23:25:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Received: from pio-pvt-msa3.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa3.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xWoa5MYq7N-Q; Tue, 23 May 2023 23:25:42 +0200 (CEST) Received: by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTPA id 61CCF3F414; Tue, 23 May 2023 23:25:41 +0200 (CEST) Received: from [192.168.0.126] (port=60034) by tnonline.net with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q1ZVk-000GEM-Nn; Tue, 23 May 2023 23:25:40 +0200 Date: Tue, 23 May 2023 23:25:38 +0200 (GMT+02:00) From: Forza To: Uladzislau Rezki , Bagas Sanjaya Cc: Linux btrfs , Linux Kernel Mailing List , Linux Regressions , Linux Stable , Chris Mason , Josef Bacik , David Sterba , a1bert@atlas.cz, urezki@gmail.com Message-ID: <26007e3.faed4a1b.1884a80d9e8@tnonline.net> In-Reply-To: References: Subject: Re: Fwd: vmalloc error: btrfs-delalloc btrfs_work_helper [btrfs] in kernel 6.3.x MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT X-Mailer: R2Mail2 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org ---- From: Uladzislau Rezki -- Sent: 2023-05-23 - 12:28 ---- > On Tue, May 23, 2023 at 08:52:21AM +0700, Bagas Sanjaya wrote: >> On Mon, May 22, 2023 at 09:04:05PM +0200, Forza wrote: >> > I have a similar experience with kernel 6.3 where vmalloc fails in a similar way. I was able to reproduce it in a QEMU VM as well as on my system. >> > >> > https://lore.kernel.org/all/d11418b6-38e5-eb78-1537-c39245dc0b78@tnonline.net/T/ >> >> Thanks for your similar report. Telling regzbot about it: >> >> #regzbot link: https://lore.kernel.org/all/d11418b6-38e5-eb78-1537-c39245dc0b78@tnonline.net/ >> > It is good that you can reproduce it. Could you please test below patch? Yes, applied it to my test VM and will let it run over night to see how it turns out. I'll post again tomorrow. Thanks. > > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 31ff782d368b..7a06452f7807 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -2957,14 +2957,18 @@ vm_area_alloc_pages(gfp_t gfp, int nid, > page = alloc_pages(alloc_gfp, order); > else > page = alloc_pages_node(nid, alloc_gfp, order); > + > if (unlikely(!page)) { > - if (!nofail) > - break; > + if (nofail) > + alloc_gfp |= __GFP_NOFAIL; > > - /* fall back to the zero order allocations */ > - alloc_gfp |= __GFP_NOFAIL; > - order = 0; > - continue; > + /* Fall back to the zero order allocations. */ > + if (order || nofail) { > + order = 0; > + continue; > + } > + > + break; > } > > /* > > > Thanks! > > -- > Uladzislau Rezki