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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 E247DC49EBB for ; Mon, 28 Jun 2021 15:38:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C918D61465 for ; Mon, 28 Jun 2021 15:38:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235021AbhF1PlI (ORCPT ); Mon, 28 Jun 2021 11:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237174AbhF1PjU (ORCPT ); Mon, 28 Jun 2021 11:39:20 -0400 Received: from scorn.kernelslacker.org (scorn.kernelslacker.org [IPv6:2600:3c03:e000:2fb::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3969FC061D7C for ; Mon, 28 Jun 2021 07:48:13 -0700 (PDT) Received: from [2601:196:4600:6634:ae9e:17ff:feb7:72ca] (helo=wopr.kernelslacker.org) by scorn.kernelslacker.org with esmtp (Exim 4.92) (envelope-from ) id 1lxsYQ-0000KC-9i; Mon, 28 Jun 2021 10:48:06 -0400 Received: by wopr.kernelslacker.org (Postfix, from userid 1026) id D320F560148; Mon, 28 Jun 2021 10:48:05 -0400 (EDT) Date: Mon, 28 Jun 2021 10:48:05 -0400 From: Dave Jones To: Mel Gorman Cc: Andrew Morton , Dan Carpenter , Jesper Dangaard Brouer , Vlastimil Babka , Linux-MM , LKML , Linus Torvalds Subject: Re: [PATCH] mm/page_alloc: do bulk array bounds check after checking populated elements Message-ID: <20210628144805.GA3687@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Mel Gorman , Andrew Morton , Dan Carpenter , Jesper Dangaard Brouer , Vlastimil Babka , Linux-MM , LKML , Linus Torvalds References: <20210618125102.GU30378@techsingularity.net> <20210628042759.GA19686@codemonkey.org.uk> <20210628115322.GA3840@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210628115322.GA3840@techsingularity.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 12:53:23PM +0100, Mel Gorman wrote: > > 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. Bisect lands on > > this commit. > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index ef2265f86b91..04220581579c 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5058,7 +5058,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid, > > /* Already populated array? */ > if (unlikely(page_array && nr_pages - nr_populated == 0)) > - return 0; > + return nr_populated; Yep, this works. Dave