9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] cfs
@ 2021-01-19 22:50 Steve Simon
  2021-01-20 16:52 ` [9fans] cfs Anthony Martin
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Simon @ 2021-01-19 22:50 UTC (permalink / raw)
  To: 9fans

Hi all,

I am playing with cfs(4). It works nicely dialing to my fileserver but
fails if I try to use the existing /srv/boot channel.

failed with /srv/boot:

        sceolan% 5.out -d -n -F /srv/boot  -f $cfs -S /n/cache
        <-client: Tversion tag 65535 msize 8216 version '9P2000'
        ->server: Tversion tag 65535 msize 8216 version '9P2000'
        5.out: write failed, inappropriate use of fd

works using dial:

        sceolan% 5.out -d -F /srv/boot  -f $cfs -S /n/cache
        <-client: Tversion tag 65535 msize 8216 version '9P2000'
        ->server: Tversion tag 65535 msize 8216 version '9P2000'
        <-server: Rversion tag 65535 msize 8216 version '9P2000'
        ->client: Rversion tag 65535 msize 8216 version '9P2000'
        <-client: Tauth tag 13 afid 402 uname steve aname 
        ->server: Tauth tag 13 afid 402 uname steve aname 
        <-server: Rauth tag 13 qid (0000000000000192 0 A)
        ->client: Rauth tag 13 qid (0000000000000192 0 A)
        <-client: Tread tag 13 fid 402 offset 0 count 2048

Note: using -n or not makes no differnce to the failed version,
though I would expect to need -n with /srv/boot.

The error occurs on the first write to /srv/boot.

I can mount /srv/boot with mount(1) without problems.

What have I missed?

-Steve

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1ff0c2bf191f9858-M8e031b5e1276934aa63964f2
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* [9fans] Re: cfs
  2021-01-19 22:50 [9fans] cfs Steve Simon
@ 2021-01-20 16:52 ` Anthony Martin
  2021-01-20 17:25   ` Richard Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Martin @ 2021-01-20 16:52 UTC (permalink / raw)
  To: 9fans

Steve Simon <steve@quintile.net> once said:
> The error occurs on the first write to /srv/boot.
>
> I can mount /srv/boot with mount(1) without problems.
>
> What have I missed?

The kernel doesn't allow you to explicitly read from
or write to a channel that the mount driver is using.

Cheers,
  Anthony

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1ff0c2bf191f9858-M7fb63cb25344ad05f23cbacd
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] Re: cfs
  2021-01-20 16:52 ` [9fans] cfs Anthony Martin
@ 2021-01-20 17:25   ` Richard Miller
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Miller @ 2021-01-20 17:25 UTC (permalink / raw)
  To: 9fans

> The kernel doesn't allow you to explicitly read from
> or write to a channel that the mount driver is using.

Correct, and one way around the obstacle is to include cfs
in the bootdir section of the kernel config file, and
optionally cfs=<partition> in plan9.ini or config.txt,
so the boot process will start cfs on /srv/boot before
mounting it.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1ff0c2bf191f9858-M2856334789d28d4c36150f5e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* [9fans] cfs
@ 2009-05-13 13:01 Steve Simon
  0 siblings, 0 replies; 6+ messages in thread
From: Steve Simon @ 2009-05-13 13:01 UTC (permalink / raw)
  To: 9fans

I think I have been silly,
I confused the block cache for cfs.

Sorry for the noise.

-Steve



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

* Re: [9fans] cfs
  2009-05-13 11:20 Steve Simon
@ 2009-05-13 12:34 ` erik quanstrom
  0 siblings, 0 replies; 6+ messages in thread
From: erik quanstrom @ 2009-05-13 12:34 UTC (permalink / raw)
  To: 9fans

> Why is cfs in the kernel and not a userlevel program?

i don't know.  but by putting cfs in the kernel, you can use the kernel's
built-in concurrency.  cfs predates the thread library.

> I guess there might be performance issues also, though these would
> be swamped by the performance improvment of plugging in CFS in the
> first place (IMHO).

why guess?  we can get a good approximation.  the difference
is a round trip to user space which has bandwidth and latency
costs.  i used dd and ramfs to simulate.

		userspace			kernel
		b/w		latency		b/w		latency
i7 2666		460 MB/s	1680µs		3900 MB/s	118µs
Xeon5000 1859	156 MB/s	1205		868		265
AMD64 2604 be	142 MB/s	2511µs		2600		332
AMD64 2004	135 MB/s	2510		2600		324

if you're limited by 1gbe, the bandwidth would be good
but the latency is spoiled.  if you're limited by 10gbe,
the vodka's weak, too.

- erik



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

* [9fans] cfs
@ 2009-05-13 11:20 Steve Simon
  2009-05-13 12:34 ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Simon @ 2009-05-13 11:20 UTC (permalink / raw)
  To: 9fans

Why is cfs in the kernel and not a userlevel program?

Is it historic, perhaps this was done before /boot appeared so it was not
easy to add a userlevel program into the boot process.

I guess there might be performance issues also, though these would
be swamped by the performance improvment of plugging in CFS in the
first place (IMHO).

Just curious

-Steve



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

end of thread, other threads:[~2021-01-20 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 22:50 [9fans] cfs Steve Simon
2021-01-20 16:52 ` [9fans] cfs Anthony Martin
2021-01-20 17:25   ` Richard Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-05-13 13:01 [9fans] cfs Steve Simon
2009-05-13 11:20 Steve Simon
2009-05-13 12:34 ` erik quanstrom

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