Skip to content
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

Create checker for resctrl support in a system #9

Open
yonch opened this issue Nov 25, 2024 · 6 comments
Open

Create checker for resctrl support in a system #9

yonch opened this issue Nov 25, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@yonch
Copy link
Contributor

yonch commented Nov 25, 2024

We would like to write a program that checks whether a system has Operating System and hardware support for memory bandwidth and cache allocation.

goresctrl is a go library that works with the Resource Control network subsystem. It has helper methods for finding and querying resctrl. For example, getRdtInfo() appears to check for support for different features (CAT, MON, MBA).

The result of this ticket is either:

  • a golang binary using goresctrl that exists with 0 if resctrl exists and is operational, 1 otherwise (and can print useful information about the state of the system), or
  • a golang test or set of tests, that if all of the tests pass, resctrl exists and is operational

We can put the code in pkg/checker.

Note that getRdtInfo() does not mount the resctrl filesystem. Rather, it assumes it was previously mounted and finds its location, so we need to check how goresctrl mounts the filesystem.

@yonch yonch added the good first issue Good for newcomers label Nov 25, 2024
@omokpo
Copy link

omokpo commented Nov 26, 2024

Note that getRdtInfo() does not mount the resctrl filesystem. Rather, it assumes it was previously mounted and finds its location, so we need to check how goresctrl mounts the filesystem.

Can we use?
Should the checker also check for kernel config for resctrl

@yonch
Copy link
Contributor Author

yonch commented Nov 26, 2024

I see the mount command in the link you sent; code would need to handle failure to mount, preparing the mount path, unmounting, etc. If goresctrl has existing functionality we should use it.

Yes we can check the kernel config, but if there isn't existing functionality let's get something working and then add it later.

@darshan-dedhia
Copy link
Contributor

I can work on this in this week if no one else is working on this.

@yonch
Copy link
Contributor Author

yonch commented Dec 2, 2024

You got it! I'll tackle some other topics.

I'd be very interested to read what you find as you go through this (to learn about goresctrl), so if there are any interesting tidbits you care to share please consider posting them on the issue.

@darshan-dedhia
Copy link
Contributor

sure I will.

@darshan-dedhia
Copy link
Contributor

This repository has code for mounting and unmounting goresctrl. Since this repository is archived, I will copy required code in try mounting resctrl inside pkb/checker.

darshan-dedhia added a commit to darshan-dedhia/memory-collector that referenced this issue Feb 12, 2025
darshan-dedhia added a commit to darshan-dedhia/memory-collector that referenced this issue Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants