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

2019-08-09 Thread Mike Kravetz
On 8/9/19 1:57 PM, Mina Almasry wrote: > On Fri, Aug 9, 2019 at 1:39 PM Mike Kravetz wrote: >> >> On 8/9/19 11:05 AM, Mina Almasry wrote: >>> On Fri, Aug 9, 2019 at 4:27 AM Michal Koutný wrote: > Alternatives considered: > [...] (I did not try that but) have you considered: 3)

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

2019-08-09 Thread Mina Almasry
On Fri, Aug 9, 2019 at 1:39 PM Mike Kravetz wrote: > > On 8/9/19 11:05 AM, Mina Almasry wrote: > > On Fri, Aug 9, 2019 at 4:27 AM Michal Koutný wrote: > >>> Alternatives considered: > >>> [...] > >> (I did not try that but) have you considered: > >> 3) MAP_POPULATE while you're making the

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

2019-08-09 Thread Mike Kravetz
On 8/9/19 11:05 AM, Mina Almasry wrote: > On Fri, Aug 9, 2019 at 4:27 AM Michal Koutný wrote: >>> Alternatives considered: >>> [...] >> (I did not try that but) have you considered: >> 3) MAP_POPULATE while you're making the reservation, > > I have tried this, and the behaviour is not great.

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

2019-08-09 Thread Mina Almasry
On Fri, Aug 9, 2019 at 4:27 AM Michal Koutný wrote: > > (+CC cgro...@vger.kernel.org) > > On Thu, Aug 08, 2019 at 12:40:02PM -0700, Mina Almasry > wrote: > > We have developers interested in using hugetlb_cgroups, and they have > > expressed > > dissatisfaction regarding this behavior. > I

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

2019-08-09 Thread Michal Koutný
(+CC cgro...@vger.kernel.org) On Thu, Aug 08, 2019 at 12:40:02PM -0700, Mina Almasry 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

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

2019-08-08 Thread Mina Almasry
On Thu, Aug 8, 2019 at 1:23 PM shuah wrote: > > On 8/8/19 1:40 PM, Mina Almasry wrote: > > Problem: > > Currently tasks attempting to allocate more hugetlb memory than is > > available get > > a failure at mmap/shmget time. This is thanks to Hugetlbfs Reservations [1]. > > However, if a task

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

2019-08-08 Thread shuah
On 8/8/19 1:40 PM, Mina Almasry wrote: Problem: Currently tasks attempting to allocate more hugetlb memory than is available get a failure at mmap/shmget time. This is thanks to Hugetlbfs Reservations [1]. However, if a task attempts to allocate hugetlb memory only more than its hugetlb_cgroup

[RFC PATCH] hugetlbfs: Add hugetlb_cgroup reservation limits

2019-08-08 Thread Mina Almasry
Problem: Currently tasks attempting to allocate more hugetlb memory than is available get a failure at mmap/shmget time. This is thanks to Hugetlbfs Reservations [1]. However, if a task attempts to allocate hugetlb memory only more than its hugetlb_cgroup limit allows, the kernel will allow the