Subject: Re: [bug#29409] Remove hugetlb control group on ARM32.

From: [email-masked] (Ludovic Courtès)
Date: Thu, 21 Dec 2017 16:52:07 +0100

Hi,

Danny Milosavljevic <[email-masked]> skribis:

> On Wed, 20 Dec 2017 20:15:07 +0100
> Mathieu Othacehe <[email-masked]> wrote:
>
>> I'm not sure what do about, a workaround could be the ugly hack
>> attached, WDYT ?
>
> I researched cgroups a bit and it seems that /sys/fs/cgroup/hugetlb is for configuration of hugetlb and that cgroups themselves don't require hugetlb - and neither does elogind.

Indeed.  So actually we can probably remove it altogether.

We could simply do that and keep the definition around for when we need
it.

Thoughts?

> We could use (file-exists? "/proc/sys/vm/nr_hugepages") in order to test for hugetlb support.  The proc filesystem is already mounted at this point.

Currently we can’t easily introduce special conditions for file system
mounts.

> Alternatively, it would be possible to use (needed-for-boot? #f) for the hugetlb cgroup file-system.  In that case, maybe failure isn't so bad.  I didn't test that, however.

‘need-for-boot?’ tells whether the file system should be mounted from
the initrd or after PID 1 has been started, so it doesn’t help in this
case (it’s already #f I think.)

Ludo’.