[Port-solaris] Re: [OpenAFS-devel] Re: OpenAFS cache manager cold vs warm shutdown

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Mon, 7 Jul 2014 09:04:30 -0400


On Thu, 3 Jul 2014 19:23:17 -0500
Andrew Deason <adeason@sinenomine.net> wrote:

> > If afs_shutdown() is called "warm" (afs_cold_shutdown==0), the
> > shutdown logic skips the clearing and releasing of some resources.  I
> > see no rhyme or reason to which resources AFS leaves unreleased.  Nor
> > do I understand the (possibly historical) reason for why there is a
> > distinction between cold and warm shutdown.

I have noticed this oddness a few years when looking at the linux
allocator.  It keeps track of all its allocations since it can't rely
seem to rely on the other parts to reliably release their memory
allocations.

>  - You can run some of the client daemons without actually mounting /afs
>    in "normal" operation. I'm not sure if I've ever done this, but I
>    have a vague recollection from some code comment or post somewhere
>    referencing running the nfs xlator PAG manager this way. Maybe there
>    are other reasons, other ways.

I think just loading the kernel module will get you token management
(PAGs et al) which is potentially useful even without afs mounted.

> If you look at the platforms that set COLD shutdown during umount, you
> just see AIX, obsd, and nbsd, and the 'COLD' shutdown was enabled when
> support was added for a certain platform version. I would guess that
> doing so is "incorrect", and someone just set it to workaround some
> problem and never mentioned it, and possibly didn't really know why it
> was there. (Of course, I'm not one to talk, since most of what I'm
> saying here is also just guessing.)

Possibly afsd -shutdown should go away.  What it does should happen
during module removal.  Why did it ever exist?  Perhaps there wasn't a
mechanism to hook module removal or perhaps the developers wanted some
sort of partial shutdown in order to remount afs with different
parameters (computers were slower at one point).