Keywords: nfs

Next: Interoperability Up: Overview Previous: The User-Space NFS Server

## The Kernel-Space NFS Server

Mainly due to the performance and interoperation considerations, the kernel-space NFS server is preferred over the user-space one. It has many advantages:

- Since it is running in the kernel space and doing RPC calls inside kernel, it doesn't have to move memory between kernel and user spaces. Its memory operation is much more efficient. There is no overhead for context switch.

- Since it is a kernel process, it can take advantage of the kernel thread.

- Both NLM and NSM protocols are supported. File and record locks can work across NFS. It is very important when you have a heterogeneous NFS environment.

- The file export control is implemented as a system call. When /etc/exports is changed, there is no need to restart the NFS server if there are no changes to mountd.

However, there are some disadvantages for the kernel-space NFS server:

- Unlink the user-space NFS sever, each entry in /etc/exports can export only a directory in one file system. Any file systems mounted under the exported directory are not exported. A separate entry is needed for each mounted file system.

- Since it is not easy to do callback from the kernel, uid/gid mapping and other functionalities which require access to DNS, NIS, NIS+ and other user-space services are not supported.

Next: Interoperability Up: Overview Previous: The User-Space NFS Server