-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] Creating non-linux implementation for sysfs_cgroup_driver. #56483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Ibrahim Rabbani <[email protected]>
Signed-off-by: israbbani <[email protected]>
Signed-off-by: israbbani <[email protected]>
|
Windows test failures are unrelated. MacOS build passes in https://buildkite.com/ray-project/premerge/builds/48663 |
| // Used to identify if a filesystem is mounted using cgroupv2. | ||
| // See: https://docs.kernel.org/admin-guide/cgroup-v2.html#mounting | ||
| #ifndef CGROUP2_SUPER_MAGIC | ||
| #define CGROUP2_SUPER_MAGIC 0x63677270 | ||
| #endif | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved here to make the header file support non-linux systems.
can-anyscale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param mount_file_path only used for testing. | ||
| */ | ||
| explicit SysFsCgroupDriver(std::string mount_file_path = MOUNTED) | ||
| explicit SysFsCgroupDriver(std::string mount_file_path = kMountFilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was /etc/mtab on line 45 and now it's /mnt/mtab? - also some comments about MOUNTED are not longer valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I've deleted the comments and changed it to /etc/mtab. I need to figure out why the cgroup tests passed with the wrong mount path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the relevant integration tests are introduced in a later PR. This would break tests in #56352.
|
the bazel build refactoring looks good to me |
|
Summarizing my offline discussions with @jjyao here. I think the true-north for cross-platform development is to have
This has a few benefits:
For the Cgroups module, after the feature is code complete, I'll refactor this to
Once the pattern is tested and well established, I plan on trying to use it on our other process management code in |
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: Edward Oakes <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: zac <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: Marco Stephan <[email protected]>
…6483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]>
…y-project#56483) Signed-off-by: Ibrahim Rabbani <[email protected]> Signed-off-by: israbbani <[email protected]> Co-authored-by: Ibrahim Rabbani <[email protected]> Co-authored-by: Jiajun Yao <[email protected]>

MacOS build is failing on post-merge. The problem was introduced by #56260.
This PR provides a noop implementation for the
sysfs_cgroup_drivertarget for non-linux systems.