Re: Userspace TUX architecture

Wojtek Meler <[email protected]> Thu, 13 Apr 2006 12:19:25 +0200
Newsgroups gmane.network.tux
Message-ID <[email protected]>
Wojtek Meler wrote:
> I'd like to implement simple and fast redirection engine by implementing 
> userspace module (or even kernel trusted module but I don't know how to 
> do it - any docs or examples???) and I've some questions about userspace 
> architecture.
> 
> When I ran ps -axf I get:
> 
> 3474 pts/0    S      0:00 [TUX date]
>  3476 ?        Ss     0:00 [TUX manager]
>  3477 ?        S      0:00  \_ [TUX worker 0]
>  3478 ?        S      0:00      \_ [TUX worker 0]
>  3479 ?        S      0:00      \_ [TUX worker 0]
> ... (64 x TUX worker 0)
> 3475 ?        S      0:00 [TUX logger]
> 
> It suggests that multiple TUX worker processes (or threads)  are 
> handling requests from kernel. Is it true? I need to know if my 
> userspace module run inside one process in one thread or can be run in 
> multiple threads or even processes.

OK - I've read carefully the kernel patch and I've found that those 
threads are cachemiss IO threads.

As far as I understand TUX manager is spawning separate TUXTHREADS "TUX 
worker" processes which handles user modules.
Each "TUX worker" thread has corresponding NR_IO_THREADS cachemiss 
kernel threads.
There is also one TUX logger kernel thread that is started in kernel and 
one "TUX date" process started by userspace tools.

regards,
Wojtek