[OpenAFS-devel] Solaris 10u4 progress update

Dale Ghent daleg@umbc.edu
Wed, 19 Sep 2007 18:25:39 -0400


Don't worry, I haven't dropped off the face of the earth, I've been  
spending time being pulled in many directions :)

Here's what I have so far. It's the interface polling thread method  
discussed earlier. Right now I'm looking at where the AFS code  
currently searches the ILL structure to get its interface info (in  
osi_SetServerPrefs in afs_server.c and the MTU probing in rx/SOLARIS/ 
knet.c) and figuring out the the best way to ingrate code into there  
without making things messy.

http://elektronkind.org/outbox/afs/osi_net.c

So, this thread (osi_NetIFPoller) is kicked off by a taskq (see taskq 
(9f)) in afs_call.c:afs_InitSetup.

It sets itself up and enters a while(1) loop, gathers the interface  
info that other parts of AFS desires, aquires a RW lock on the global  
array, updates the global array, releases the RW lock, and sleeps.

The thread sleeps for a tunable number of seconds, the default being  
30. This can be adjusted via putting "set afs:afs_if_poll_rate =  
<seconds>" in /etc/system.

The code currently doesn't care about pruning interfaces from the  
global array that were up, but then down'd. It also assumes that the  
max interfaces it'll ever see is 1024. The maximum interfaces that  
solaris supports is, in the words of one Solaris network driver guy,  
"arbitrarily huge"... so in the interest of keeping memory  
requirements low and the code time, it's capped at 1024.

So, as I move on to finish this and hopefully provide a patch, could  
someone please take a look at my logic/code and nit pick or suggest  
improvements? One on my mind is whether afs_InitSetup is the right  
place to spawn this thread.

Mucho thanks.
/dale

--
Dale Ghent
Specialist, Storage and UNIX Systems
UMBC - Office of Information Technology
ECS 201 - x51705