Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 1999 02:58:38 -0500 (EST)
From:      Alfred Perlstein <bright@rush.net>
To:        Studded <Studded@gorean.org>
Cc:        cjclark@home.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: What *exactly* does nfsiod do?
Message-ID:  <Pine.BSF.3.96.990618023809.14320B-100000@cygnus.rush.net>
In-Reply-To: <3769C2DD.DC6BA2D3@gorean.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Jun 1999, Studded wrote:

> "Crist J. Clark" wrote:
> > 
> > Alfred Perlstein wrote,
> > > On Thu, 17 Jun 1999, Studded wrote:
> > >
> > > >     I'm trying to debug some NFS issues with amd and I'm trying to
> > > > figure out if nfsiod is helping me or hurting me. The man page says,
> > > >
> > > >      Nfsiod runs on an NFS client machine to service asynchronous I/O
> > > >      requests to its server.  It improves performance but is not
> > > >      required for correct operation.
> > > >
> > > > My confusion is about the meaning of "its server" in that sentence. If my
> > > > machine is an NFS client only (i.e., it's using amd to automount
> > > > directories on remote machines via NFS) does nfsiod come into play at all?
> > >
> > > yes, "its server" refers to the machine that it's using files over NFS.
> > 
> > You used 'it' again and it^H^H^H this version is not really much more
> > clear. That first line the original poster quoted would read better
> > as,
> > 
> >      "Nfsiod runs on an NFS client machine to service asynchronous I/O
> >       requests to the client machine's server."
> >                   ^^^^^^^^^^^^^^^^^^^^
> 
> 	Sorry I wasn't more clear. I know that "its" seems to refer to the client
> machine. What I'm confused about is what server on the client machine is
> supposed to be servicing requests. NFS client requests don't depend on any
> server on the client machine. My guess is that nfsiod takes ownership of
> one remote server and services requests from the client to that server,
> making "its server" refer to the server that nfsiod has taken "ownership"
> of. But that is just a guess. And yes, I think that once we do figure out
> what this means exactly someone should do a PR with better wording.... I
> can do it if no one else wants to.

No, please re-read my description or consider this model:

 ____________________________________
|                                    |
|                                    |
|                                    | 1. nfs_svc system call entry
|kernel                    2         | 2. sleeping waiting to be woken
|                         /          |
|________________________1___________|
                        _^____
  _________________    (nfsiod)
 ( any application )    ------
  \_______________/
---------------------------------------------------------------------------
 ____________________________________
|                                    |
|                   *                |
|              4----/                | 1. nfs_svc system call entry
|kernel       /    /       2         | 2. sleeping waiting to be woken
|            /    /       /          | 3. write system call
|___________3____5_______1___________| 4. hits NFS code in kernel
           |     |      _^____            an NFS operation is *QUEUED*
  _________^_____V_    (nfsiod)           and nfsiod (2) is woken up
 ( any application )    ------         5. write system call returns
  \_______________/
---------------------------------------------------------------------------
 ___________________^________________
|                   |                |
|                  (*)----6--6--\    |
|              4--   7          /    | 1. nfs_svc system call entry
|kernel       /   \   \7->-2->-6     | 2. sleeping waiting to be woken
|            /    /       /          | 3. write system call
|___________3____5_______1___________| 4. hits NFS code in kernel
           |     |      _^____            an NFS operation is *QUEUED*
  _________^_____V_    (nfsiod)           and nfsiod (2) is woken up
 ( any application )    ------         5. write system call returns
  \_______________/                    6. operation is picked up by nfsiod
                                          and sent to NFS server via RPC
                                       7. a reply is waited for and errors
                                          are kept track off


You can see how nfsiod processes allow the user application to return
to processing without waiting for the network latency of writes to the
server.

This is ALL on the client machine, it's how write caching is done.
I think instead of thinking of a nfsiod binding to a particular server,
they really bind to a _request_ until it's completed.

Also note that steps 1 & 2 usually only occur when the system is
started and the initial nfsiods are run.

I'm up late and haven't read all the code involved here, so 
anyone with a more correct explanation would be appreciated.

-Alfred Perlstein - [bright@rush.net|bright@wintelcom.net] 
systems administrator and programmer
    Win Telecom - http://www.wintelcom.net/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990618023809.14320B-100000>