Commit 9e18e79f authored by Deng Xiaoyun's avatar Deng Xiaoyun Committed by guzitao
Browse files

sw64: add support for vmtop

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56WV8



--------------------------------

vmtop is a user-mode tool that runs on the host. It dynamically displays
VM resource usage, including CPU and memory usage, and vCPU KVM exit
events. To implement these functions, the kernel need to provide
interfaces. Therefore, the kernel need to make the following changes.

Add the contents of the kvm_vcpu_stat structure, which vmtop monitors.

Add debugfs_entries structure and dfx_sw64_debugfs_entries structure,
which generate corresponding files in the /sys/kernel/debug/kvm path
for vmtop to read when VM is created.

Add dfx_sw64_stat_fops, which is used for reading and writing vcpu_stat
file in the /sys/kernel/debug/kvm path.

Signed-off-by: default avatarDeng Xiaoyun <dengxiaoyun@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 26ae49ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment