I see the following usage patterns -- I wonder if we can see a way to
provide for all these. I will speak in terms of just cpusets and
resource groups, as examplars of the variety of controllers that might
make good use of Paul M's containers:
Could we (Paul M?) find a way to build a single kernel that supports:
1) Someone just using cpusets wants to do:
mount -t cpuset cpuset /dev/cpuset
and then see the existing cpuset API. Perhaps other files show
up in the cpuset directories, but at least all the existing
ones provided by the current cpuset API, with their existing
behaviours, are all there.
2) Someone wanting a good CKRM/ResourceGroup interface, doing
whatever those fine folks are wont to do, binding some other
resource group controller to a container hierarchy.
3) Someone, in the future, wanting to "bind" cpusets and resource
groups together, with a single container based name hierarchy
of sets of tasks, providing both the cpuset and resource group
control mechanisms. Code written for (1) or (2) should work,
though there is a little wiggle room for API 'refinements' if
need be.
4) Someone doing (1) and (2) separately and independently on the
same system at the same time, with separate and independent
partitions (aka container hierarchies) of that systems tasks.
The initial customer needs are for (1), which preserves an existing
kernel API, and on separate systems, for (2). Providing for both on
the same system, as in (3) with a single container hierarchy or even
(4) with multiple independent hierarchies, is an enhancement.
I forsee a day when user level software, such as batch schedulers, are
written to take advantage of (3), once the kernel supports binding
multiple controllers to a common task container hierarchy. Initially,
some systems will need cpusets, and some will need resource groups, and
the intersection of these requiring both, whether bound as in (3), or
independent as in (4), will be pretty much empty.
In general then, we will have several controllers (need a good way
for user space to list what controllers, such as cpusets and resource
groups,
Perhaps the interface to binding multiple controllers to a single container
hierarchy is via multiple mount commands, each of type 'container', with
different options specifying which controller(s) to bind. Then the
command 'mount -t cpuset cpuset /dev/cpuset' gets remapped to the command
'mount -t container -o controller=cpuset /dev/cpuset'.