[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <360a3016-4b35-3ec6-0716-1c2a62836f0a@oracle.com>
Date: Tue, 2 Apr 2019 13:09:33 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Oscar Salvador <osalvador@...e.de>
Cc: n-horiguchi@...jp.nec.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/hugetlb: Get rid of NODEMASK_ALLOC
On 4/2/19 1:01 PM, Andrew Morton wrote:
> On Tue, 2 Apr 2019 15:34:15 +0200 Oscar Salvador <osalvador@...e.de> wrote:
>
>> NODEMASK_ALLOC is used to allocate a nodemask bitmap, ant it does it by
>> first determining whether it should be allocated in the stack or dinamically
>> depending on NODES_SHIFT.
>> Right now, it goes the dynamic path whenever the nodemask_t is above 32
>> bytes.
>>
>> Although we could bump it to a reasonable value, the largest a nodemask_t
>> can get is 128 bytes, so since __nr_hugepages_store_common is called from
>> a rather shore stack we can just get rid of the NODEMASK_ALLOC call here.
>>
>> This reduces some code churn and complexity.
>
> It took a bit of sleuthing to figure out that this patch applies to
> Mike's "hugetlbfs: fix potential over/underflow setting node specific
> nr_hugepages". Should they be folded together? I'm thinking not.
No need to fold. They are separate issues and that over/underflow patch
may already be doing too many things.
> (Also, should "hugetlbfs: fix potential over/underflow setting node
> specific nr_hugepages" have been -stableified? I also think not, but I
> bet it happens anyway).
I don't see a great reason for sending to stable. IIRC, nobody actually
hit this issue: it was found through code inspection.
--
Mike Kravetz
Powered by blists - more mailing lists