Re: [RFC PATCH] hugetlbfs: Add hugetlb_cgroup reservation limits

From: Michal Koutný
Date: Fri Aug 09 2019 - 07:27:44 EST

(+CC cgroups@xxxxxxxxxxxxxxx)

On Thu, Aug 08, 2019 at 12:40:02PM -0700, Mina Almasry <almasrymina@xxxxxxxxxx> wrote:
> We have developers interested in using hugetlb_cgroups, and they have expressed
> dissatisfaction regarding this behavior.
I assume you still want to enforce a limit on a particular group and the
application must be able to handle resource scarcity (but better
notified than SIGBUS).

> Alternatives considered:
> [...]
(I did not try that but) have you considered:
3) MAP_POPULATE while you're making the reservation,
4) Using multple hugetlbfs mounts with respective limits.

> Caveats:
> 1. This support is implemented for cgroups-v1. I have not tried
> hugetlb_cgroups with cgroups v2, and AFAICT it's not supported yet.
> This is largely because we use cgroups-v1 for now.
Adding something new into v1 without v2 counterpart, is making migration
harder, that's one of the reasons why v1 API is rather frozen now. (I'm
not sure whether current hugetlb controller fits into v2 at all though.)


Attachment: signature.asc
Description: Digital signature