9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Async clunk?
@ 2010-08-07 17:18 Venkatesh Srinivas
  2010-08-07 21:28 ` Charles Forsyth
  0 siblings, 1 reply; 10+ messages in thread
From: Venkatesh Srinivas @ 2010-08-07 17:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

Hi,

At IWP9 4e, we suggested that asynchronous TClunks would do well for 9p
performance on moderate to high latency links; yesterday I came across a
thread from 2006/01 on 9fans discussing asynchronous TClunks for other
reasons ('clunk clunk' is the title; http://9fans.net/archive/2006/01/105).

Did anyone do any further work along this? As far as I can see, cclose()
does a synchronous clunk...

Thanks,
-- vs

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-07 17:18 [9fans] Async clunk? Venkatesh Srinivas
@ 2010-08-07 21:28 ` Charles Forsyth
  2010-08-07 21:33   ` Charles Forsyth
  0 siblings, 1 reply; 10+ messages in thread
From: Charles Forsyth @ 2010-08-07 21:28 UTC (permalink / raw)
  To: 9fans

close must be synchronous, unless you aim for NFS semantics.
plan 9 will hand the work to a service process [only] when a process is interrupted by a note
during a closefgrp (eg, when a file-group is closed when a process exits), to allow
deadlocks to be broken (by a note), or to compensate for dead servers, not to improve latency.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-07 21:28 ` Charles Forsyth
@ 2010-08-07 21:33   ` Charles Forsyth
  2010-08-08  3:56     ` Bruce Ellis
  2010-08-08  6:18     ` Venkatesh Srinivas
  0 siblings, 2 replies; 10+ messages in thread
From: Charles Forsyth @ 2010-08-07 21:33 UTC (permalink / raw)
  To: 9fans

>close must be synchronous, unless you aim for NFS semantics.

to be more explicit: think of exclusive-use services, services that wait for a close to commit,
files with DMEXCL, and files opened ORCLOSE



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-07 21:33   ` Charles Forsyth
@ 2010-08-08  3:56     ` Bruce Ellis
  2010-08-08  7:04       ` Charles Forsyth
  2010-08-08  6:18     ` Venkatesh Srinivas
  1 sibling, 1 reply; 10+ messages in thread
From: Bruce Ellis @ 2010-08-08  3:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I can't completely agree with this. I'd like to presrve Clunk
semantics but it leads to all sorts of deadlocks. That's why "slay"
was introduced, and "closefiles" (or whatever it's called).

Research Inferno has ha async clunks on 'M' for 15 years with no
problems, just no deadlocks.

Think about it a bit.

brucee

On Sun, Aug 8, 2010 at 7:33 AM, Charles Forsyth <forsyth@terzarima.net> wrote:
>>close must be synchronous, unless you aim for NFS semantics.
>
> to be more explicit: think of exclusive-use services, services that wait for a close to commit,
> files with DMEXCL, and files opened ORCLOSE
>
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-07 21:33   ` Charles Forsyth
  2010-08-08  3:56     ` Bruce Ellis
@ 2010-08-08  6:18     ` Venkatesh Srinivas
  2010-08-08  7:10       ` Charles Forsyth
  1 sibling, 1 reply; 10+ messages in thread
From: Venkatesh Srinivas @ 2010-08-08  6:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Sat, Aug 7, 2010 at 5:33 PM, Charles Forsyth <forsyth@terzarima.net>wrote:

> >close must be synchronous, unless you aim for NFS semantics.
>
> to be more explicit: think of exclusive-use services, services that wait
> for a close to commit,
> files with DMEXCL, and files opened ORCLOSE
>

For DMEXCL and ORCLOSE, we'd always issue synchronously.

Perhaps we could turn on async clunk for other files when the chan has
CCACHE set (mount -C iirc). We already believe that the fileserver is
'decent' then...

-- vs

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-08  3:56     ` Bruce Ellis
@ 2010-08-08  7:04       ` Charles Forsyth
  2010-08-08  7:13         ` Bruce Ellis
  0 siblings, 1 reply; 10+ messages in thread
From: Charles Forsyth @ 2010-08-08  7:04 UTC (permalink / raw)
  To: 9fans

>Research Inferno has ha async clunks on 'M' for 15 years with no
>problems, just no deadlocks.
>Think about it a bit.

