Re: [PATCH] Revert "mm, hugetlb: remove hugepages_treat_as_movable sysctl"

From: Gregory Price

Date: Tue Oct 07 2025 - 18:12:27 EST


On Tue, Oct 07, 2025 at 02:59:55PM -0700, Andrew Morton wrote:
> On Tue, 7 Oct 2025 17:44:12 -0400 Gregory Price <gourry@xxxxxxxxxx> wrote:
>
> > This reverts commit d6cb41cc44c63492702281b1d329955ca767d399.
>
> It's been seven years. Perhaps "reintroduce hugepages_treat_as_movable
> sysctl" would be a better way of presenting this. Not very important.
>

But a blink of an eye! Will fix it up if feedback is positive.

> > --- a/mm/hugetlb.c
> > +++ b/mm/hugetlb.c
> > @@ -55,6 +55,8 @@
> > #include "hugetlb_cma.h"
> > #include <linux/page-isolation.h>
> >
> > +int hugepages_treat_as_movable;
> > +
> > int hugetlb_max_hstate __read_mostly;
> > unsigned int default_hstate_idx;
> > struct hstate hstates[HUGE_MAX_HSTATE];
>
> Could sprinkle some more __read_mostlys around here?
>

Makes sense, will take a look while I'm poking around.

Thanks Andrew!
~Gregory