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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAD04C433F5 for ; Sat, 29 Jan 2022 00:26:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5457E6B00DC; Fri, 28 Jan 2022 19:26:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4F56E6B00DE; Fri, 28 Jan 2022 19:26:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E5A26B00DF; Fri, 28 Jan 2022 19:26:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 317706B00DC for ; Fri, 28 Jan 2022 19:26:31 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E1DA518209BCC for ; Sat, 29 Jan 2022 00:26:30 +0000 (UTC) X-FDA: 79081433340.17.6830567 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf29.hostedemail.com (Postfix) with ESMTP id 74492120006 for ; Sat, 29 Jan 2022 00:26:30 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id p7so13093055edc.12 for ; Fri, 28 Jan 2022 16:26:30 -0800 (PST) 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=9SdoHewBp8piJxVnfN6HQGYBjFN4wMCA0gUu8ko+iys=; b=XsYh7tv71oF/a0S/TLARBNuBzE4nyFwYqC2eajKdVtkFqlfsXnu+QF1VCtv6pGHnV+ 6np/CbkjNgfaNRBE5fDdUPVwGg0ujFC1TntVWz82qjMqO4X7df09Rnc1rz8gjsvUtkmR 88lzCImupQIN5wEIJ9OzIs4UxkvAB9YBI4rGyQNFTxIUVP28JTyTwCIwovrvctbrIN58 DlUXfTFZNxhQv/tY3NWHMtWGnAcVT78txhtmBUbY5uLY+CmpkJPA+s99wBGl+0YKVwBT YmNMolkedPReTZcpAF9DfjXs5SeTT083EGO4gZoAoBGJuj5O+qach2zBd6fe4hF6m5CM uIGQ== 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=9SdoHewBp8piJxVnfN6HQGYBjFN4wMCA0gUu8ko+iys=; b=YH6UbFuHsg1C4MXoxu5ylucOji5AqKo7vboP+VpfRZE12ZmOIghPNbS+VpP0D9ZfGE z1JGT3Vw21PbvCVr3lJJB8i9Ab28RYEvq9hHF+oVUjj93MiSDEP7TqrGIiknEGVMyeJc A6UJmzY/QzjZIaJsGnYIugZflxhljWJVO7UYYueIDjDbVje4BhyVWZGbWe/pSjlUUqJc nlOb1Q8xYmnSwuB3kIbwTH74WojdsZ/5LWUsjhFqIwSHb3lsSx8r05h+e/pLhF9AUT5p 07EXD972cljiDEAkWUM0UF031sL+vpbSfpDB6W45DUwvNxcFpvC0ZnVh6adX6GoQci27 2YzQ== X-Gm-Message-State: AOAM530dV1FQDS4aFykrVU9Rdi+efeIbGE/rqOQOUniKRD3Q/6BYlMAi 8fwouN5IEsTSslLcNrPPAU0= X-Google-Smtp-Source: ABdhPJyj/aKnXW0BC8G00eDEMbqK1FU/ARC0uh6PHw7WDj2c3ZP2XvK+e5JquPATjmVmZtN/GFANLw== X-Received: by 2002:a05:6402:3552:: with SMTP id f18mr10644929edd.189.1643415989052; Fri, 28 Jan 2022 16:26:29 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id r22sm13614354edt.51.2022.01.28.16.26.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jan 2022 16:26:28 -0800 (PST) Date: Sat, 29 Jan 2022 00:26:28 +0000 From: Wei Yang To: Michal Hocko Cc: Wei Yang , akpm@linux-foundation.org, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memory_hotplug: build zonelist for managed_zone Message-ID: <20220129002628.2cwr35glahq5f5md@master> Reply-To: Wei Yang References: <20220127012023.18095-1-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Rspam-User: nil X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 74492120006 X-Stat-Signature: ttk6f6w4wkp4xmjxrf7odb4yjx1757mq Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XsYh7tv7; spf=pass (imf29.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1643415990-456223 X-Bogosity: Ham, tests=bogofilter, spamicity=0.010855, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jan 27, 2022 at 09:28:17AM +0100, Michal Hocko wrote: >On Thu 27-01-22 01:20:23, Wei Yang wrote: >> During memory hotplug, when online/offline a zone, we need to rebuild >> the zonelist for all node. There are two checks to decide whether a zone >> would be added to zonelist: >> >> * one in online_pages/offline_pages to decide necessity >> * one in build_zonerefs_node to do real add >> >> Currently we use different criteria at these two places, which is >> different from the original behavior. >> >> Originally during memory hotplug, zonelist is re-built when zone hasn't >> been populated. This in introduced in 'commit 6811378e7d8b ("[PATCH] >> wait_table and zonelist initializing for memory hotadd: update zonelists")'. >> And at that moment, build_zonelists_node() also use populated_zone() to >> decide whether the zone should be added to zonelist. >> >> While in 'commit 6aa303defb74 ("mm, vmscan: only allocate and reclaim >> from zones with pages managed by the buddy allocator")', >> build_zonelists_node() changed to use managed_zone() to add zonelist. >> But we still use populated_zone() to decide the necessity. >> >> This patch restore the original behavior by using the same criteria to >> add a zone in zonelist during memory hotplug. > >Why? > In case we online a populated zone, but not managed. Then this zone will not be in zonelist. Right? -- Wei Yang Help you, Help me