9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] 9p flush
Date: Thu,  9 Mar 2006 13:40:09 -0500	[thread overview]
Message-ID: <4d050f00d402e42d692b65ecad0677d4@plan9.bell-labs.com> (raw)
In-Reply-To: <13edff48884a0e3146cf2454fa9c9336@vitanuova.com>

When implementing 9P2000 in the old fileserver and fossil, there
were many places the protocol was not specific enough about what
to do. Most were cleared up. I dealt with this exact issue in fosssil
and it was decided the correct operation should be to reply to the
original operation if it has completed and then reply to the flush.
See /sys/src/cmd/fossil/9proc.c:^msgFlush for the lowdown.

--jim


On Thu Mar  9 13:30:43 EST 2006, rog@vitanuova.com wrote:
> i've been implementing some generic mechanisms for serving 9p.
>
> from flush(5):
>
>           The server must answer the flush message immediately.
>
> which i interpret to mean "no other messages should be processed in
> the meantime".
>
> how important is this?
>
> the problem is that in a multithreaded environment, the thread
> performing a request must be notified that it has been flushed, and
> given a chance to try and abort its current action.
>
> it it happens that the action has already completed, then it should
> be allowed to reply before the flush reply, thus letting the client
> know correctly about the state change.  the problem is that this means
> that there can be an arbitrary delay before the flush is replied to
> (although i'm still ensuring that flush messages are answered in
> order),
>
> does doing things this way break any aspect of the protocol?  if it
> does not, then might i suggest that that line of the manual page be
> changed to:
>
> 	The server must answer the flush message as soon as possible.


  reply	other threads:[~2006-03-09 18:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-09  6:54 [9fans] web site being down & reliability Russ Cox
2006-03-09 18:30 ` [9fans] 9p flush rog
2006-03-09 18:40   ` jmk [this message]
2006-03-09 18:55   ` Russ Cox
2006-03-09 19:03     ` rog
2006-03-09 18:59       ` Ronald G Minnich
2006-03-09 21:37 ` [9fans] web site being down & reliability Russ Cox

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=4d050f00d402e42d692b65ecad0677d4@plan9.bell-labs.com \
    --to=jmk@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).