|
From: Jeremy F. <je...@go...> - 2005-05-29 05:28:45
|
Ashley Pittman wrote:
>It's somewhat complicated...
>
>
Er, yep.
>the parent thread calls elan3_detach (an ioctl) and the device driver
>sets some state and wakes up the kernel thread sitting in the lwp ioctl.
>This thread then returns done and the lwp exits. Other than that the
>lwp only returns to user-space to take signals.
>
>
So what makes it return done? What triggers that event?
>That's the theory anyway, it's complicated by the fact that we have
>kernel patches (not just modules) to provide "ptrack" functionality,
>basically the job starts in a container and when the job finishes all
>processes (and sys-v stuff) created in that container also get
>destroyed.
>
>
Is this some extra kernel state which Valgrind needs to understand to do
a correct emulation? How are these containers created? In this case,
would the program running under valgrind create a new container which is
expected to mop up all the threads when the main thread exits? How is a
"job" defined?
>If you are using rms/pdsh/slurm to start jobs then you will be using the
>ptrack code (it's done by the open source "rms" kernel module), if you
>are just running your programs by hand then you won't have the ptrack
>stuff.
>
>It's purpose is to make syscalls on behalf of the nic, the c code on the
>nic sets up a descriptor, generates and interrupt which the lower half
>forwards onto the lwp kernel thread. This thread then makes syscalls
>back into the kernel from the top half as the appropriate user with
>suitable permissions.
>
>
Hm, I think I follow, but I don't see at what point it depends on the
initial thread terminating before one of the child threads (or when they
should all exit together).
In the 2.6 NPTL thread model, exit_group() terminates all threads in the
thread group atomically, so there's no waiting around for things to
terminate (or dependence on termination order). Is this running in a
2.4 thread model, or a 2.6 one? It sounds like the container machinery
has an atomic group termination property similar to exit_group().
J
J
|