9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: roger peppe <rogpeppe@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Plan9 - the next 20 years
Date: Tue, 21 Apr 2009 17:03:07 +0100	[thread overview]
Message-ID: <df49a7370904210903scf50ea3w88eda18272e9d6be@mail.gmail.com> (raw)
In-Reply-To: <b90f4d271944623f8a10cd1120ec7536@quanstro.net>

2009/4/21 erik quanstrom <quanstro@quanstro.net>:
> isn't the tag space per fid?

no, otherwise every reply message (and Tflush) would include a fid too;
moreover Tversion doesn't use a fid (although it probably doesn't
actually need a tag)

> a variation on the tagged queuing flush
> cache would be to force the client to make sure that reordered
> flush tags aren't a problem.  it would not be very hard to ensure that
> tag "overlap" does not happen.

the problem is not in tag overlap, but in the fact that
the server may or may not already have serviced the
request when it receives a Tflush.
the client can't know this - the only way
it knows if the transaction actually took place is if the
reply to the request arrives before the reply to the flush.

this "race" is, i think, an inherent part of allowing
requests to be aborted. the flush protocol is probably the most
complex and the most delicate part of 9p, but it's also one
of the most useful, because reinventing it correctly is
hard and it solves a oft-found problem - how do i tear
down a request that i've already started?

plan 9 and inferno rely quite heavily on having flush,
and it's sometimes notable when servers don't implement it.
for instance, inferno's file2chan provides no facility
for flush notification, and wm/sh uses file2chan; thus if you
kill a process that's reading from wm/sh's /dev/cons,
the read goes ahead anyway, and a line of input is lost
(you might have seen this if you ever used os(1)).

that's aside from the issue of resource-leakage that
nemo points out.

the idea with my proposal is to have an extension that
changes as few of the semantics of 9p as possible:

C->S Tsequence tag=1 sid=1
C->S Topen tag=2 sid=1 fid=20 mode=0
C->S Tread tag=3 sid=1 fid=20 count=8192
C->S Tclunk tag=4 sid=1
S->C Rsequence tag=1
S->C Ropen tag=2 qid=...
S->C Rread tag=3 data=...
S->C Rclunk tag=4

would be exactly equivalent to:

C->S Topen tag=2 fid=20 mode=0
S->C Ropen tag=2 qid=...
C->S Tread tag=3 fid=20 count=8192
S->C Rread tag=3 data=...
C->S Tclunk tag=4
S->C Rclunk tag=4

and the client-side interface could be designed so
that the client code is the same regardless of whether
the server implements Tsequence or not (for instance,
in-kernel drivers need not implement it).

