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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C553C11F67 for ; Tue, 29 Jun 2021 16:59:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F22761DE7 for ; Tue, 29 Jun 2021 16:59:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F22761DE7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 50AC48D015A; Tue, 29 Jun 2021 12:59:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4BAB68D00F0; Tue, 29 Jun 2021 12:59:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3825F8D015A; Tue, 29 Jun 2021 12:59:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id 0897E8D00F0 for ; Tue, 29 Jun 2021 12:59:45 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E46F018209BFC for ; Tue, 29 Jun 2021 16:59:45 +0000 (UTC) X-FDA: 78307373130.23.46E1EAC Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) by imf16.hostedemail.com (Postfix) with ESMTP id 6ECFCF000092 for ; Tue, 29 Jun 2021 16:59:45 +0000 (UTC) Received: by mail-vs1-f50.google.com with SMTP id x141so7875896vsx.2 for ; Tue, 29 Jun 2021 09:59:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d6kM8huxz7lJgI8Xfv5+EFDJ6mF8Gy+7vQKfdOcS19g=; b=AKGozoe/wpfCY7Ec/xlSjSzensaoCCncatJq+0M/HmJehxe+7Mq5tce1VOiZyUL1y6 jx7o8ebdpS/1JsUg1aBDJgy+9HBdWPNFRvw8+akFkN18gRMLKYM5M6iiczMKfwETEp0O 9fRDmUhV52cmvAOJMr8oZhbcIIxdsPDFWWaKKcoZnE72pY3/wPm3bYoRsMxyQAd6micI IP5M4ywHuP+/zswEMk2XR/4v+Vh3dRphK/3Vax1q0KRy1t9j9U+251Srf9x7Yo60Ic1k lOZUdpCw0Pi6MY9IfQ9tkeTg5Bnt1Xgq8OO7E8unprXHyaZgE8H/Zg0Io8ehVSh+nbMz 7PFw== X-Gm-Message-State: AOAM5322BcoI/DLOa7wjuSUh1bX0WAfXgYQl72N3keTeGn6RxxUwv+gA B79mGM7Vrk366x2zGbpXGHmHjqXD2ipHGwN35Aw= X-Google-Smtp-Source: ABdhPJzzcfBcWfxV4oG3KAOB1O7urgSJJ6l9mjK3mg1+2cztn7oWwFtnQADXEJYyas4Chh7UwEflCtlWkyZjjtHRDUc= X-Received: by 2002:a67:f7c2:: with SMTP id a2mr24942894vsp.3.1624985984662; Tue, 29 Jun 2021 09:59:44 -0700 (PDT) MIME-Version: 1.0 References: <20210628150219.GC3840@techsingularity.net> In-Reply-To: <20210628150219.GC3840@techsingularity.net> From: Geert Uytterhoeven Date: Tue, 29 Jun 2021 18:59:33 +0200 Message-ID: Subject: Re: [PATCH] mm/page_alloc: Correct return value of populated elements if bulk array is populated To: Mel Gorman Cc: Andrew Morton , Dave Jones , Dan Carpenter , Jesper Dangaard Brouer , Vlastimil Babka , Linux-MM , LKML , Linus Torvalds , Linux-Renesas Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6ECFCF000092 X-Stat-Signature: iamwkoqkuj3pjpnidyctq5kf7nse8m8w Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of geertuytterhoeven@gmail.com designates 209.85.217.50 as permitted sender) smtp.mailfrom=geertuytterhoeven@gmail.com; dmarc=none X-HE-Tag: 1624985985-463227 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Mel, On Mon, Jun 28, 2021 at 5:29 PM Mel Gorman 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 > Signed-off-by: Mel Gorman > Cc: [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 [] (__schedule) from [] (schedule+0xc0/0x110) [] (schedule) from [] (schedule_timeout+0xc8/0x108) [] (schedule_timeout) from [] (svc_recv+0x108/0xa30) [] (svc_recv) from [] (nfs4_callback_svc+0x6c/0x84) [] (nfs4_callback_svc) from [] (kthread+0x128/0x138) [] (kthread) from [] (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 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