Skip to content

[WIP] linux: try mount points with statmount#757

Draft
kphuphanwoe wants to merge 1 commit intoopen-mpi:masterfrom
kphuphanwoe:linux/find-cgroup-mntpnt
Draft

[WIP] linux: try mount points with statmount#757
kphuphanwoe wants to merge 1 commit intoopen-mpi:masterfrom
kphuphanwoe:linux/find-cgroup-mntpnt

Conversation

@kphuphanwoe
Copy link

I'm trying implement function find cgtype via linux listmount/statmount APIs. These syscall are not supported in linux kernel older than 6.8. btw I'm using fedora 42 which does support them

Signed-off-by: Kitibodee Phuphanwoe <kitibodee.ph@ksu.ac.th>
@bgoglin
Copy link
Contributor

bgoglin commented Jan 13, 2026

Hello. Thanks for working on this. I understand this is still WIP. Two comments:

  • Don't increase the Inria copyright to 2026 in the headers, that's my employer. You may add your own copyright line for 2026, either with your own name if you're doing this on your free time, or your employer if they agree. It's not clear if those copyright headers are useful nowadays. git blame has all the information line by line anyway, so making sure you are properly identified in commits or even signing commits with "Signed-off-by" is often used instead these days.
  • I am surprised that you need to define listmount/statmount syscalls. We do that for NUMA syscalls because those syscalls are in numactl instead of glibc and we don't want to depend on numactl devel headers (not always installed). However the situation here looks different. It would be nice to understand what glibc is going to do. Are they going to expose another API on top of the syscalls? Just reimplement the old one?

@kphuphanwoe
Copy link
Author

I have also been considering that defining the syscall numbers may not be very useful, and we may delete this part later.

The reason we define our own functions is that glibc does not yet expose any binding for listmount/statmount, However syscall numbers are currently available.

The copyright was updated because pre-commit failed during commit.

@sthibaul
Copy link
Contributor

It's not clear if those copyright headers are useful nowadays

I believe they are since the produced tarball is supposed to contain copyright information.

@bgoglin
Copy link
Contributor

bgoglin commented Jan 14, 2026

The copyright was updated because pre-commit failed during commit.

Set these in your environment so that it updates with the correct lines:
HWLOC_COPYRIGHT_FORMAL_NAME (full line including things like All rights reserved etc)
HWLOC_COPYRIGHT_SEARCH_NAME (single word that we'll use for when searching your line for updating years)

For me, my employers wants this:
HWLOC_COPYRIGHT_FORMAL_NAME="Inria. All rights reserved."
HWLOC_COPYRIGHT_SEARCH_NAME=Inria

If you don't care, remove the pre-commit hook, or commit with --no-verify.

@bgoglin
Copy link
Contributor

bgoglin commented Jan 14, 2026

The reason we define our own functions is that glibc does not yet expose any binding for listmount/statmount, However syscall numbers are currently available.

Do you know more about this "yet" ? Is it missing because the glibc API isn't ready yet? Or do they want to keep the syscall internal instead of exposing it directly? (we've seen some cases like that in the past)

@kphuphanwoe
Copy link
Author

I don't have more info here, "yet" I just meant glibc doesn't currently expose a public API for these syscalls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants