9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] A proposal regarding # in bind
Date: Wed, 26 Feb 2003 09:14:00 -0500	[thread overview]
Message-ID: <70b1be7bf1a870538ecd7c40d8b83810@plan9.bell-labs.com> (raw)
In-Reply-To: <200302261332.NAA02827@dircon.co.uk>

Here's a different proposal, also just an idea rather
than a complete proposal, but perhaps worth pursuing.

Suppose you recentered the kernel around 9P,
building a muxer that wasn't process-based
like devmnt's currently is.  Then you could have
two system calls

	int exportfs(void);
	int exportdev(void);

that return file descriptors.  The file descriptor
returned by exportfs gives you a private 9P
conversation operating on your current name space.
You could post it or do anything else with it, just
like the similar call in inferno.

Exportdev() would return a 9P file descriptor
but for the devices.  You mount it to get the device
tree.  (Perhaps mounting with a spec like "#l0" gets you a
specific device; maybe the spec should be a path
in the device tree like "/ether/0".)

Rfork(RFNODEV) (nee RFNOMNT) would cause exportdev
to fail, preventing access to devices not in the name space.

The underlying kernel interface to drivers would have to change --
they'd all need to process 9P messages, so probably there
would be a wrapper that let them be implemented in the
style they currently are.  But some devices (for example,
the disk devices) might choose to deal in 9P directly so that
they can access the request queue and perhaps behave
more efficiently.  If you're not careful there might be
problems with data getting copied more often than it
needs to.  For example right now I believe that a raw write
to the screen image via /dev/draw copies from the user
space buffer directly into video memory.  It would be
unfortunate if we lost that (though loadimage does its
own user-space copy first anyway).

Russ



  parent reply	other threads:[~2003-02-26 14:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26  6:21 okamoto
2003-02-26 13:32 ` Digby Tarvin
2003-02-26 13:58   ` Russ Cox
2003-02-26 14:14   ` Russ Cox [this message]
2003-02-26 14:33     ` Boyd Roberts
2003-02-26 15:28       ` Ronald G. Minnich
  -- strict thread matches above, loose matches on Subject: below --
2003-02-26 23:46 a
2003-02-26 22:44 a
2003-02-26 23:02 ` Russ Cox
2003-02-26 21:26 John Stalker
2003-02-27  8:29 ` Fco.J.Ballesteros
2003-02-26 14:56 rog
2003-02-26 15:02 ` Russ Cox
2003-02-24 19:25 Joel Salomon
2003-02-25  4:33 ` Martin C.Atkins
2003-02-24 19:04 rog
2003-02-24 19:04 ` rob pike, esq.
2003-02-24 19:53   ` Jack Johnson
2003-02-25  4:37   ` Martin C.Atkins
2003-02-25 11:02     ` chris
2003-02-25 14:01       ` Martin C.Atkins
2003-02-25 14:11         ` Russ Cox
2003-02-25 14:17           ` Martin C.Atkins
2003-02-25 14:34             ` Russ Cox
2003-02-25 14:36               ` Russ Cox
2003-02-25 14:52                 ` Ronald G. Minnich
2003-02-25 19:57                   ` northern snowfall
2003-02-25 16:49                 ` Dan Cross
2003-02-26  5:12                   ` Martin C.Atkins
2003-02-24 19:29 ` Fco.J.Ballesteros
2003-02-24 22:34 ` George Michaelson
2003-02-24 23:32   ` Bruce Ellis
2003-02-25  5:02     ` Martin C.Atkins
2003-02-25 11:19       ` chris
2003-02-25 14:06         ` Martin C.Atkins
2003-02-26  0:04         ` Bruce Ellis
2003-02-26  6:06           ` Skip Tavakkolian
2003-02-25  5:00 ` Martin C.Atkins
2003-02-24 15:19 Martin C.Atkins
2003-02-24 15:28 ` Boyd Roberts
2003-02-24 18:36 ` rob pike, esq.
2003-02-25  4:57   ` Martin C.Atkins

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=70b1be7bf1a870538ecd7c40d8b83810@plan9.bell-labs.com \
    --to=rsc@plan9.bell-labs.com \
    --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).