9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] A few questions about 9p
Date: Fri, 4 Nov 2022 16:41:44 -0700	[thread overview]
Message-ID: <CAP6exYJ5j+ZYK8Lz1ftdc2OeBxY4Dh-h3SR9=N0--ShH60K7iQ@mail.gmail.com> (raw)
In-Reply-To: <16672580590.81C97dEDC.85252@composer.9fans.topicbox.com>

[-- Attachment #1: Type: text/plain, Size: 3741 bytes --]

Tflush is harder than it looks, given that it is part of a giant race
condition. Will you get the R for the message you are flushing right after
you send Tflush? What happens at the server? It's fun.

Perhaps one of the biggest uses of 9p, globally, was google's gvisor, which
runs an unimaginably large (to me anyway :-) amount of compute in Google
Cloud. gvisor: https://gvisor.dev/docs/,  Comparison here:
https://www.scitepress.org/Papers/2021/104405/104405.pdf

I suspect more bytes moved through 9p on gvisor in a day than moved on all
other platforms since 2000. All I can say is, it's a lot.

gvisor used to use 9p (my fault :-) and, although we started with Andrey
and Lucho's go9p, at some point it was replaced by Chris Koch's
implementation. It's quite good.

You can see how Chris handled Tflush here:
https://github.com/hugelgupf/p9/blob/main/p9/handlers.go#L104

I'd argue that this may be the most real-world-tested Tflush handler you'll
see. I have seen Tflush handlers that just return, having done nothing, and
it's possible that in many cases, that's good enough. But Chris's code is
VERY heavily tested with real workloads.

I also know, as I saw it many times, that the Plan 9 kernel Tflush could at
times get extremely confused. When we ported it to Akaros, we even saw
cases where Tflush would run out of control and exhaust the XID space,
sending flush after flush as fast as it could create them.

Finally, due to some issues with 9p that could not be fixed, the gvisor
engineers created a new protocol, LISA,
https://github.com/google/gvisor/tree/master/pkg/lisafs, worth reading.

HTH

ron
p.s. FYI, when we first started gvisor, we had it in mind that it could
support Plan 9 binaries, and planned accordingly, but that was never tested.

On Mon, Oct 31, 2022 at 4:15 PM ibrahim via 9fans <9fans@9fans.net> wrote:

> I have read the manuals and also searched for this question here without
> finding an answer (perhaps I missed it) :
>
> 1) question about flush :
>
> Lets say there was a pending message with tag=1234 and the client of my
> server sent a flush message with a tag=1450. During the travel of the flush
> the server sent a response to the message tagged 1234 cause it finished.
>
> The manual states that the client has to forget about the flush message as
> if never sent. Does that mean that message tagged with 1450 which is now
> ignored by the server won't be replied (no error reply and no success reply
> cause if the server would reply with rflush the client would take this as
> if the flush succeeded due to the manual page).
>
> Can a client reuse a tag from an unanswered flush message immediatly (in
> the example tag 1450)
>
> 2) tversion
>
> A client sends tversion while in the middle of a running session.  Is it
> right to abort/ignore/close/flush all possibly pending messages from the
> prior session ?
>
> The next question is regarding msize[4] in tversion. How should a server
> respond when msize suggested from the client is to small like
> msize-IOHDRSIZE< one min_stat_size ?
>
>
> Thanks in advance ;)
>
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T04e11fe14739da68-M9512c6004c50d17a43226b7f>
>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T04e11fe14739da68-M2d06525b5c16d6549e9beed9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 4900 bytes --]

  reply	other threads:[~2022-11-04 23:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31 23:14 ibrahim via 9fans
2022-11-04 23:41 ` ron minnich [this message]
2022-11-05  1:32   ` ibrahim via 9fans
2022-11-05  4:10   ` ibrahim via 9fans
2022-11-05  4:30     ` ori
2022-11-05  6:30       ` ibrahim via 9fans
2022-11-05 14:09         ` ori
2022-11-05 15:50           ` ibrahim via 9fans
     [not found] <CAHL7psHNZrbQuFRz5grmXgR686o2e+-SX=tW6yxnfNaduec5NQ@mail.gmail.com>
     [not found] ` <CAHL7psGPf3z56wjZGJsSVCeEzHBJgtbt17nL-UNA8kXKM-mkuw@mail.gmail.com>
     [not found]   ` <CAHL7psFTR7G1N069XoqYkuxJ_P0TYzmXAZ752wVa=9BAOX0CQg@mail.gmail.com>
     [not found]     ` <CAHL7psEUjdaV9LABzRrHn1TLftF+moxWV563-tvK+7VLviKhRg@mail.gmail.com>
2015-01-29  9:04       ` Giacomo Tesio
2015-01-29 10:07         ` Charles Forsyth
2015-01-29 14:36           ` erik quanstrom
2015-01-29 14:41           ` Giacomo Tesio
2015-01-29 14:52             ` erik quanstrom
2015-01-29 14:54             ` cinap_lenrek
2015-01-29 15:46               ` Giacomo Tesio

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='CAP6exYJ5j+ZYK8Lz1ftdc2OeBxY4Dh-h3SR9=N0--ShH60K7iQ@mail.gmail.com' \
    --to=rminnich@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).