[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGyVVQxnw6Tn7Xb8@pc636>
Date: Tue, 23 May 2023 12:28:37 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Bagas Sanjaya <bagasdotme@...il.com>, Forza <forza@...nline.net>
Cc: Forza <forza@...nline.net>,
Linux btrfs <linux-btrfs@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Regressions <regressions@...ts.linux.dev>,
Linux Stable <stable@...r.kernel.org>,
Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, a1bert@...as.cz,
urezki@...il.com
Subject: Re: Fwd: vmalloc error: btrfs-delalloc btrfs_work_helper [btrfs] in
kernel 6.3.x
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?
<snip>
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;
}
/*
<snip>
Thanks!
--
Uladzislau Rezki
Powered by blists - more mailing lists