From: Mike Kravetz <firstname.lastname@example.org>
To: Mina Almasry <email@example.com>, Tejun Heo <firstname.lastname@example.org>
Cc: "David Rientjes" <email@example.com>,
"Aneesh Kumar" <firstname.lastname@example.org>,
shuah <email@example.com>, "Shakeel Butt" <firstname.lastname@example.org>,
"Greg Thelen" <email@example.com>,
"Andrew Morton" <firstname.lastname@example.org>,
"open list" <email@example.com>,
firstname.lastname@example.org, "Michal Koutný" <email@example.com>
Subject: Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits
Date: Fri, 27 Sep 2019 14:59:17 -0700 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
On 9/26/19 5:55 PM, Mina Almasry wrote:
> Provided we keep the existing controller untouched, should the new
> controller track:
> 1. only reservations, or
> 2. both reservations and allocations for which no reservations exist
> (such as the MAP_NORESERVE case)?
> I like the 'both' approach. Seems to me a counter like that would work
> automatically regardless of whether the application is allocating
> hugetlb memory with NORESERVE or not. NORESERVE allocations cannot cut
> into reserved hugetlb pages, correct?
Correct. One other easy way to allocate huge pages without reserves
(that I know is used today) is via the fallocate system call.
> If so, then applications that
> allocate with NORESERVE will get sigbused when they hit their limit,
> and applications that allocate without NORESERVE may get an error at
> mmap time but will always be within their limits while they access the
> mmap'd memory, correct?
Correct. At page allocation time we can easily check to see if a reservation
exists and not charge. For any specific page within a hugetlbfs file,
a charge would happen at mmap time or allocation time.
One exception (that I can think of) to this mmap(RESERVE) will not cause
a SIGBUS rule is in the case of hole punch. If someone punches a hole in
a file, not only do they remove pages associated with the file but the
reservation information as well. Therefore, a subsequent fault will be
the same as an allocation without reservation.
I 'think' the code to remove/truncate a file will work corrctly as it
is today, but I need to think about this some more.
> mmap'd memory, correct? So the 'both' counter seems like a one size
> fits all.
> I think the only sticking point left is whether an added controller
> can support both cgroup-v2 and cgroup-v1. If I could get confirmation
> on that I'll provide a patchset.
Sorry, but I can not provide cgroup expertise.
next prev parent reply other threads:[~2019-09-27 21:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-19 22:24 [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits Mina Almasry
2019-09-19 22:24 ` [PATCH v5 1/7] hugetlb_cgroup: Add hugetlb_cgroup reservation counter Mina Almasry
2019-09-19 22:24 ` [PATCH v5 2/7] hugetlb_cgroup: add interface for charge/uncharge hugetlb reservations Mina Almasry
2019-09-19 22:24 ` [PATCH v5 3/7] hugetlb_cgroup: add reservation accounting for private mappings Mina Almasry
2019-09-19 22:24 ` [PATCH v5 4/7] hugetlb: disable region_add file_region coalescing Mina Almasry
2019-09-27 21:44 ` Mike Kravetz
2019-09-27 22:33 ` Mina Almasry
2019-09-19 22:24 ` [PATCH v5 5/7] hugetlb_cgroup: add accounting for shared mappings Mina Almasry
2019-09-19 22:24 ` [PATCH v5 6/7] hugetlb_cgroup: Add hugetlb_cgroup reservation tests Mina Almasry
2019-09-19 22:24 ` [PATCH v5 7/7] hugetlb_cgroup: Add hugetlb_cgroup reservation docs Mina Almasry
2019-09-23 17:47 ` [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits Mike Kravetz
2019-09-23 19:18 ` Mina Almasry
2019-09-23 21:27 ` Mike Kravetz
2019-09-24 22:42 ` Mina Almasry
2019-09-26 19:28 ` David Rientjes
2019-09-26 21:23 ` Mike Kravetz
2019-09-27 0:55 ` Mina Almasry
2019-09-27 21:59 ` Mike Kravetz [this message]
2019-09-27 22:51 ` Mina Almasry
2019-09-27 22:56 ` Mike Kravetz
2019-09-30 15:12 ` Michal Koutný
2019-10-11 19:10 ` Mina Almasry
2019-10-11 20:41 ` Mina Almasry
2019-10-14 17:33 ` Mike Kravetz
2019-10-14 18:01 ` Mina Almasry
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).