/** * struct misc_res: Per cgroup per misc type resource * @max: Maximum limit on the resource. * @watermark: Historical maximum usage of the resource. * @usage: Current usage of the resource. * @events: Number of times, the resource limit exceeded.
*/ struct misc_res {
u64 max;
atomic64_t watermark;
atomic64_t usage;
atomic64_t events;
atomic64_t events_local;
};
/** * struct misc_cg - Miscellaneous controller's cgroup structure. * @css: cgroup subsys state object. * @events_file: Handle for the misc resources events file. * @res: Array of misc resources usage in the cgroup.
*/ struct misc_cg { struct cgroup_subsys_state css;
/** * css_misc() - Get misc cgroup from the css. * @css: cgroup subsys state object. * * Context: Any context. * Return: * * %NULL - If @css is null. * * struct misc_cg* - misc cgroup pointer of the passed css.
*/ staticinlinestruct misc_cg *css_misc(struct cgroup_subsys_state *css)
{ return css ? container_of(css, struct misc_cg, css) : NULL;
}
/* * get_current_misc_cg() - Find and get the misc cgroup of the current task. * * Returned cgroup has its ref count increased by 1. Caller must call * put_misc_cg() to return the reference. * * Return: Misc cgroup to which the current task belongs to.
*/ staticinlinestruct misc_cg *get_current_misc_cg(void)
{ return css_misc(task_get_css(current, misc_cgrp_id));
}
/* * put_misc_cg() - Put the misc cgroup and reduce its ref count. * @cg - cgroup to put.
*/ staticinlinevoid put_misc_cg(struct misc_cg *cg)
{ if (cg)
css_put(&cg->css);
}
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.