9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul+plan9@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] A simple experiment
Date: Sun,  2 May 2010 14:26:46 -0700	[thread overview]
Message-ID: <20100502212647.A54BF5B18@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Fri, 30 Apr 2010 12:13:59 EDT." <b2749e87f822d60e2eaad9bcaed549f6@coraid.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2510 bytes --]

On Fri, 30 Apr 2010 12:13:59 EDT erik quanstrom <quanstro@labs.coraid.com>  wrote:
> > > i don't see any reason why 9p couldn't use some of the same
> > > congestion control ideas.  the trick would be to feed back packet loss
> > > detection and retransmission info to the point where file io gets
> > > turned into rpcs→the mount driver
> >
> > Agreed -- sort of what I meant by "I hope 9p evolves".
> > Though I'd probably stick this in a layer below 9p.
>
> i suggested putting it above 9p.  i don't understand your
> suggestion.  how would a layer below know that there is
> more data?

I was just musing aloud -- just some vague ideas.  9p already
allows 2^16 outstanding messages so in theory one can turn a
read() or write() into a sequence of 9p messsages and only
wait for acks at the end (but process any acks as they
arrive).  Perhaps ack receipt time can be used to measure
latency & bandwidth to transparently control how many 9p
messages can be blasted. The other vague thought was that one
can do this:

	char buf[SOME_LARGE_CONSTANT];
	int count = read(src, buf, sizeof buf);
	if (count > 0) write(dst, buf, count);

But read will wait until buf is filled up or file ends &
write will wait until the entire buf is sent or there is an
error. Now may be this is good enough in that a reading thread
can read in big gulps and pass on filled buffers to a writing
thread. And the writing thread writes out and sends empty
buffers back to the reader.  But one can also think of a
lower level facility that in effect "offload" actual transfer
to a coprocessor.  This allows read()/write() to return much
quicker (but obviously some errors will be delayed). One can
implement something like this using mmap(). Now I am well
aware of issues with mmap (we don't have to go through that
discussion again) but it can be an option for improving
throughput.

Neither of these ideas requires changes to 9p per se.  To
take this any further, I would want to prototype something.
I have coded some bits in Scheme but no time really to do
much.

In turn some examples to explain your suggestion would be
helpful.

> > It can
> > backpressure a 9p client if it tries to send too much (either
> > by blocking or returning with equiv of EWOULDBLOCK).
>
> isn't that what you just complained about—fcp having to
> do the kernel's work?

