linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Dave Jones <davej@codemonkey.org.uk>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>, Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] mm/page_alloc: Correct return value of populated elements if bulk array is populated
Date: Tue, 29 Jun 2021 18:59:33 +0200	[thread overview]
Message-ID: <CAMuHMdXz8RZs2B+juy67smYEzRny9Yej9fUr9odHtSsJb9frQw@mail.gmail.com> (raw)
In-Reply-To: <20210628150219.GC3840@techsingularity.net>

Hi Mel,

On Mon, Jun 28, 2021 at 5:29 PM Mel Gorman <mgorman@techsingularity.net> wrote:
> Dave Jones reported the following
>
>         This made it into 5.13 final, and completely breaks NFSD for me
>         (Serving tcp v3 mounts).  Existing mounts on clients hang, as do
>         new mounts from new clients.  Rebooting the server back to rc7
>         everything recovers.
>
> The commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after
> checking populated elements") returns the wrong value if the array is
> already populated which is interpreted as an allocation failure. Dave
> reported this fixes his problem and it also passed a test running dbench
> over NFS.
>
> Fixes: b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements")
> Reported-and-tested-by: Dave Jones <davej@codemonkey.org.uk>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
> Cc: <stable@vger.kernel.org> [5.13+]

I saw similar failures as Mike Galbraith when doing s2idle or s2ram
on some boards with some configs:

    Freezing of tasks failed after 20.004 seconds (1 tasks refusing to
freeze, wq_busy=0):
    task:NFSv4 callback  state:S stack:    0 pid:  280 ppid:     2
flags:0x00000000
    [<c094b634>] (__schedule) from [<c094b8d0>] (schedule+0xc0/0x110)
    [<c094b8d0>] (schedule) from [<c094faec>] (schedule_timeout+0xc8/0x108)
    [<c094faec>] (schedule_timeout) from [<c092e0a0>] (svc_recv+0x108/0xa30)
    [<c092e0a0>] (svc_recv) from [<c04c5990>] (nfs4_callback_svc+0x6c/0x84)
    [<c04c5990>] (nfs4_callback_svc) from [<c0244ddc>] (kthread+0x128/0x138)
    [<c0244ddc>] (kthread) from [<c0200114>] (ret_from_fork+0x14/0x20)

I've bisected it (twice, as I couldn't believe the result) to the
same commit, which helped me find the fix.

After cherry-picking commit 66d9282523b32281 ("mm/page_alloc: Correct
return value of populated elements if bulk array is populated"),
the problem went away.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      reply	other threads:[~2021-06-29 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 15:02 [PATCH] mm/page_alloc: Correct return value of populated elements if bulk array is populated Mel Gorman
2021-06-29 16:59 ` Geert Uytterhoeven [this message]

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=CAMuHMdXz8RZs2B+juy67smYEzRny9Yej9fUr9odHtSsJb9frQw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).