Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp987894pxr; Mon, 11 Apr 2022 12:04:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKJdzl3fKivTvugv2+nM2WS3P5WhtxaY1Qt2eJIbS0u8yJlUZrld16dKE3B4Y4RWg7PZyG X-Received: by 2002:a9d:ed7:0:b0:5b2:236c:b6cd with SMTP id 81-20020a9d0ed7000000b005b2236cb6cdmr11709288otj.31.1649703884769; Mon, 11 Apr 2022 12:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649703884; cv=none; d=google.com; s=arc-20160816; b=NOCpMwUzfuFDrru45DmL1MHqOXajbNU9Pc7hotGs9+qtm5PiHtpMRqj2i2ITIGJIiS 1ClfGZErc35cSQ4r6LjHLfybGIe/SYVahdq/fggPIBoauEFsi0dAJC4Im9ZKKFmes5UH mvr7AfQBEq11rwi/QefcIu8zz8yAoTNemExhvUyllx5JbIYJ6aoBv2uOs2nfcWH/wf+a K5ZdFa6Vtys3vjFzNeBI04/BbrqUpwgSiNa7vJbjqG2pUPW2wAAAjeggwi+SePqsKCg6 i1zaTOPZE0jPB7JcFd8Aqp618/zD8CWJn0libSzLnBnDlRwxKSNIIt8Ahizp1NX2dVRC sRTg== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=VeBo5MNmcNP8GgrnYnuxwD9C21s9NCSI0hQmRgeVZ2c=; b=MFxMIS+2NPKUKUsAzHP25lmAHiRzgpSzrMCjjGHsLI1P7IT4m58nmXOA65KkwVGo56 Orc2J5gZQa04DCORyPLddzaZgGjzew5eFqGb0C7E6uyAxI9n21+IIgdI38JBwKvShQEn gR436Li9QO4mDTPBCAlGDj0N71ZaMF25dkWTG4AOhHMBFp1mwIXTUcERHfq2baZYkNF3 SHsVQgRyOdaCZHHA4hHNJ9OD9ngscKhiS3u4+V9tBcu7VKeIIduDeW53845gYO6mzdQD WfVaTIrR+CjLFUEYOTx4IQ58x3tQKHz3llwfqbkr8ZEt5LTCtN3bhS/I9OYD5vvod8DF v2qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SwUdCASo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u20-20020a056830119400b005cb2fc1388fsi5124037otq.267.2022.04.11.12.04.30; Mon, 11 Apr 2022 12:04:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SwUdCASo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236077AbiDHXXj (ORCPT + 99 others); Fri, 8 Apr 2022 19:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbiDHXXh (ORCPT ); Fri, 8 Apr 2022 19:23:37 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 917BC37A84; Fri, 8 Apr 2022 16:21:31 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id u15so1443530ejf.11; Fri, 08 Apr 2022 16:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VeBo5MNmcNP8GgrnYnuxwD9C21s9NCSI0hQmRgeVZ2c=; b=SwUdCASoZsLrVzHwYE9Q2w7j8anHVyABwID7GJeaxGfrbLM5k0Ll9QikJqmhJzldK2 DEhbbyAiFI6iSlauWF8t+jKysCy4/ituH373bOQYneDjgtlRMT6MU1S3YxRPtJMX4oX1 xiqUnHmj8t0fgyqR+02CHlzq+jgHtUhjPECIh0Ks3TbRC2E9CvqftD/OWYrUdEqNpZjp 3glxzcacU6WGhpBVaEXzCQ0oxQ8tSiZTZ4JCiNXATn1QSgRsiUvuhHZik+iIDX+IIXcf 8J9iJvcV6FOxsjwd8QIAaWSAR31c/r5e3ajAJURaZ6AV3A29bWAbfjYHTsvDoGioJU0U luDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=VeBo5MNmcNP8GgrnYnuxwD9C21s9NCSI0hQmRgeVZ2c=; b=LocO8QQASOg/2MlVENXwqXvko7M0Gyh1Q8rw2t21ZC8WE+asDd5XUA6w5btY24tQOW excSungF3YW5SezEbbHfUlM6dqw6vbYNaiJit95QMI42ByKlqkJ7C8ymVpKQ6gfHRIlR S2zAW4LCEEnZv18Bl0RHB/q4LiM0YgLjTHt3NlczevGIlJGp2EZdCHn0YFCrJsXIobK0 NxT9pecLK5WzOQGeNnfrCPp+e2jwe93aL4YVOROaBjkVxxn6YiliQyZLBxuXvUXqona6 RdoMIhFJVdbG+S+jGdCREHzkolyTWSVYs9HfwvOTn/9IZrUny+LxgJHb6Wtso5NabfoU +j4A== X-Gm-Message-State: AOAM530fAMLsHsPbWJRGFrCsp+sHs7SrKst/uUNw7i/gkXChuGoX8575 MWblsKqZkcqUZUiSu5cE+c0= X-Received: by 2002:a17:907:7da8:b0:6e0:5b94:5ed8 with SMTP id oz40-20020a1709077da800b006e05b945ed8mr19652474ejc.312.1649460090158; Fri, 08 Apr 2022 16:21:30 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id v8-20020a50d848000000b0041cb912717asm8936807edj.91.2022.04.08.16.21.29 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Apr 2022 16:21:29 -0700 (PDT) Date: Fri, 8 Apr 2022 23:21:29 +0000 From: Wei Yang To: David Hildenbrand Cc: Juergen Gross , xen-devel@lists.xenproject.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , stable@vger.kernel.org, Marek Marczykowski-G??recki , Michal Hocko , Wei Yang Subject: Re: [PATCH] mm, page_alloc: fix build_zonerefs_node() Message-ID: <20220408232129.caboqxtw6s4nmgde@master> Reply-To: Wei Yang References: <20220407093221.1090-1-jgross@suse.com> <1028ca3c-5b6c-d95e-9372-ae64b1fcbc82@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1028ca3c-5b6c-d95e-9372-ae64b1fcbc82@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2022 at 11:46:13AM +0200, David Hildenbrand wrote: >On 07.04.22 11:32, Juergen Gross wrote: >> Since commit 9d3be21bf9c0 ("mm, page_alloc: simplify zonelist >> initialization") only zones with free memory are included in a built >> zonelist. This is problematic when e.g. all memory of a zone has been >> ballooned out. >> >> Use populated_zone() when building a zonelist as it has been done >> before that commit. >> >> Cc: stable@vger.kernel.org >> Fixes: 9d3be21bf9c0 ("mm, page_alloc: simplify zonelist initialization") >> Reported-by: Marek Marczykowski-G??recki >> Signed-off-by: Juergen Gross >> --- >> 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 bdc8f60ae462..3d0662af3289 100644 >> --- a/mm/page_alloc.c >> +++ b/mm/page_alloc.c >> @@ -6128,7 +6128,7 @@ static int build_zonerefs_node(pg_data_t *pgdat, struct zoneref *zonerefs) >> do { >> zone_type--; >> zone = pgdat->node_zones + zone_type; >> - if (managed_zone(zone)) { >> + if (populated_zone(zone)) { >> zoneref_set_zone(zone, &zonerefs[nr_zones++]); >> check_highest_zone(zone_type); >> } > >Let's see if we have to find another way to properly handle fadump. > >Acked-by: David Hildenbrand Ok, I see the point. Reviewed-by: Wei Yang > >-- >Thanks, > >David / dhildenb -- Wei Yang Help you, Help me