Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Feb 2000 14:46:31 -0500 (EST)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        freebsd-hackers@freebsd.org, arla-drinkers@stacken.kth.se
Subject:   Writing a multithreaded daemon process
Message-ID:  <Pine.GSO.3.96.1000206142832.1751A-100000@sol.cs.binghamton.edu>

next in thread | raw e-mail | index | archive | help

After reading part of the Arla daemon code available at
http://www.stacken.kth.se/projekt/arla/, I feel it is a real good design. 
The daemon code is a multi-threaded user process that does most of the job
and the kernel is an interface to VFS. They communicate with each other
via a character device.

But I am wondering if the performance is good since you sometimes have to
cross user-system boundary up to four times for a single read operations:

 read() --> Arla daemon --> network  --> install data into kernel

If the daemon can somehow reside entirely inside the kernel, like NFS
daemon, we can save those crossings.  But the daemon is a multi-threaded
process and we have no kernel thread yet, so I do not know how to do
better if possible.  Maybe all user filesystems have to live with this
limitation.

Any help is appreciated.

-Zhihui




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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.1000206142832.1751A-100000>