* [PATCH 1/2] Documentation/cgroup-v1: fix outdated programming details
@ 2017-12-29 20:01 Matt Roper
2017-12-29 20:02 ` [PATCH 2/2] cgroup: Update documentation reference Matt Roper
[not found] ` <20171229200200.18873-1-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 2 replies; 7+ messages in thread
From: Matt Roper @ 2017-12-29 20:01 UTC (permalink / raw)
To: cgroups; +Cc: Matt Roper, Tejun Heo, Jonathan Corbet, linux-doc
The cgroup-v1 documentation is out of date in a few places:
* cgroup controllers can no longer be compiled as modules since commit
3ed80a6 ("cgroup: drop module support"); the functions and fields
referenced here no longer exist.
* Controllers need to create of a cgroup_subsys object named
"<name>_cgrp_subsys" instead of "<name>_subsys" since commit
073219e ("cgroup: clean up cgroup_subsys names and initialization")
Cc: Tejun Heo <tj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
Documentation/cgroup-v1/cgroups.txt | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/Documentation/cgroup-v1/cgroups.txt b/Documentation/cgroup-v1/cgroups.txt
index 308e5ff..059f706 100644
--- a/Documentation/cgroup-v1/cgroups.txt
+++ b/Documentation/cgroup-v1/cgroups.txt
@@ -523,12 +523,7 @@ Accessing a task's cgroup pointer may be done in the following ways:
Each subsystem should:
- add an entry in linux/cgroup_subsys.h
-- define a cgroup_subsys object called <name>_subsys
-
-If a subsystem can be compiled as a module, it should also have in its
-module initcall a call to cgroup_load_subsys(), and in its exitcall a
-call to cgroup_unload_subsys(). It should also set its_subsys.module =
-THIS_MODULE in its .c file.
+- define a cgroup_subsys object called <name>_cgrp_subsys
Each subsystem may export the following methods. The only mandatory
methods are css_alloc/free. Any others that are null are presumed to
--
2.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/2] cgroup: Update documentation reference
2017-12-29 20:01 [PATCH 1/2] Documentation/cgroup-v1: fix outdated programming details Matt Roper
@ 2017-12-29 20:02 ` Matt Roper
2018-01-02 15:00 ` Tejun Heo
[not found] ` <20171229200200.18873-1-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Matt Roper @ 2017-12-29 20:02 UTC (permalink / raw)
To: cgroups; +Cc: Matt Roper, Tejun Heo, linux-doc
The cgroup_subsys structure references a documentation file that has been
renamed after the v1/v2 split. Since the v2 documentation doesn't
currently contain any information on kernel interfaces for controllers,
point the user to the v1 docs.
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
include/linux/cgroup-defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 8b7fd8e..9f242b8 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -561,7 +561,7 @@ struct cftype {
/*
* Control Group subsystem type.
- * See Documentation/cgroups/cgroups.txt for details
+ * See Documentation/cgroup-v1/cgroups.txt for details
*/
struct cgroup_subsys {
struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css);
--
2.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] cgroup: Update documentation reference
2017-12-29 20:02 ` [PATCH 2/2] cgroup: Update documentation reference Matt Roper
@ 2018-01-02 15:00 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2018-01-02 15:00 UTC (permalink / raw)
To: Matt Roper; +Cc: cgroups, linux-doc
On Fri, Dec 29, 2017 at 12:02:00PM -0800, Matt Roper wrote:
> The cgroup_subsys structure references a documentation file that has been
> renamed after the v1/v2 split. Since the v2 documentation doesn't
> currently contain any information on kernel interfaces for controllers,
> point the user to the v1 docs.
>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: linux-doc@vger.kernel.org
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Applied 1-2 to cgroup/for-4.16.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20171229200200.18873-1-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/2] Documentation/cgroup-v1: fix outdated programming details
[not found] ` <20171229200200.18873-1-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2017-12-29 20:34 ` Matt Roper
[not found] ` <20171229203449.GS5820-b/RNqDZ/lqH1fpGqjiHozbKMmGWinSIL2HeeBUIffwg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Matt Roper @ 2017-12-29 20:34 UTC (permalink / raw)
To: cgroups-u79uwXL29TY76Z2rM5mHXA; +Cc: Tejun Heo
On Fri, Dec 29, 2017 at 12:01:59PM -0800, Matt Roper wrote:
> The cgroup-v1 documentation is out of date in a few places:
>
> * cgroup controllers can no longer be compiled as modules since commit
> 3ed80a6 ("cgroup: drop module support"); the functions and fields
> referenced here no longer exist.
...
This is actually exactly what I was digging into the cgroups
documentation to figure out how to do. I was hoping to be able to
create a controller inside an existing device driver that could manage
driver-specific policy and resources. However based on the explanation
given in https://www.spinics.net/lists/cgroups/msg10077.html , it sounds
like this isn't really a direction that the cgroups framework wants to
go.
My specific goal was to use the cgroups-v2 hierarchy to assign i915
(GPU) workloads with an initial priority according to the cgroup
classification of the submitting process. In the future I could also
see driver-specific cgroup controllers potentially being useful for
managing specialized resources like graphics-specific stolen memory or
video RAM on discrete gpu's.
If a system is already using a cgroups-v2 hierarchy to manage other
system resources via the standard controllers, I think it would be ideal
if we could leverage that existing process organization to supply i915
with desired driver-specific policy and resource assignments. Since
cgroup controllers don't seem to support this at the moment, is there an
alternate mechanism I should be looking at instead? Or is this a type
of use case that we may want to evolve cgroups to support in a different
manner?
Thanks!
Matt
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-01-03 0:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 20:01 [PATCH 1/2] Documentation/cgroup-v1: fix outdated programming details Matt Roper
2017-12-29 20:02 ` [PATCH 2/2] cgroup: Update documentation reference Matt Roper
2018-01-02 15:00 ` Tejun Heo
[not found] ` <20171229200200.18873-1-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-12-29 20:34 ` [PATCH 1/2] Documentation/cgroup-v1: fix outdated programming details Matt Roper
[not found] ` <20171229203449.GS5820-b/RNqDZ/lqH1fpGqjiHozbKMmGWinSIL2HeeBUIffwg@public.gmane.org>
2018-01-02 15:05 ` Tejun Heo
[not found] ` <20180102150502.GC3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-03 0:12 ` Matt Roper
[not found] ` <20180103001202.GX5820-b/RNqDZ/lqH1fpGqjiHozbKMmGWinSIL2HeeBUIffwg@public.gmane.org>
2018-01-03 0:37 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox