From: Rik van Riel <riel@surriel.com>
To: Roman Gushchin <guro@fb.com>, Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, kernel-team@fb.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: hugetlb: optionally allocate gigantic hugepages using cma
Date: Tue, 10 Mar 2020 14:22:17 -0400 [thread overview]
Message-ID: <833c188c0c1b9b0b842973952907bdabed774122.camel@surriel.com> (raw)
In-Reply-To: <20200310180558.GD85000@carbon.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
On Tue, 2020-03-10 at 11:05 -0700, Roman Gushchin wrote:
> On Tue, Mar 10, 2020 at 10:27:01AM -0700, Mike Kravetz wrote:
> >
> > > + for_each_node_state(nid, N_ONLINE) {
> > > + unsigned long min_pfn = 0, max_pfn = 0;
> > > +
> > > + for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn,
> > > NULL) {
> > > + if (!min_pfn)
> > > + min_pfn = start_pfn;
> > > + max_pfn = end_pfn;
> > > + }
> > > +
> > > + res = cma_declare_contiguous(PFN_PHYS(min_pfn), size,
> > > + PFN_PHYS(max_pfn), (1UL <<
> > > 30),
> >
> > The alignment is hard coded for x86 gigantic page size. If this
> > supports
> > more architectures or becomes arch independent we will need to
> > determine
> > what this alignment should be. Perhaps an arch specific call back
> > to get
> > the alignment for gigantic pages. That will require a little
> > thought as
> > some arch's support multiple gigantic page sizes.
>
> Good point!
> Should we take the biggest possible size as a reference?
> Or the smallest (larger than MAX_ORDER)?
I would say biggest.
You can always allocate multiple smaller gigantic pages
inside the space reserved for one ginormous one.
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-03-10 18:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 0:25 [PATCH v2] mm: hugetlb: optionally allocate gigantic hugepages using cma Roman Gushchin
2020-03-10 0:30 ` Roman Gushchin
2020-03-10 8:45 ` Michal Hocko
2020-03-10 17:25 ` Roman Gushchin
2020-03-10 17:37 ` Michal Hocko
2020-03-16 1:08 ` Rik van Riel
2020-03-10 17:38 ` Mike Kravetz
2020-03-10 17:42 ` Michal Hocko
2020-03-10 9:01 ` Michal Hocko
2020-03-10 17:30 ` Roman Gushchin
2020-03-10 17:39 ` Michal Hocko
2020-03-10 17:58 ` Roman Gushchin
2020-03-10 17:27 ` Mike Kravetz
2020-03-10 18:05 ` Roman Gushchin
2020-03-10 18:22 ` Rik van Riel [this message]
2020-03-10 18:33 ` Mike Kravetz
2020-03-10 18:54 ` Andreas Schaufler
2020-03-10 18:56 ` Roman Gushchin
2020-03-10 19:00 ` Andreas Schaufler
2020-03-10 19:19 ` Roman Gushchin
2020-03-10 19:36 ` Michal Hocko
2020-03-10 19:46 ` Rik van Riel
2020-03-10 20:11 ` Mike Kravetz
2020-03-10 20:15 ` Rik van Riel
2020-03-10 20:29 ` Mike Kravetz
2020-03-10 20:38 ` Rik van Riel
2020-03-10 20:29 ` Roman Gushchin
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=833c188c0c1b9b0b842973952907bdabed774122.camel@surriel.com \
--to=riel@surriel.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
/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).