Blocking would backpressure in that fcp wouldn't be able to
send more data! fcp doesn't have to do anything more.



  reply	other threads:[~2010-05-02 21:26 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 17:38 ron minnich
2010-04-27 17:49 ` erik quanstrom
2010-04-27 18:05   ` Francisco J Ballesteros
2010-04-27 22:20   ` ron minnich
2010-04-27 22:22     ` erik quanstrom
2010-04-27 17:54 ` jake
2010-04-27 17:57   ` John Floren
2010-04-27 17:59     ` erik quanstrom
2010-04-27 18:35       ` John Floren
2010-04-27 18:56         ` Jorden M
2010-04-27 19:03         ` Skip Tavakkolian
2010-04-27 22:23           ` ron minnich
2010-04-28 11:51             ` Steve Simon
2010-04-28 13:18               ` Ethan Grammatikidis
2010-04-28 13:26                 ` erik quanstrom
2010-04-28 13:50                   ` Ethan Grammatikidis
2010-04-28 14:03                     ` erik quanstrom
2010-04-28 15:15                       ` Charles Forsyth
2010-04-28 13:20               ` erik quanstrom
2010-04-28 17:52               ` Tim Newsham
2010-04-28 17:57                 ` Tim Newsham
2010-04-28 18:00                 ` erik quanstrom
2010-04-28 18:42                   ` ron minnich
2010-04-28 19:06                     ` erik quanstrom
2010-04-28 19:40                       ` Russ Cox
2010-04-28 20:36                     ` Francisco J Ballesteros
2010-04-28 20:51                       ` ron minnich
2010-04-29 13:19                         ` Eric Van Hensbergen
2010-04-28 21:05                       ` EBo
2010-04-28 21:14                         ` ron minnich
2010-04-28 22:06                           ` EBo
2010-04-28 21:15                         ` Gorka Guardiola
2010-04-28 23:18                           ` [9fans] references/citations [was: A simple experiment] EBo
2010-04-28 21:18                       ` [9fans] A simple experiment Skip Tavakkolian
2010-04-28 23:04                         ` Francisco J Ballesteros
2010-04-29 12:40                     ` roger peppe
2010-04-29 12:54                       ` David Leimbach
2010-04-29 14:35                         ` erik quanstrom
2010-04-29 15:06                           ` David Leimbach
2010-04-29 15:24                             ` ron minnich
2010-04-29 15:34                             ` erik quanstrom
2010-04-29 16:06                               ` David Leimbach
2010-04-29 16:09                                 ` erik quanstrom
2010-04-29 17:08                               ` Bakul Shah
2010-04-29 17:20                                 ` ron minnich
2010-04-29 17:32                                   ` erik quanstrom
2010-04-30  2:30                                   ` Anthony Sorace
2010-04-30  4:27                                     ` erik quanstrom
2010-04-30 10:51                                     ` hiro
2010-04-30 14:46                                       ` Anthony Sorace
2010-04-29 17:23                                 ` erik quanstrom
2010-04-30  3:47                                   ` Bakul Shah
2010-04-30  5:01                                     ` erik quanstrom
2010-04-30 15:59                                       ` Bakul Shah
2010-04-30 16:13                                         ` erik quanstrom
2010-05-02 21:26                                           ` Bakul Shah [this message]
2010-04-29 18:52                               ` Lyndon Nerenberg
2010-04-29 19:03                                 ` erik quanstrom
2010-04-29 19:54                                   ` Skip Tavakkolian
2010-04-29 19:58                                     ` erik quanstrom
2010-04-29 20:25                                       ` erik quanstrom
2010-05-03 11:34                                   ` Akshat Kumar
2010-04-29 19:47                                 ` Skip Tavakkolian
2010-04-29 17:48                         ` Tim Newsham
2010-04-29 17:59                           ` David Leimbach
2010-04-29 18:41                             ` Skip Tavakkolian
2010-04-29 18:42                               ` David Leimbach
2010-04-29 19:48                                 ` Skip Tavakkolian
2010-04-29 19:44                         ` C H Forsyth
2010-04-29 19:58                           ` Skip Tavakkolian
2010-04-29 20:41                           ` David Leimbach
2010-04-29 14:22                       ` erik quanstrom
2010-04-29 14:36                         ` David Leimbach
2010-04-29 14:43                           ` erik quanstrom
2010-04-29 15:03                             ` David Leimbach
2010-04-29 15:16                               ` ron minnich
2010-04-29 15:25                                 ` Eric Van Hensbergen
2010-04-29 18:24                                   ` EBo
2010-04-29 15:06                             ` Gabriel Díaz
2010-04-29 20:32                               ` Christopher Nielsen
2010-04-29 20:40                                 ` erik quanstrom
2010-04-29 22:39                                   ` Christopher Nielsen
2010-04-29 20:45                                 ` hiro
2010-04-29 23:42                                 ` Derek Fawcus
2010-04-29 23:57                                   ` erik quanstrom
2010-04-30  9:44                                   ` Charles Forsyth
2010-04-29 15:18                       ` ron minnich
2010-04-27 22:21       ` ron minnich
2010-04-27 21:36 ` Federico G. Benavento
2010-04-27 21:54   ` EBo

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=20100502212647.A54BF5B18@mail.bitblocks.com \
    --to=bakul+plan9@bitblocks.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).