1. What is the fundamental unit over which resource-management is
applied? Individual tasks or individual containers?
/me thinks latter.
In which case, it makes sense to stick
resource control information in the container somewhere.
2. Regarding space savings, if 100 tasks are in a container (I dont know
what is a typical number) -and- lets say that all tasks are to share
the same resource allocation (which seems to be natural), then having
a 'struct container_group *' pointer in each task_struct seems to be not
very efficient (simply because we dont need that task-level granularity of
managing resource allocation).
3. This next leads me to think that 'tasks' file in each directory doesnt make
sense for containers. In fact it can lend itself to error situations (by
administrator/script mistake) when some tasks of a container are in one
resource class while others are in a different class.
Instead, from a containers pov, it may be usefull to write
a 'container id' (if such a thing exists) into the tasks file
which will move all the tasks of the container into
the new resource class. This is the same requirement we
discussed long back of moving all threads of a process into new
resource class.