Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1743197

Re: [PATCH] mm,hugetlb,migration: don't migrate kernelcore hugepages

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mm,hugetlb,migration: don't migrate kernelcore hugepages
Date 2017-10-02 15:00 +0200
Message-ID <uw8ud-7od-7@gated-at.bofh.it> (permalink)
References <uvVnk-7UN-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 02-10-17 00:51:11, Alexandru Moise wrote:
> This attempts to bring more flexibility to how hugepages are allocated
> by making it possible to decide whether we want the hugepages to be
> allocated from ZONE_MOVABLE or to the zone allocated by the "kernelcore="
> boot parameter for non-movable allocations.
> 
> A new boot parameter is introduced, "hugepages_movable=", this sets the
> default value for the "hugepages_treat_as_movable" sysctl. This allows
> us to determine the zone for hugepages allocated at boot time. It only
> affects 2M hugepages allocated at boot time for now because 1G
> hugepages are allocated much earlier in the boot process and ignore
> this sysctl completely.
> 
> The "hugepages_treat_as_movable" sysctl is also turned into a mandatory
> setting that all hugepage allocations at runtime must respect (both
> 2M and 1G sized hugepages). The default value is changed to "1" to
> preserve the existing behavior that if hugepage migration is supported,
> then the pages will be allocated from ZONE_MOVABLE.
> 
> Note however if not enough contiguous memory is present in ZONE_MOVABLE
> then the allocation will fallback to the non-movable zone and those
> pages will not be migratable.

This changelog doesn't explain _why_ we would need something like that.

> The implementation is a bit dirty so obviously I'm open to suggestions
> for a better way to implement this behavior, or comments whether the whole
> idea is fundamentally __wrong__.

To be honest I think this is just a wrong approach. hugepages_treat_as_movable
is quite questionable to be honest because it breaks the basic semantic
of the movable zone if the hugetlb pages are not really migratable which
should be the only criterion. Hugetlb pages are no different from other
migratable pages in that regards.
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm,hugetlb,migration: don't migrate kernelcore hugepages Alexandru Moise <00moses.alexander00@gmail.com> - 2017-10-02 01:00 +0200
  Re: [PATCH] mm,hugetlb,migration: don't migrate kernelcore hugepages Michal Hocko <mhocko@kernel.org> - 2017-10-02 15:00 +0200
    Re: [PATCH] mm,hugetlb,migration: don't migrate kernelcore hugepages Michal Hocko <mhocko@kernel.org> - 2017-10-02 22:50 +0200

csiph-web