From: ori@eigenstate.org
To: plan9fullfrontal@qs.co.nz, 9front@9front.org
Subject: Re: [9front] How is smp handled in file services?
Date: Tue, 10 Mar 2020 18:03:43 -0700 [thread overview]
Message-ID: <9FAB3D9B768738E59305FAA3FBD02A19@eigenstate.org> (raw)
In-Reply-To: <f8d5c0d5-55a1-532d-b495-72c649b25d37@qs.co.nz>
> Just trying ti understand the data flow through the kernel (as compared
> to *nix).
>
> Given the following easy to understand example:
>
> Assume that three processes are writing to /dev/audio through the mixfs
> file server. Given that all processes are on the same terminal server,
> and that there are ample idle cpu cores (ignore locking and other side
> effects), what is the data flow path in mixfs:
>
> 1. All three procs sleep while some proc processes the write
> requests sequentially, returning the results sequentially.
>
> 2. All three procs enter the file service and process one request
> concurrently and return result directly to own process.
>
> I am assuming that unless designed specifically in the file server, that
> the answer is 1.
If you're in userspace, the file server is just reading from
an FD. it's up to you if you want to add concurrency around
those reads.
If you're in the kernel, it's concurrent. a process enters
the kernel from sysfile.c:/^sysread, which pretty much just
calls sysfile.c:/^read.
There aren't any locks held up to:
nnn = nn = devtab[c->type]->read(c, p, n, off);
Smokey the bear says: Only you can prevent corrupted data
structures.
next prev parent reply other threads:[~2020-03-11 1:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 23:49 Trevor Higgins
2020-03-11 1:03 ` ori [this message]
2020-03-11 2:22 ` [9front] " Trevor Higgins
2020-03-11 2:28 ` ori
2020-03-13 16:25 ` hiro
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=9FAB3D9B768738E59305FAA3FBD02A19@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
--cc=plan9fullfrontal@qs.co.nz \
/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).