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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 0782AC11F64 for ; Mon, 28 Jun 2021 18:18:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 393F661C7B for ; Mon, 28 Jun 2021 18:18:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 393F661C7B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3FB698D0069; Mon, 28 Jun 2021 14:18:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AB038D0016; Mon, 28 Jun 2021 14:18:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2739A8D0069; Mon, 28 Jun 2021 14:18:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0115.hostedemail.com [216.40.44.115]) by kanga.kvack.org (Postfix) with ESMTP id 04CBC8D0016 for ; Mon, 28 Jun 2021 14:18:48 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E89B6180943E3 for ; Mon, 28 Jun 2021 18:18:48 +0000 (UTC) X-FDA: 78303943536.39.8A6D021 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id C1C5740002C1 for ; Mon, 28 Jun 2021 18:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JNNNgeDK9vrSkvO77tVgzXeNExzgN8gRgCBdSERbBU4=; b=sTrsocwSO1Mb71e3dDBdebKoDk 7WmCRYe3gNqKQohNm4bRDhzyjXhujYsu0ONzppYo9Do4JV6yfsMuX9arn+KsEm3UgF7tX0WOEMjp9 FBvbNfe7q+HdNd99KYqfLx00itJQ9kSKBfXsbBPKVnq8V9Owr41zIQxz02k3qjcqOv+AOCP8Fxqgg Iw+SBnY5+dQls2WoNWPcdcrRJ1DXYr6v1u/uARdMlBuJrRAVXgcxpotVt974aMWgV3V1tVwTnNHfD IOoLVlrF43uKngmbBog+e5jgG1OLI3lTS31j65rxUwTTylqEs6jR2jqGizbQ2ByA7DkGv5RgXDxG4 MpExFxUQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxvox-003KIY-Pb; Mon, 28 Jun 2021 18:17:43 +0000 Date: Mon, 28 Jun 2021 19:17:23 +0100 From: Matthew Wilcox To: Chuck Lever Cc: mgorman@techsingularity.net, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2] mm/page_alloc: Return nr_populated when the array is full Message-ID: References: <162490397938.1485.7782934829743772831.stgit@klimt.1015granger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162490397938.1485.7782934829743772831.stgit@klimt.1015granger.net> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: C1C5740002C1 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=sTrsocwS; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: sfoyk7sk94fyg69njw6fxzumqynpch5e X-HE-Tag: 1624904327-799190 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: 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. This is more complicated than either v1 or the version that Mel sent earlier today. Is it worth it?