Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4575200pxv; Tue, 29 Jun 2021 10:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdw1c9qRy1b9u4Ue5YYSZPas1q1TSCGzQ7J0mFpKel0vW0DCrR9On4O0PvkqQWhMryg4Dz X-Received: by 2002:a17:906:c78b:: with SMTP id cw11mr5549327ejb.315.1624986505876; Tue, 29 Jun 2021 10:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624986505; cv=none; d=google.com; s=arc-20160816; b=yOMO2+jl35X0Vahh+SUQxwwM3m512YYM9k7loWG04YPExSt9b80xiqEVt2jbDUBoFN +t+UDK6tsugzWd+xnIyITtg/eawKzxZvZXLMyV5tWjWPGTuawL7CoafJK766hupnRteE LA090ZfwZET3ZM6rnmXkGaEK0tk+Y3GAdHpTkrloJwa4BcY6MbGCkmdHzRH5bC0RftIh UGKULpBBS2aBsZVVxSfNfh0pIaEstY5/92Q5QPG6P53j7r3kESOeI3ZaN3inhLxNzuNt hvtVzIgD8cUw+k/jKRsNSIrNObkCjWbXrwj+6BalPHDD4pXd9/h0d40uNKrhWoxAAlyl Pb9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=d6kM8huxz7lJgI8Xfv5+EFDJ6mF8Gy+7vQKfdOcS19g=; b=PiwgJEj2L/oUoILjx/VbwsrQoLmkbfIkW7UmEcwd+8WXTM7gGdD2hMGGDq3+P8mqg5 jjRV/D8LBIvkL4BtNCwQ1Sa0qBqg4ipsYslLVP3vhDBznOxjZu/mQkMeuxBbgaFWgE9U ChnP5IxEKpX4zG8LlBlOPgVmj/OROueJVKa2fH51ViDGN5raQ6oco2+/HlwkqQN3dZ7V HblrZ2Vq5l3OeKqXUBhUIuFJzT6e/NmXLUghFHf3VMNo9Lff4wLw464x4qOQrBRLdtuq FDknEYUF6M8IJ3oNZURrmgTTsx1W0J4IQM6QeTB5WM+OCEHnBKAe1B0fX28uhracV1Am auOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d25si3046819edv.595.2021.06.29.10.08.01; Tue, 29 Jun 2021 10:08:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234402AbhF2RCP (ORCPT + 99 others); Tue, 29 Jun 2021 13:02:15 -0400 Received: from mail-vs1-f52.google.com ([209.85.217.52]:39848 "EHLO mail-vs1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234376AbhF2RCN (ORCPT ); Tue, 29 Jun 2021 13:02:13 -0400 Received: by mail-vs1-f52.google.com with SMTP id 68so12510980vsu.6; 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=fp5RePSOEvsHglo+ey1T+DtqvMAoWXJZPTgdRDYM+Uo2neYmS/HEiwEOv6bg1rZFnp pbHplDyNhtQyNDO8zyq64mjsdAy4MwUBFez5ckHnECh3zhHsF1EaaRL0xWOlX1yw18C2 HwC+kSaR9zJOWP/WLXYVy1JFsReU1eHjQo4/4YGg5xLNKMiug5S8aBUOKfbEGyzFq+GW U8Uumre3A9lGtIXo8Bj5p0KtIMDeC3YUN4qGcBFoKtg0cEJylAWfong3k9g6zp+Lu6an 0IR4c4gQ2qRmZarYnmTMx2g4BzSkrJ0h07aRoM8gCe+ussFT4Cwwk0Fty5WS+L/Pi0pC 1P+A== X-Gm-Message-State: AOAM532L5pNKVdDYPxSgduY9SpTzc1L+YclQtLo/p/VhS3CJsONG/I5F HswW9uD+dvNlc5C68SbXsa1czrMOrr9EJQThApo= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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