*BSD News Article 90366


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!nntp.portal.ca!news.bc.net!rover.ucs.ualberta.ca!gpu4.srv.ualberta.ca!not-for-mail
From: jgg@gpu4.srv.ualberta.ca (E Runeland)
Newsgroups: comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.setup,comp.unix.bsd.bsdi.misc,comp.unix.bsd.misc
Subject: Re: User-space file systems.  (Re: Linux vs BSD)
Followup-To: comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.setup,comp.unix.bsd.bsdi.misc,comp.unix.bsd.misc
Date: 5 Mar 1997 08:10:44 GMT
Organization: University of Alberta
Lines: 30
Message-ID: <5fj9q4$s0i@pulp.ucs.ualberta.ca>
References: <5e6qd5$ivq@cynic.portal.ca> <stephenkE62DGo.6J5@netcom.com> <5etj32$3kh@cynic.portal.ca> <5evsnm$1200@usenet1y.prodigy.net> <5f283t$667@cynic.portal.ca>
NNTP-Posting-Host: gpu4.srv.ualberta.ca
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
Xref: euryale.cc.adfa.oz.au comp.os.linux.misc:162774 comp.os.linux.networking:70865 comp.os.linux.setup:100963 comp.unix.bsd.bsdi.misc:6202 comp.unix.bsd.misc:2712

Curt Sampson (cjs@cynic.portal.ca) wrote:
: In article <5evsnm$1200@usenet1y.prodigy.net>,
: bill davidsen <davidsen@tmr.com> wrote:
: 
: A protection switch occurs every time data crosses the kernel-userland
: boundary. In this case, that means approximately four protection
: switches for every NFS packet. It doesn't matter how much CPU you're
: using; the protection switches are slow and expensive. In fact,
: the less CPU you use the worse the problem looks, since that
: protection switch becomes a much greater proportion of the cost of
: running the daemon, and moving it into the kernel will save all
: that much more.

I think this discussion is quite interesting, but one point that no-one
has brought up is quite simply, why does linux have such a slow protection
switch time? Instead of saying that NFS in userland is too slow because it
needs to do 4 switches per packet and each switch is horribly slow,
therefore it should be moved into kernel-space, why not say, linux's
protection switch code could be optimized so that NFS is faster?

Or perhaps even, how can we optimize the kernel calls so that only 1 per
packet is required? Just moving the whole daemon into the kernel is a
solution to speed problems, but by that same token other deamons that are
'performace critical' (http, ftp etc) should be moved into the kernel and
you end up with a monolithic bloatware kernel :<

If you ask me, moving stuff into the kernel is really only a band-aid
patch for the real problem of high user-user and user-kernel switch times.

Jason