Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3991542pxv; Tue, 13 Jul 2021 08:24:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6IAAmWFexJT5thxwLUJ055nl0r7SY39rJ2Izr36BoDK/q/rNTp6tgQOogTO7eJ2wvfDdH X-Received: by 2002:a05:6402:1d31:: with SMTP id dh17mr6461146edb.211.1626189852811; Tue, 13 Jul 2021 08:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626189852; cv=none; d=google.com; s=arc-20160816; b=g6PBjD5KFHtCtWNkYPImHlbBvYoCDIlO4gW2iZL1WiDcuaHIn5IQ23mdls1hocYaWA ej2H75PuAXjYPUE85s/rKkyDcdfg5YRblfPcOGr933v8YWBzLmcLQMKZ46xCkkePR7Hs p1wawJfxClj8IJZ5yw4hQnGkE3895w+qHqqNk3IqFjIoG4IkQMzqEeCpxjyrqVr3To5g X+kaUC82a5cg43E2iSq5AXYO6p8HDs79BdwoknheTOvj/K39wESIhjiWDbOlBqgs5Az6 M0FStbEV27TIHmLqwdNWmh9NjFFD6S5tU2IBy8LSeXd6Yl/uw2i2DMscUSsjR9F2KQyz MVag== 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=zw08CBB7mgMpAjeS0+b2gRtgVDPlbFws9TVmFFhg8NI=; b=xIGxu/xFNkgXh44TdwimdXbYLETHu3Lr7Kv0Ku4xgDMRxE7esLfjfbxZ23cBrk1T29 WjO7qddHj+IwLZJ+btIY90Ou+ZcwWBvEnHq7Bi1w7I+t4Kf06ts59f1aJXwbdzGQip08 V5pLsQbFNpewUcMwn3DkaugR7kU5IRRebTp2iJ2LEe8luZMt9lIQK/hWI0azKVSZLjt4 3SRyVQLqJFuJldMgJOAY0hdRgE4vl1w+JMHcl30TsFz9TWPbWwhD0KUPqFs3A25VLSns MUbiR5goBdEUbni8nsiqHPcVQl8XfTK8YfF8AustTb7T7WtY3GORNLkkrj+QT6zyKkrx Xd3Q== 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 y21si11666164edt.264.2021.07.13.08.23.44; Tue, 13 Jul 2021 08:24:12 -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 S237087AbhGMPY1 (ORCPT + 99 others); Tue, 13 Jul 2021 11:24:27 -0400 Received: from outbound-smtp62.blacknight.com ([46.22.136.251]:54231 "EHLO outbound-smtp62.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237033AbhGMPYY (ORCPT ); Tue, 13 Jul 2021 11:24:24 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp62.blacknight.com (Postfix) with ESMTPS id 11932FAE73 for ; Tue, 13 Jul 2021 16:21:33 +0100 (IST) Received: (qmail 16828 invoked from network); 13 Jul 2021 15:21:32 -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); 13 Jul 2021 15:21:32 -0000 Date: Tue, 13 Jul 2021 16:21:31 +0100 From: Mel Gorman To: Chuck Lever III Cc: Andrew Morton , Desmond Cheong Zhi Xi , Zhang Qiang , Yanfei Xu , Jesper Dangaard Brouer , Matteo Croce , Linux-MM , LKML Subject: Re: [PATCH 2/4] mm/page_alloc: correct return value when failing at preparing Message-ID: <20210713152131.GH3809@techsingularity.net> References: <20210713135625.7615-1-mgorman@techsingularity.net> <20210713135625.7615-3-mgorman@techsingularity.net> <20210713145623.GE3809@techsingularity.net> <38D7DF36-4425-4D8B-9091-CE49CE046D6A@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <38D7DF36-4425-4D8B-9091-CE49CE046D6A@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 03:01:24PM +0000, Chuck Lever III wrote: > > > > On Jul 13, 2021, at 10:56 AM, Mel Gorman wrote: > > > > On Tue, Jul 13, 2021 at 02:21:58PM +0000, Chuck Lever III wrote: > >> > >> > >>> On Jul 13, 2021, at 9:56 AM, Mel Gorman wrote: > >>> > >>> From: Yanfei Xu > >>> > >>> If the array passed in is already partially populated, we should > >>> return "nr_populated" even failing at preparing arguments stage. > >>> > >>> Signed-off-by: Yanfei Xu > >>> Signed-off-by: Mel Gorman > >>> Link: https://lore.kernel.org/r/20210709102855.55058-1-yanfei.xu@windriver.com > >>> --- > >>> mm/page_alloc.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c > >>> index 6ef86f338151..803414ce9264 100644 > >>> --- a/mm/page_alloc.c > >>> +++ b/mm/page_alloc.c > >>> @@ -5255,7 +5255,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid, > >>> gfp &= gfp_allowed_mask; > >>> alloc_gfp = gfp; > >>> if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &alloc_gfp, &alloc_flags)) > >>> - return 0; > >>> + return nr_populated; > >> > >> Can you restore the hunk in patch 3/4 that changes this "return nr_populated;" > >> to "goto out;" ? > >> > > > > I fixed that up in the series I sent out. I applied this patch first > > then reconciled the collision with your patch. > > 3/4 still needs to change this "return nr_populated;" to "goto out;" > as part of the clean up. > Sorry, I had that in my git tree but didn't refresh the broken-out series properly before sending. I've sent a v2. -- Mel Gorman SUSE Labs