On 04/08/2019 07:48, DJ Lucas via blfs-dev wrote: > > > On 8/2/2019 3:12 PM, Pierre Labastie via blfs-dev wrote: >> On 02/08/2019 17:23, Ken Moffat via blfs-dev wrote: >>> On Fri, Aug 02, 2019 at 11:05:02AM +0200, Pierre Labastie via blfs-dev >>> wrote: >>>> On 02/08/2019 04:54, Ken Moffat via blfs-dev wrote: >>>>> However, I had a bit of fun and games getting mountcgroupfs to >>>>> I'd got CONFIG_CGROUPS CONFIG_INOTIFY_USER and CONFIG_FHANDLE >>> [...] >>>>> CONFIG_MEMCFG=Y >>>>> CONFIG_CGROUP_RDMA=Y >>>>> CONFIG_CGROUP_DEVICE=y >>>>> >>>>> Rebooted, and that was good enough. The question is, do I actually >>>>> _need_ all of these ? >>>>> >>>> From my investigations, no... And the whole mountcgroupfs bootscript can >>>> be >>>> omitted, because elogind takes care of mounting those. OTOH, my >>>> investigations >>>> are limited to using startx with the default xinit clients... >>>> >>>> I mentioned this error (with less details) in the "xorg failure" thread. >>>> If no >>>> CONFIG_CGROUP_XXX is selected, the command for mounting the v1 cgroup fs >>>> returns an error, and the command for creating the "unified" dir fails too, >>>> because the fs is not mounted. Actually, from man cgroups(7), it is said >>>> that: >>>> "Note that on many systems, the v1 controllers are automatically mounted >>>> under /sys/fs/cgroup; in particular, systemd(1) automatically creates >>>> such mount points." >>>> Now, the question is whether elogind does those mounts too. But one thing >>>> is >>>> sure: without the mountcgroupfs script, whether or not some >>>> CONFIG_CGROUP_XXX >>>> is defined, Xorg runs. >>>> >>>> Pierre >>> Hmm, I thought it was all getting clearer, and that when I could >>> find time to rebuild the kernel a few times I would find out how >>> many of those are necessary. But running a DM is not something I've >>> done for ages (although I recall that sddm shutdowns were always >>> messy because the messages were on a different tty). >>> >>> I guess I might as well check which options are necessary for the >>> mountcgroupfs script. >> I think we'd better check whether mountcgroupfs is needed at all. elogind >> seems to do most of what is in this script. > Had time to look at this tonight. Suppose v1 cgroups will work alone (I was > not aware that they were mounted automatically - haven't actually verified > this yet, but will take your word for it). This was not the case at 238 at > least. First question when asking for help was whether cgroups were mounted > correctly, following a couple of examples to test that. Unfortunately, the > only thing I see in the changes lists is from 235: "Starting elogind will no > longer crash if the underlying system uses legacy or hybrid cgroups." -- which > was after I started testing with it. I ensured that both are mounted > correctly. Technically, even the elogind script isn't necessary anymore if PAM > files are setup correctly, a user login will trigger elogind to start,
indeed, it does (just tried) > but > obviously, login will take a few cycles longer. Unnoticeable for a console login > I elected to keep it at that > time. > I have nothing against any of the scripts, except cgroupmountfs returns an error if no CONFIG_CGROUP_XXX option is selected in the kernel. So there are 4 possibilities: - remove the mountcgroupfs script - inform the user that she/he should select one of those options. Personally, I do not know whether they are usefull, except that according to "man cgroups", "systemd(1) makes heavy use of some v1 controllers by default", but can "fall back to operating without the specified controllers" - test that at least one of those option is set (according to "man cgroups", the information is in /proc/cgroups) before issuing the mount command. Something like: --->8--- if grep '^[^#]' /prog/cgroups > /dev/null 2>&1; then log message mount -t cgroup cgroup /sys/cgroup/fs and v2 instr fi --->8--- - use another mount command. Extrapolating what is in "man cgroups" (not tried): --->8--- mount -t cgroup -o none,name=elogind none /sys/cgroup/fs --->8--- but I am not sure it would be useful. Concerning cgroup v2, "man cgroups" tells: "Note that on many modern systems, systemd(1) automatically mounts the cgroup2 filesystem at /sys/fs/cgroup/unified during the boot process". According to what I see, elogind does that too. Pierre -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
