lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yfe48O7eBWSe0LjK@dhcp22.suse.cz>
Date:   Mon, 31 Jan 2022 11:24:48 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Wei Yang <richard.weiyang@...il.com>
Cc:     akpm@...ux-foundation.org, mgorman@...hsingularity.net,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memory_hotplug: build zonelist for managed_zone

On Sat 29-01-22 00:26:28, Wei Yang wrote:
> 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?

yeah. We can theoretically end up with a zone without any managed menory
on the zonelists. But my primary question is why do we need this change?
Does it fix any existing problem? Does it make the code easier to
read/understand? Does it improve performance? Every patch should have a
justification. Your changelog merely lists the history and then states
the new behavior without any explanation of why that is needed or
desired. See?
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