9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: 9P, procedure calls, kernel, confusion. :(
Date: Tue,  5 Feb 2008 09:22:57 -0500	[thread overview]
Message-ID: <62c995f482c487bfe8af18a0af1d3ba9@quanstro.net> (raw)
In-Reply-To: <0B8E2530-036F-406C-88D7-02624436ABD1@kix.in>

one thing of note, linux vfs implements a dcache.  this connects the
virtual memory system to the filesystem.  (but oddly in linux network
buffers are handled seperately.) there is no client-side caching in
the plan 9 kernel.

there is a notable exception.  there is an executable cache.

>> One more point, I googled a lot on "kernel resident file systems and
>> non kernel resident file systems", but I could not find a single
>> useful link. It would be great if you could specify the difference
>> between the two. I wish that eases up the situation a bit.

since the devtab[] functions map 1:1 with 9p, all the mount driver
needs to do for calls outside the kernel is to marshal/demarshal
9p messages.

it's important to remember that most in-kernel file servers could easily
exist outside the kernel.  the entire ip stack can be implemented from
user space.  (and it has been in the past.)

> "Kernel resident filesystem" in this context simply means a filesystem
> which was created for use by the kernel; this may or may not be
> visible to user-space applications - I'm not too sure.

every element of mounttab[] has an associated device letter.  to
mount the device, one does (typically)
	bind -a '#'^$letter /dev

for example, to bind a second ip stack on /net.alt,
	bind -a '#I1' /net.alt

> To sum up, you
> use the 9 primitive operations provided by each 'Dev' when you work
> with kernel-resident filesystems, while all other filesystems are
> dealt with using regular 9P.

all devices are accessed through devtab.  it may be that that entry
is the mount driver.  the mount driver turns devtab[]->fn into
the corresponding 9p message.  (and vice versa.)

- erik


  reply	other threads:[~2008-02-05 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 13:43 Anant Narayanan
2008-02-05 14:22 ` erik quanstrom [this message]
2008-02-05 15:18   ` roger peppe
  -- strict thread matches above, loose matches on Subject: below --
2008-02-05  9:56 [9fans] " Siddhant
2008-02-05 12:59 ` [9fans] " Siddhant
2008-02-05 16:41   ` Charles Forsyth
2008-02-05 16:35     ` erik quanstrom
2008-02-06  9:45     ` Siddhant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62c995f482c487bfe8af18a0af1d3ba9@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).