there is a simple and obvious test program that fails unpredictably under that regime
but works in the other systems, and would be expected to work.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-08  6:18     ` Venkatesh Srinivas
@ 2010-08-08  7:10       ` Charles Forsyth
  2010-08-08 14:17         ` Venkatesh Srinivas
  0 siblings, 1 reply; 10+ messages in thread
From: Charles Forsyth @ 2010-08-08  7:10 UTC (permalink / raw)
  To: 9fans

>Perhaps we could turn on async clunk for other files when the chan has
>CCACHE set (mount -C iirc). We already believe that the fileserver is
>'decent' then...

that's more plausible, since you've declared that you're not interested
in certain details, but then the larger question arises: why pick on clunk?
in Op, the thing that reduces network latency is combining the sequence open, (read|write), close
into a single operation. (for brucee's case, the CCACHE check wouldn't be sufficient:
it needs to be the other ones as well.)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-08  7:04       ` Charles Forsyth
@ 2010-08-08  7:13         ` Bruce Ellis
  0 siblings, 0 replies; 10+ messages in thread
From: Bruce Ellis @ 2010-08-08  7:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

and it is ...

On Sun, Aug 8, 2010 at 5:04 PM, Charles Forsyth <forsyth@terzarima.net> wrote:
>>Research Inferno has ha async clunks on 'M' for 15 years with no
>>problems, just no deadlocks.
>>Think about it a bit.
>
> there is a simple and obvious test program that fails unpredictably under that regime
> but works in the other systems, and would be expected to work.
>
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-08  7:10       ` Charles Forsyth
@ 2010-08-08 14:17         ` Venkatesh Srinivas
  2010-08-08 17:02           ` Bruce Ellis
  0 siblings, 1 reply; 10+ messages in thread
From: Venkatesh Srinivas @ 2010-08-08 14:17 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Sun, Aug 8, 2010 at 3:10 AM, Charles Forsyth <forsyth@terzarima.net>wrote:

> >Perhaps we could turn on async clunk for other files when the chan has
> >CCACHE set (mount -C iirc). We already believe that the fileserver is
> >'decent' then...
>
> that's more plausible, since you've declared that you're not interested
> in certain details, but then the larger question arises: why pick on clunk?
> in Op, the thing that reduces network latency is combining the sequence
> open, (read|write), close
> into a single operation.
>

When we tried out async Clunk in the Journal Callbacks work, it offered some
fairly great improvements; and the details that it varies in are very minor
compared to uncached 9p, particularly for decent fileservers.

Since Clunk cannot fail, this also admits a simple (perhaps) approximation -
issue the clunk as expected, but do not wait for RClunk.

> services that wait for a close to commit,

Hmm. Does this mean that any modification to devmnt, to keep a larger pool
of FDs active for example, rather than clunking eagerly while walking, is
unsafe? That would hold around directory FDs, which would make services like
the above unhappy, or at least behave differently. Perhaps those file
servers are assuming something not specified in the 9p definitions?

Also, cyclic structures in Limbo with file descriptors embedded will not
release the FD immediately after the outer structure is discarded. In a
sense, that is also a delayed Clunk...

-- vs

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9fans] Async clunk?
  2010-08-08 14:17         ` Venkatesh Srinivas
@ 2010-08-08 17:02           ` Bruce Ellis
  0 siblings, 0 replies; 10+ messages in thread
From: Bruce Ellis @ 2010-08-08 17:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

trust me - experiment. ask questions. i'll send code. it can be an
enormous speedup.

brucee

On Mon, Aug 9, 2010 at 12:17 AM, Venkatesh Srinivas <me@acm.jhu.edu> wrote:
> On Sun, Aug 8, 2010 at 3:10 AM, Charles Forsyth <forsyth@terzarima.net>
> wrote:
>>
>> >Perhaps we could turn on async clunk for other files when the chan has
>> >CCACHE set (mount -C iirc). We already believe that the fileserver is
>> >'decent' then...
>>
>> that's more plausible, since you've declared that you're not interested
>> in certain details, but then the larger question arises: why pick on
>> clunk?
>> in Op, the thing that reduces network latency is combining the sequence
>> open, (read|write), close
>> into a single operation.
>
> When we tried out async Clunk in the Journal Callbacks work, it offered some
> fairly great improvements; and the details that it varies in are very minor
> compared to uncached 9p, particularly for decent fileservers.
> Since Clunk cannot fail, this also admits a simple (perhaps) approximation -
> issue the clunk as expected, but do not wait for RClunk.
>> services that wait for a close to commit,
> Hmm. Does this mean that any modification to devmnt, to keep a larger pool
> of FDs active for example, rather than clunking eagerly while walking, is
> unsafe? That would hold around directory FDs, which would make services like
> the above unhappy, or at least behave differently. Perhaps those file
> servers are assuming something not specified in the 9p definitions?
> Also, cyclic structures in Limbo with file descriptors embedded will not
> release the FD immediately after the outer structure is discarded. In a
> sense, that is also a delayed Clunk...
> -- vs
>
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-08-08 17:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-07 17:18 [9fans] Async clunk? Venkatesh Srinivas
2010-08-07 21:28 ` Charles Forsyth
2010-08-07 21:33   ` Charles Forsyth
2010-08-08  3:56     ` Bruce Ellis
2010-08-08  7:04       ` Charles Forsyth
2010-08-08  7:13         ` Bruce Ellis
2010-08-08  6:18     ` Venkatesh Srinivas
2010-08-08  7:10       ` Charles Forsyth
2010-08-08 14:17         ` Venkatesh Srinivas
2010-08-08 17:02           ` Bruce Ellis

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).