Understanding OpenAFS (was Re: [OpenAFS-devel] configure not honoring 'CC' environment variable)

Derek Atkins warlord@MIT.EDU
Wed, 23 Mar 2005 11:38:29 -0500


Troy Benjegerdes <hozer@hozed.org> writes:

> Something changed between the linux 2.4 and the linux 2.6 implementation
> then. On 2.4 (and OSX), there is a 'afsd' process running reported by
> ps, and I can see what the command line arguments were.

Not really..  It changed sometime mid-1.2 release.  So if you're running
an old 1.2 release you'll see the full afsd command line, but latter 1.2
releases use linux kernel threads.  Here's what I see on my 2.4 system:

--> ps auxww | grep afs
root      2789  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_rxlistener]
root      2791  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_callback]
root      2793  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_rxevent]
root      2794  0.0  0.1  2320 1164 pts/4    S    Mar21   0:00 /usr/vice/etc/afsd -stat 10000 -daemons 4 -volumes 200 -afsdb -dynroot -fakestat
root      2796  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afsd]
root      2798  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_checkserver]
root      2800  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_background]
root      2802  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_background]
root      2804  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_background]
root      2806  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_background]
root      2808  0.0  0.0     0    0 ?        SW   Mar21   0:00 [afs_cachetrim]

> On 2.6, all I get is:
>
> root      2642  0.0  0.0      0     0 ?        S    Mar17   0:13 [afsd]
>
> So where is the memory afsd is using accounted for? Is *everything* in
> the kernel libafs, and afsd.c only does setup?

Yes, afsd only does setup and then jumps into a kernel syscall and
stays there forever.  The kernel then creates a bunch of threads,
which is what you see here.  The zero-size process is just a kernel
thread.  It takes up no process space; all memory is in the kernel.

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available