9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Roman V. Shaposhnik" <rvs@sun.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Why do we need syspipe() ?
Date: Sun,  4 Jan 2009 20:39:32 -0800	[thread overview]
Message-ID: <1231130372.11463.433.camel@goose.sun.com> (raw)
In-Reply-To: <dd6fe68a0901032256i7a40c196odcc522a35202caea@mail.gmail.com>

On Sat, 2009-01-03 at 22:56 -0800, Russ Cox wrote:
> On Sat, Jan 3, 2009 at 9:04 PM, Roman V. Shaposhnik <rvs@sun.com> wrote:
> > I'm confused. Is there any part of syspipe() that can NOT
> > be done from userspace? Why does it have to be a syscall?
> >
> > P.S. I would also argue that sysdup() would seem to be superfluous
> > if more feature-rich devdup was available.
>
> I don't believe you can write a race-free implementation of
> the pipe system call using #|.

Could you, please, elaborate on what particular race do you have
in mind? Indeed, I ran into a problem with devpipe implementation,
but it isn't a race, its a dreaded implicit ->attach that namec()
does when it evaluates names with the first character being #.

> I also don't believe you can implement the dup system call
> (remember, it has two arguments) using #d.

Agreed. That's why I mentioned that a more feature-rich devdup
is needed. Of course, now I've also discovered that the current
implementation of devpipe is also not sufficient enough for me
to be able to produce a 100% user-space version of pipe(2).

> If you disagree, show me the code.

I can't :-( Sorry for the noise. With the current implementation
my question has a definite answer of why Plan9 kernel needs a syspipe().

If I'm allowed to change the implementation of devpipe, I think
I can show you the code. Would that still count?

Thanks,
Roman.




  reply	other threads:[~2009-01-05  4:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04  5:04 Roman V. Shaposhnik
2009-01-04  6:56 ` Russ Cox
2009-01-05  4:39   ` Roman V. Shaposhnik [this message]
2009-01-05  6:20     ` Russ Cox
2009-01-05  7:28       ` lucio
2009-01-05 11:00         ` roger peppe
2009-01-08 23:36           ` Roman V. Shaposhnik
2009-01-06 17:40       ` Nathaniel W Filardo
2009-01-06 20:37         ` Charles Forsyth
2009-01-06 23:13           ` Roman V. Shaposhnik
2009-01-06 23:15             ` erik quanstrom
2009-01-08 23:45               ` Roman V. Shaposhnik
2009-01-08 23:48                 ` erik quanstrom
2009-01-09  2:05                   ` Roman V. Shaposhnik
2009-01-09 12:54                     ` roger peppe
2009-01-07  3:48             ` lucio
2009-01-07  7:00       ` Roman Shaposhnik
2009-01-07  9:31         ` Charles Forsyth

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=1231130372.11463.433.camel@goose.sun.com \
    --to=rvs@sun.com \
    --cc=9fans@9fans.net \
    /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).