Subject: Re: X server as a Unix system process
To: Todd Vierling <tv@pobox.com>
From: Jim Reid <jim@mpn.cp.philips.com>
List: tech-kern
Date: 07/14/1997 18:51:19
>>>>> "Todd" == Todd Vierling <tv@pobox.com> writes:

    > On 14 Jul 1997, RKAMBO.IN.ORACLE.COM wrote: 
    > What could be the possible advantages and disadvantages of
    > making the X server a Unix system process just as NFS is made
    > part of the Unix kernel?  Would there be considerable/visible
    > speedups  in the servicing of client requests?

    Todd> Speedups?  Probably not; in fact, you'd probably see
    Todd> _slowdowns_.  The kernel is made to be reasonably fast and
    Todd> compact to reduce the amount of time spent in kernel tasks
    Todd> (which have varying degress of "exclusive processor use").

This is a bit too simplistic: putting the X server in the kernel could
give some speedups - like not having to switch back and forth between
user and kernel mode. This might also mean saving the overheads of
flushing MMU contexts and page tables. OTOH, it would take a lot of
work to profile and rework the kernel code to provide those faster
access paths. With high-volume, bursty and fast traffic like NFS,
those faster access paths and kernel-level NFS "daemons" did make a
difference years ago. It's probably less relevant on today's hardware.

In general, it's not always clear whether throwing something into the
kernel or not is a good idea. [IMHO, the kernel's too bloated already.]
You might get a performance improvement, but the work involved -
especially tuning and profiling - may not justify the benefits. After
all, who cares if X-in-the-kernel can do an X operation in 100us (say)
if X-in-userland can do the same operation in 120us and your system
only gets a few thousand X requests per hour/minute/whatever? And is
it really worth spending a few months to find out that fact?