Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4210398pxv; Tue, 29 Jun 2021 01:24:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0KtpxyW5I1e+oNCnlYkpYYKYJXHirbxZGj2qTx4bEXTeHva3Lj4g8QW2nLQkANCDUB1V/ X-Received: by 2002:a05:6638:190e:: with SMTP id p14mr3164841jal.70.1624955088658; Tue, 29 Jun 2021 01:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624955088; cv=none; d=google.com; s=arc-20160816; b=QWBfNvoxuByQRgdV5rcwgnce+e0uMBz6dycaNi6QboJ+1kd0nl+GxXHGwiY8CiKF7c BqTLp+xUtDqqO7dxyXW2zMtBdN0+Nc81+AjQh3vdh0cyzTcz3UMGvBPrqT0pIr803YjM sVJwegDcJ9ipA8qafp/nWb4P5jizZQpP7xjR4FZOOyrZwtQIgQIEjTHKNF0QxwpIEKDg gSQ5g44+hy/eV+QvVb6cMSmK0SYT20xJI0AmoLQVxBDgTtBsTR5AgA8PXLgjOxkRvBfe EL9pfeiZaKSuE58B1P3Ue2URIlGk1b3RFvQtbu1Y+jVfhjM6+6Yo5+oOh8RuXjKBVJ5t T22g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WzAy/oA7w+Fr3eUmX5s1ifE2dlMGHEVaxmBXKpAAE7U=; b=D2ryh/lQWebwjxjLWy4J9+S68Ma33bcyiPspEmo7ynUcc62ZWMuPWnwg9P+g2UvDmv m3b7fHaR1FcKPB7VF44IRweixrztL+E0AUJ/GhDJcxayfPqXw+cCekLaTZRRxi4QLv5i aItPnR1avL+BGvAuzFMFpO+OyTmvv+vLgxfUibL1o9CbEy9La4XFPEjMffVWr1KDdYZx RWWYEPCLtFPoIUgmn29T0WIuXOnxqKZXqtTZ5WqXHeLz3qpMfDBeJTXnQa9fJLbaOJvv 87wbXNG/orSpC+0ahchA3tr/2IADvwpjhe90n2B6PJ9y9PlV+TpLWHQDA+MBxwjJLSlJ TquQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 t14si21667313jan.114.2021.06.29.01.24.28; Tue, 29 Jun 2021 01:24:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232364AbhF2I0o (ORCPT + 99 others); Tue, 29 Jun 2021 04:26:44 -0400 Received: from outbound-smtp61.blacknight.com ([46.22.136.249]:33429 "EHLO outbound-smtp61.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232308AbhF2I0o (ORCPT ); Tue, 29 Jun 2021 04:26:44 -0400 X-Greylist: delayed 583 seconds by postgrey-1.27 at vger.kernel.org; Tue, 29 Jun 2021 04:26:44 EDT Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp61.blacknight.com (Postfix) with ESMTPS id E9198FACA9 for ; Tue, 29 Jun 2021 09:14:33 +0100 (IST) Received: (qmail 27951 invoked from network); 29 Jun 2021 08:14:33 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 29 Jun 2021 08:14:33 -0000 Date: Tue, 29 Jun 2021 09:14:32 +0100 From: Mel Gorman To: Chuck Lever Cc: linux-nfs@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox Subject: Re: [PATCH v2] mm/page_alloc: Return nr_populated when the array is full Message-ID: <20210629081432.GE3840@techsingularity.net> References: <162490397938.1485.7782934829743772831.stgit@klimt.1015granger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <162490397938.1485.7782934829743772831.stgit@klimt.1015granger.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Jun 28, 2021 at 02:12:59PM -0400, Chuck Lever wrote: > The SUNRPC consumer of __alloc_bulk_pages() legitimately calls it > with a full array sometimes. In that case, the correct return code, > according to the API contract, is to return the number of pages > already in the array/list. > > Let's clean up the return logic to make it clear that the returned > value is always the total number of pages in the array/list, not the > number of pages that were allocated during this call. > > Fixes: b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") > Signed-off-by: Chuck Lever Commit 66d9282523b3 ("mm/page_alloc: Correct return value of populated elements if bulk array is populated") has since been merged as it was the minimal obvious for the problem introduced but I have no objection to your patch being rebased on top and sent as a cleanup. Thanks. -- Mel Gorman SUSE Labs