/* * This function is used to get the notification from the drmgr when * QoS credits are changed.
*/ static ssize_t update_total_credits_store(struct vas_cop_feat_caps *caps, constchar *buf, size_t count)
{ int err;
u16 creds;
err = kstrtou16(buf, 0, &creds); /* * The user space interface from the management console * notifies OS with the new QoS credits and then the * hypervisor. So OS has to use this new credits value * and reconfigure VAS windows (close or reopen depends * on the credits available) instead of depending on VAS * QoS capabilities from the hypervisor.
*/ if (!err)
err = vas_reconfig_capabilties(caps->win_type, creds);
/* * Create sysfs interface: * /sys/devices/virtual/misc/vas/vas0/gzip/default_capabilities * This directory contains the following VAS GZIP capabilities * for the default credit type. * /sys/devices/virtual/misc/vas/vas0/gzip/default_capabilities/nr_total_credits * Total number of default credits assigned to the LPAR which * can be changed with DLPAR operation. * /sys/devices/virtual/misc/vas/vas0/gzip/default_capabilities/nr_used_credits * Number of credits used by the user space. One credit will * be assigned for each window open. * * /sys/devices/virtual/misc/vas/vas0/gzip/qos_capabilities * This directory contains the following VAS GZIP capabilities * for the Quality of Service (QoS) credit type. * /sys/devices/virtual/misc/vas/vas0/gzip/qos_capabilities/nr_total_credits * Total number of QoS credits assigned to the LPAR. The user * has to define this value using HMC interface. It can be * changed dynamically by the user. * /sys/devices/virtual/misc/vas/vas0/gzip/qos_capabilities/nr_used_credits * Number of credits used by the user space. * /sys/devices/virtual/misc/vas/vas0/gzip/qos_capabilities/update_total_credits * Update total QoS credits dynamically
*/
/* * Add VAS and VasCaps (overall capabilities) dir entries.
*/ int __init sysfs_pseries_vas_init(struct vas_all_caps *vas_caps)
{ int ret;
ret = misc_register(&vas_miscdev); if (ret < 0) {
pr_err("%s: register vas misc device failed\n", __func__); return ret;
}
/* * The hypervisor does not expose multiple VAS instances, but can * see multiple VAS instances on PowerNV. So create 'vas0' directory * on pseries.
*/
pseries_vas_kobj = kobject_create_and_add("vas0",
&vas_miscdev.this_device->kobj); if (!pseries_vas_kobj) {
misc_deregister(&vas_miscdev);
pr_err("Failed to create VAS sysfs entry\n"); return -ENOMEM;
}
if ((vas_caps->feat_type & VAS_GZIP_QOS_FEAT_BIT) ||
(vas_caps->feat_type & VAS_GZIP_DEF_FEAT_BIT)) {
gzip_caps_kobj = kobject_create_and_add("gzip",
pseries_vas_kobj); if (!gzip_caps_kobj) {
pr_err("Failed to create VAS GZIP capability entry\n");
kobject_put(pseries_vas_kobj);
misc_deregister(&vas_miscdev); return -ENOMEM;
}
}
return 0;
}
#else int sysfs_add_vas_caps(struct vas_cop_feat_caps *caps)
{ return 0;
}
int __init sysfs_pseries_vas_init(struct vas_all_caps *vas_caps)
{ return 0;
} #endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.