agreed. I see no much reason to cache it and make tons of the same pointers in all the tasks. Only if needed.The questions seem to break down into:
1) Where do we put the references to the different namespaces?
- Do we put the references in a struct container that we reference from struct task_struct?
- Do we put the references directly in struct task_struct?
You "cache" task_struct->container->hotsubsys under task_struct->hotsubsys.
We don't change containers other then at clone time, so no coherency issue here !!!!
Which subsystems pointers to "cache", should be agreed by the experts,
but first approach should always not to cache and go through the container.
mmm, how do you plan to pass additional flags to clone()?2) What is the syscall interface to create these namespaces?Like that approach .. flexible .. particular when one has well specified namespaces.
- Do we add clone flags? (Plan 9 style)
can be so...- Do we add a syscall (similar to setsid) per namespace?
(Traditional unix style)?
why do you think so?- Do we in addition add syscalls to manipulate containers generically?Agreed.
I don't think having a single system call to create a container and a new
instance of each namespace is reasonable as that does not give us a
path into the future when we create yet another namespace.
this is nothing compared to hierarchy operations.4) How do we implement each of these namespaces?Good question... at least with PID and FS two are there ..
Besides being maintainable are there other constraints?
6) How do we do all of this efficiently without a noticeable impact on
performance?
- I have already heard concerns that I might be introducing cache
line bounces and thus increasing tasklist_lock hold time.
Which on big way systems can be a problem.