public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>, Forza <forza@tnonline.net>
Cc: Forza <forza@tnonline.net>,
	Linux btrfs <linux-btrfs@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Regressions <regressions@lists.linux.dev>,
	Linux Stable <stable@vger.kernel.org>, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	a1bert@atlas.cz, urezki@gmail.com
Subject: Re: Fwd: vmalloc error: btrfs-delalloc btrfs_work_helper [btrfs] in kernel 6.3.x
Date: Tue, 23 May 2023 12:28:37 +0200	[thread overview]
Message-ID: <ZGyVVQxnw6Tn7Xb8@pc636> (raw)
In-Reply-To: <ZGwcVTpQNBoJHBB+@debian.me>

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

  reply	other threads:[~2023-05-23 10:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 13:25 Fwd: vmalloc error: btrfs-delalloc btrfs_work_helper [btrfs] in kernel 6.3.x Bagas Sanjaya
2023-05-22 16:00 ` Uladzislau Rezki
2023-05-22 19:09   ` David Sterba
2023-05-22 19:04 ` Forza
2023-05-23  1:52   ` Bagas Sanjaya
2023-05-23 10:28     ` Uladzislau Rezki [this message]
2023-05-23 21:25       ` Forza
2023-05-24  5:57       ` Forza
2023-05-24  9:13         ` David Sterba
2023-05-26 12:24           ` Uladzislau Rezki
2023-07-02 23:28             ` Forza
2023-07-06  8:08               ` Forza
2023-07-06 10:54                 ` Linux regression tracking (Thorsten Leemhuis)
2023-07-07 10:13                   ` Forza
2023-08-02 11:41                     ` default_enter_idle leaked IRQ state Forza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZGyVVQxnw6Tn7Xb8@pc636 \
    --to=urezki@gmail.com \
    --cc=a1bert@atlas.cz \
    --cc=bagasdotme@gmail.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=forza@tnonline.net \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox