[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3b1e383989b9422b3fb6e3e6f7ebf733f23ad7a.camel@surriel.com>
Date: Tue, 10 Mar 2020 16:38:04 -0400
From: Rik van Riel <riel@...riel.com>
To: Mike Kravetz <mike.kravetz@...cle.com>,
Michal Hocko <mhocko@...nel.org>, Roman Gushchin <guro@...com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org,
kernel-team@...com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: hugetlb: optionally allocate gigantic hugepages
using cma
On Tue, 2020-03-10 at 13:29 -0700, Mike Kravetz wrote:
> On 3/10/20 1:15 PM, Rik van Riel wrote:
> > On Tue, 2020-03-10 at 13:11 -0700, Mike Kravetz wrote:
> > > the more I think about it, the more I like limiting CMA
> > > reservations
> > > to
> > > only one gigantic huge page size (per arch).
> >
> > Why, though?
> >
> > The cma_alloc function can return allocations of different
> > sizes at the same time.
> >
> > There is no limitation in the underlying code that would stop
> > a user from allocating hugepages of different sizes through
> > sysfs.
>
> True, there is no technical reason.
>
> I was only trying to simplify the setup and answer the outstanding
> questions.
> - What alignment to use for reservations?
Alignment can be the largest hugepage size the system
supports, assuming the amount of memory set aside is
at least this large?
> - What is minimum size of reservations?
One good thing is that it isn't really a reservation,
since the memory can still be used for things like page
cache and anonymous memory, so if too much is reserved
the memory does not go to waste.
One of my follow-up projects to Roman's project will be
to get THP & khugepaged to effectively use memory in the
hugepage CMA area, too.
That way when a system is running a workload that is not
using 1GB hugetlbfs pages, that easily defragmentable memory
pool will still bring some benefits to the workload.
> If only one gigantic page size is supported, the answer is
> simple. In any
> case, I think input from arch specific code will be needed.
Agreed.
--
All Rights Reversed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists