[Devel] RE: Containers HOWTO? (Where do I start?)
Rob Landley
rlandley at parallels.com
Wed Dec 8 13:18:49 PST 2010
> A few places to start since you want to start from the ground up:
>
> 1. man clone
Yup, got that one already.
> 2. man pivot_root
I wrote the busybox switch_root implementation, which meant I had to
really _understand_ the full horror of the pivot_root implementation
and why it _wasn't_ switch_root (examining every process in the system
so you can move their chroot entry for kernel threads and daemons is
really ugly, but you can't unmount a filesystem that has processes
pinning it). Although come to think of it I thought kernel threads were
parked in initramfs these days? (Doesn't initrd overmount initramfs?
Now I have to go look at what the code's doing again...)
But how does pivot_root enter into this when you haven't got an initrd to
free? I thought when you killed a container's init process that killed all
the children and freed the resources, so how does pivot_root enter
into this? (You don't reparent existing processes, you span new ones,
right?)
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=Documentation/cgroups;h=8c6b3f6c41a929f8db38b51a39442387ecbd5986;hb=HEAD
Ah, _that_ is what i was looking for. Documentation/cgroups.
I'll look at #3 and #5 after reading that.
Thanks,
Rob
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list