Subject: kqueue and NFS
To: None <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 09/28/2002 20:42:24
I'm working on this kqueue branch. I implemented kqueue/kevent
support for all local writable filesystems, and I wonder what the way
forward with NFS would be.

To make the kevent facility [*] really working properly, the NFS client
code need to know about any file changes. This can be
done for local system (which is easy, and I have already changes to
do this), but the file can also change on the server by different

So, to properly implement kevent semantics, it would be necessary
to check the watched file for changes on the server. I don't see NFSv2
or NFSv3 support any callback facility, so this would need to be
done via periodic polling, either using kernel thread (which seems
to be the most suitable), callout or some sort of special userland daemon.
For the last solution, there would need to be added some way for userland
to hook into the kevent mechanism. It would also be possible to implement
callback facility to NetBSD NFS server code as a NetBSD-only extension.

What do people think? Is this worth the efford? Since NFS
is used very frequently, it would be preferable if kevent notifications
would work for it.
Another option is to only support local system changes for NFS,
and don't check/notify about changes to files by other NFS clients. 


Jaromir Dolecek <>  
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-