On Wed, Dec 21, 2022 at 10:40:57AM +0000, Teo Couprie Diaz wrote:
On 21/12/2022 10:22, Kevin Brodsky wrote:
On 21/12/2022 10:59, Teo Couprie Diaz wrote:
+#define CGROUPS_V2_INIT_SCOPE "/sys/fs/cgroup/pids/init.scope/pids.max"
On Arch I don't get pids/ under cgroup/, what I have is init.scope/ directly underneath, that is:
/sys/fs/cgroup/init.scope/pids.max
Not sure if that's a configuration difference? In any case the idea sounds sensible.
Interesting, thanks for pointing it out. I do have the same on my personal Arch machine, but on my Ubuntu laptop I have the same as in our Debian image. Looking at the defines with a bit more attention, it seems like it could be a cgroups v1/v2 difference. The path I added looking like a v1 thing (similar to CGRUPS_V1_SLICE_FMT), rather than a v2.
I'll try to have a look and see if I can get our image to use cgroups v2.
Would it make sense to add two paths if I don't find another solution, to cover all of our bases ?
Right I see, in that case it would make sense to have both the v1 and v2 paths, especially since the test already handles both for the user slice.
Agreed, I reached the same conclusion digging a bit deeper. I can confirm this is indeed a v1/v2 difference, so it makes sense to go that way.
Kevin
Téo
Out of curiosity: what if the LTP itself will be running under cgroup with higher restrictions that 'root' cgroup ? Wouldn't all the tests fail ? Shouldn't we try to find out under which cgroup the test process is being controlled ? FWIW: this is a long game but it would be nicer to have some kind of a parser rather then hardcoding paths. (simple 'ls -l /sys/fs/cgroup/*/*/pids.max' gives the pids.max for top of the hierarchy)
--- BR B.
linux-morello-ltp mailing list -- linux-morello-ltp@op-lists.linaro.org To unsubscribe send an email to linux-morello-ltp-leave@op-lists.linaro.org