s390/hypfs: Add diagnose 0c support
With this feature, you can read the CPU performance metrics provided by the z/VM diagnose 0C. This then allows to get the management time for each online CPU of the guest where the diagnose is executed. The new debugfs file /sys/kernel/debug/s390_hypfs/diag_0c exports the diag0C binary data to user space via an open/read/close interface. The binary data consists out of a header structure followed by an array that contains the diagnose 0c data for each online CPU. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
45cce4ccaf
commit
34c0dad752
@@ -482,10 +482,14 @@ static int __init hypfs_init(void)
|
||||
rc = -ENODATA;
|
||||
goto fail_hypfs_vm_exit;
|
||||
}
|
||||
if (hypfs_diag0c_init()) {
|
||||
rc = -ENODATA;
|
||||
goto fail_hypfs_sprp_exit;
|
||||
}
|
||||
s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
|
||||
if (!s390_kobj) {
|
||||
rc = -ENOMEM;
|
||||
goto fail_hypfs_sprp_exit;
|
||||
goto fail_hypfs_diag0c_exit;
|
||||
}
|
||||
rc = register_filesystem(&hypfs_type);
|
||||
if (rc)
|
||||
@@ -494,6 +498,8 @@ static int __init hypfs_init(void)
|
||||
|
||||
fail_filesystem:
|
||||
kobject_put(s390_kobj);
|
||||
fail_hypfs_diag0c_exit:
|
||||
hypfs_diag0c_exit();
|
||||
fail_hypfs_sprp_exit:
|
||||
hypfs_sprp_exit();
|
||||
fail_hypfs_vm_exit:
|
||||
@@ -510,6 +516,7 @@ static void __exit hypfs_exit(void)
|
||||
{
|
||||
unregister_filesystem(&hypfs_type);
|
||||
kobject_put(s390_kobj);
|
||||
hypfs_diag0c_exit();
|
||||
hypfs_sprp_exit();
|
||||
hypfs_vm_exit();
|
||||
hypfs_diag_exit();
|
||||
|
Reference in New Issue
Block a user