linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oscar Salvador <osalvador@suse.de>
Cc: mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: Get rid of NODEMASK_ALLOC
Date: Tue, 2 Apr 2019 13:01:53 -0700	[thread overview]
Message-ID: <20190402130153.338e59c6cfda1ed3ec882517@linux-foundation.org> (raw)
In-Reply-To: <20190402133415.21983-1-osalvador@suse.de>

On Tue,  2 Apr 2019 15:34:15 +0200 Oscar Salvador <osalvador@suse.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.

(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).


  parent reply	other threads:[~2019-04-02 20:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 13:34 [PATCH] mm/hugetlb: Get rid of NODEMASK_ALLOC Oscar Salvador
2019-04-02 18:37 ` Mike Kravetz
2019-04-02 20:01 ` Andrew Morton [this message]
2019-04-02 20:09   ` Mike Kravetz
2019-04-02 20:16   ` Oscar Salvador
2019-04-03  5:44 ` Naoya Horiguchi
2019-04-03  7:52 ` Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190402130153.338e59c6cfda1ed3ec882517@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=osalvador@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).