Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp644659rwd; Wed, 7 Jun 2023 05:13:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fO9ZJ4sgB7h+SyPa1v6nStkuOfSMnniztM7w7DPPz3bWNJcoIaTXfU3yCBN1/GyWp6fWk X-Received: by 2002:a17:90a:d148:b0:253:37a9:178 with SMTP id t8-20020a17090ad14800b0025337a90178mr3033100pjw.45.1686140001850; Wed, 07 Jun 2023 05:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686140001; cv=none; d=google.com; s=arc-20160816; b=K7k+iZDbsLRdhp/8Rb8v98WJmrduewAKg+fG3tQKPmdlXmQlwloQIcqnn/PlrKtSVB r3v33l2fRcV9u76scxxW5PGRZd7Y+V8OLfDtI4h8sqQXhVfy2Bt1PnpZhlGYP7kVxawP gWvdnB31T2vf3xGMaghU39/ZdSSPLSHTsgwBkZJtY8BYyqWahK4FzxoQDo2LF/7gEqU3 iY73QbYxhcfqHesLLbQI/lD3hEca1v/M1g/Yhd/WcJqU4ngLt5tARf/ZySsYQLrWHAVG O/524ghn/AVlcxLfBskB82apCxs74ZfCRfu1Kl/nPORZUTZ2R2dmtERH+O/0zD9IceB/ 8PIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=xl5lF3cd+Vrp8y6V9jsp3fA29TQ9zzWfur5sh5x50ew=; b=XPnuh8l8v+x1RNJq2+bP6r9+jLMg/Ovj5zSbRxmnskoPGiP43ZC2rm2PF/CwnjzBag Utvq0H/LtQq3do3168p+t4hPB6F7L+NE7SgsRKMvcZL/5X0nhoJcVII0977NwwFW9nAM TFgLQXRXSq25pJAWOMHz2LRX/ZYdtqejhtCunHQMPVeGZVhToTeo1Bh8cSEIA1osSqd7 dBiBOY6YOsZlOqdduCobuUOwjkgO34jymVSVN+knTOtrA282ZZO1g4VbK29oWt9WtjnQ K9cKavszUuIsZzy+7MQtwP/g+1SQJaIW/6jSoYXeDTQL0fZuWGj/hw9kkdhcvMCkRlv3 1xbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dJzz83yi; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a17090a304700b0023af4ee47dasi1036543pjl.65.2023.06.07.05.13.05; Wed, 07 Jun 2023 05:13:21 -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=@redhat.com header.s=mimecast20190719 header.b=dJzz83yi; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240096AbjFGLjo (ORCPT + 99 others); Wed, 7 Jun 2023 07:39:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239236AbjFGLjm (ORCPT ); Wed, 7 Jun 2023 07:39:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47DB019BF for ; Wed, 7 Jun 2023 04:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686137938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xl5lF3cd+Vrp8y6V9jsp3fA29TQ9zzWfur5sh5x50ew=; b=dJzz83yieToRaLhR6cNfuV8Ij4QgyzLFEU2efBfmqDwd/DB2kcPYXq7fjUNmm9+GQfQ/y4 0x6OAW1nWLEoHNgVCmNTltJ2hNo/JrVbErWyn7ERgm2Ka/a3zEQhSRJZ+P/YmUikeQCX97 h3+/TyqGVu6Mvw3G7Ggcm+rMuLQNqJ8= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-b7gf7H7jN6uS8iR7rs1LpQ-1; Wed, 07 Jun 2023 07:38:57 -0400 X-MC-Unique: b7gf7H7jN6uS8iR7rs1LpQ-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f7eb414fcbso7619645e9.2 for ; Wed, 07 Jun 2023 04:38:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686137936; x=1688729936; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xl5lF3cd+Vrp8y6V9jsp3fA29TQ9zzWfur5sh5x50ew=; b=XsI7NEc7IfJzKtY0dkBkBCYsnmxuleEo4F9B8vbKU/eiALLRet7Wsz+HwOhT9vpzFP ScyQhCoRICHNdKplZfrvfDoNh4jZNB88SbPlu2ziExkIKksLGBrxSMZMcr8H113zU7rl wMWamHjHBjBJBniT/IZYgr4huaRSAYvFMMGu/bgg66H0d53y5+/pgokpsgP8X21JGYC0 OU4RX55iIZhParesy4+r4eMAzmdzUZYeLNxS4RIRWjyD0qvS7kT7i4FejUXSQqurFoGl dTx/8agMYoEvK7QjVW/sL2MrXcgTWjHc4laZQ0bPVLZRujn+d4d0IQcvI7lyKA/WnbRG re2Q== X-Gm-Message-State: AC+VfDwsIdDeRbyWUexD6huuPnDopbWUkVP4IihcriH2xOzKgQin89Ra fXTrXVco6FN2yFtmQWd6gRq4i8edDXbW2RQV5KVQMicU7/MJaazfqecbBh34cRVSOFY5lBrywLk fccjfHy5iXQYCYT2cO5TA267a X-Received: by 2002:a7b:c3d7:0:b0:3f7:34dc:ed0d with SMTP id t23-20020a7bc3d7000000b003f734dced0dmr4483082wmj.25.1686137936131; Wed, 07 Jun 2023 04:38:56 -0700 (PDT) X-Received: by 2002:a7b:c3d7:0:b0:3f7:34dc:ed0d with SMTP id t23-20020a7bc3d7000000b003f734dced0dmr4483071wmj.25.1686137935825; Wed, 07 Jun 2023 04:38:55 -0700 (PDT) Received: from ?IPV6:2003:cb:c70e:9c00:8d26:3031:d131:455c? (p200300cbc70e9c008d263031d131455c.dip0.t-ipconnect.de. [2003:cb:c70e:9c00:8d26:3031:d131:455c]) by smtp.gmail.com with ESMTPSA id v10-20020a05600c470a00b003f1978bbcd6sm7140839wmo.3.2023.06.07.04.38.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jun 2023 04:38:55 -0700 (PDT) Message-ID: <02418a3d-ce8f-0f00-ba93-06ceb3531490@redhat.com> Date: Wed, 7 Jun 2023 13:38:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 2/2] mm/mm_init.c: remove reset_node_present_pages() Content-Language: en-US To: Haifeng Xu Cc: rppt@kernel.org, osalvador@suse.de, mhocko@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230607025056.1348-1-haifeng.xu@shopee.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230607025056.1348-1-haifeng.xu@shopee.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 07.06.23 04:50, Haifeng Xu wrote: > reset_node_present_pages() only get called in hotadd_init_pgdat(), move > the action that clear present pages to free_area_init_core_hotplug(), so > the helper can be removed. > > Signed-off-by: Haifeng Xu > Suggested-by: David Hildenbrand > --- > v2: > - declare 'struct zone' within the for loop > - fix comment layout > --- > mm/memory_hotplug.c | 18 ------------------ > mm/mm_init.c | 15 +++++++++++++-- > 2 files changed, 13 insertions(+), 20 deletions(-) As Michal said, we could be clearer that this simplifies the code (and removes a TODO). Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb