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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 1D3F8C07E95 for ; Tue, 13 Jul 2021 15:21:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C32EC60C3E for ; Tue, 13 Jul 2021 15:21:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C32EC60C3E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0352A6B0098; Tue, 13 Jul 2021 11:21:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F26E58D0001; Tue, 13 Jul 2021 11:21:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC8066B009D; Tue, 13 Jul 2021 11:21:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id B1B3B6B0098 for ; Tue, 13 Jul 2021 11:21:35 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B3AB51854CF2E for ; Tue, 13 Jul 2021 15:21:34 +0000 (UTC) X-FDA: 78357928908.19.9671413 Received: from outbound-smtp24.blacknight.com (outbound-smtp24.blacknight.com [81.17.249.192]) by imf03.hostedemail.com (Postfix) with ESMTP id 40EFF30002E0 for ; Tue, 13 Jul 2021 15:21:34 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id 0EED0F22E3 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) X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 40EFF30002E0 X-Stat-Signature: yts6thx4defkde5bmpnuuiqpt74y9ekh Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.192 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-HE-Tag: 1626189694-323758 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 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