thus most of the code base could remain unchanged,
but everywhere gets the benefit of latency reduction from a few core
code changes (e.g. namec).



  reply	other threads:[~2009-04-21 16:03 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 22:08 Francisco J Ballesteros
2009-04-17 22:15 ` ron minnich
2009-04-17 22:35   ` J.R. Mauro
2009-04-17 23:01     ` ron minnich
2009-04-18  2:06       ` J.R. Mauro
2009-04-18  2:39         ` ron minnich
2009-04-18  2:43           ` J.R. Mauro
2009-04-18  5:55           ` lucio
2009-04-18  3:37         ` erik quanstrom
2009-04-18  4:04           ` J.R. Mauro
2009-04-18  4:16             ` erik quanstrom
2009-04-18  5:57               ` J.R. Mauro
2009-04-18 13:50                 ` erik quanstrom
2009-04-18 14:53                   ` lucio
2009-04-18 15:07                   ` ron minnich
2009-04-18 15:11                     ` erik quanstrom
2009-04-18 16:13                       ` J.R. Mauro
2009-04-18 16:10                   ` J.R. Mauro
2009-04-18 16:20                     ` ron minnich
2009-04-18 16:26                       ` erik quanstrom
2009-04-18 16:36                       ` J.R. Mauro
2009-04-18 16:53                         ` tlaronde
2009-04-18 17:12                           ` andrey mirtchovski
2009-04-18 17:37                             ` ron minnich
2009-04-18 23:31                               ` Charles Forsyth
2009-04-18 23:26                                 ` J.R. Mauro
2009-04-18 17:35                           ` J.R. Mauro
2009-04-18  5:58           ` lucio
2009-04-18 11:59   ` tlaronde
2009-04-18 14:31     ` tlaronde
2009-04-18 15:05     ` ron minnich
2009-04-18 15:33       ` tlaronde
2009-04-23 16:56       ` tlaronde
2009-04-24 15:33         ` ron minnich
2009-04-24 16:43           ` tlaronde
2009-04-18 15:16   ` Latchesar Ionkov
2009-04-19 19:34     ` Enrico Weigelt
2009-04-19 19:52       ` ron minnich
2009-04-19  7:12 ` Skip Tavakkolian
2009-04-19 15:26   ` David Leimbach
2009-04-20  2:14     ` Skip Tavakkolian
2009-04-20 14:58       ` Uriel
2009-04-20 17:18         ` maht
2009-04-20 18:15           ` J.R. Mauro
2009-04-20 18:30             ` maht
2009-04-20 19:02           ` Charles Forsyth
2009-04-20 18:03         ` Skip Tavakkolian
2009-04-20 18:07           ` erik quanstrom
2009-04-23  5:07             ` sqweek
2009-04-23  5:36               ` Nathaniel W Filardo
2009-04-23 11:51                 ` erik quanstrom
2009-04-20 18:18           ` David Leimbach
2009-04-20 18:35             ` erik quanstrom
2009-04-20 18:55               ` David Leimbach
2009-04-20 19:03                 ` erik quanstrom
2009-04-20 20:17                   ` David Leimbach
2009-04-20 20:33                     ` erik quanstrom
2009-04-20 21:18                       ` David Leimbach
2009-04-20 21:28                         ` andrey mirtchovski
2009-04-21  8:19                           ` roger peppe
2009-04-21 12:00                             ` roger peppe
2009-04-21 16:52                             ` David Leimbach
2009-04-21 17:06                               ` roger peppe
2009-04-21 17:11                                 ` David Leimbach
2009-04-21  7:38                       ` Bakul Shah
2009-04-20 19:13                 ` Steve Simon
2009-04-20 19:22                   ` erik quanstrom
2009-04-20 18:39           ` Francisco J Ballesteros
2009-04-21  9:52             ` maht
2009-04-21 10:23               ` roger peppe
2009-04-21 12:04                 ` erik quanstrom
2009-04-21 14:03                   ` roger peppe
2009-04-21 14:09                     ` erik quanstrom
2009-04-21 14:33                       ` Fco. J. Ballesteros
2009-04-21 14:50                         ` erik quanstrom
2009-04-21 16:03                           ` roger peppe [this message]
2009-04-21 16:09                             ` erik quanstrom
2009-04-21 17:12                               ` roger peppe
2009-04-21 17:43                                 ` erik quanstrom
2009-04-21 18:14                                   ` roger peppe
2009-04-21 16:38                             ` Bakul Shah
2009-04-21 16:59                               ` roger peppe
2009-04-21 16:10                           ` Bakul Shah
2009-04-21 16:25                             ` erik quanstrom
2009-04-21 17:03                               ` David Leimbach
2009-04-21 17:23                               ` roger peppe
2009-04-21 16:53               ` David Leimbach
  -- strict thread matches above, loose matches on Subject: below --
2009-04-17 16:32 [9fans] VMs, etc. (was: Re: security questions) blstuart
2009-04-17 19:16 ` [9fans] Plan9 - the next 20 years Steve Simon
2009-04-17 19:39   ` J.R. Mauro
2009-04-17 19:43   ` tlaronde
2009-04-17 19:56     ` J.R. Mauro
2009-04-17 20:14     ` Eric Van Hensbergen
2009-04-17 20:18       ` Benjamin Huntsman
2009-04-18  4:26         ` erik quanstrom
2009-04-17 20:29       ` J.R. Mauro
2009-04-18  3:56         ` erik quanstrom
2009-04-18  4:12           ` J.R. Mauro
2009-04-18  4:16             ` erik quanstrom
2009-04-18  5:51               ` J.R. Mauro
2009-04-18 12:52       ` Steve Simon
2009-04-17 20:20   ` John Barham

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=df49a7370904210903scf50ea3w88eda18272e9d6be@mail.gmail.com \
    --to=rogpeppe@gmail.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).