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

proc_fuse: add psi(pressure stall information) procfs #665

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

loyou
Copy link
Contributor

@loyou loyou commented Nov 13, 2024

Kernel support psi(pressure stall information) since 4.20
with procfs /proc/pressure/{io,cpu,memory} and
cgroupv2 {io.pressure, cpu.pressure, memory.pressure}.

This patch add read-only psi procfs,
and people can get pressure information now.
Full functional feature for monitoring are still under investigation.

@mihalicyn mihalicyn self-requested a review November 13, 2024 13:23
@mihalicyn
Copy link
Member

Hey @loyou,

thanks for working on this.

Please, notice that you have a failing test https://github.com/lxc/lxcfs/actions/runs/11809711932/job/32900481717?pr=665

src/bindings.h Outdated Show resolved Hide resolved
@loyou
Copy link
Contributor Author

loyou commented Nov 14, 2024

I'm a little confused with the test result,

==> Testing /sys/devices/system/cpu/online
../src/lxcfs.c: 910: lxcfs_read: unknown file type: path=/sys/devices/system/cpu/online, type=-1, fi->fh=105965433156896
cat: /tmp/tmp.tDXXvo8T0e/sys/devices/system/cpu/online: Invalid argument
../src/lxcfs.c: 988: lxcfs_release: unknown file type: path=/sys/devices/system/cpu/online, type=-1, fi->fh=105965433156896

the failed line number does not match the patched file lines,
and cat /sys/devices/system/cpu/online in lxc container with patched lxcfs, it works fine.
I will resolve the live upgrade issue first and then check it again.

Kernel support psi(pressure stall information) since 4.20
with procfs /proc/pressure/{io,cpu,memory} and
cgroupv2 {io.pressure, cpu.pressure, memory.pressure}.

This patch add read-only psi procfs,
and people can get pressure information now.
Full functional feature for monitoring are still under investigation.

Signed-off-by: Feng Sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants