diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-03-17 17:48:19 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-03-17 17:48:19 +0100 |
commit | a2be120ea93ae67447315da268fa336650cd5149 (patch) | |
tree | 22600abe7e401e4856f0342ce9ab7749db46c8d3 /sys/src/9/port/devmnt.c | |
parent | 5aaa7240a20f34d319bee496005e2136040b8f5c (diff) |
abandon streaming experiment
for queue like non-seekable files, it is impossible to implement an
exportfs because one has to run the kernels devtab read() and write()
in separate processes, and that makes it impossible to maintain 9p message
order as the scheduler can come in and randomly schedule one process before
another.
so as soon as we have a transition from 9p -> syscalls, we'r screwed.
i currently see just two possibilities:
- introduce special file type like QTSEQ with strictly ordered i/o semantics
- fix all fileservers and exportfs to only do one outstanding i/o to QTSEQ files
which means maintaining a queue per fid
this doesnt propagate. so exporting slow 9p mount again will be limited
again by latency of the inner mount.
other option:
- return offset in Rread, so client can bring responses back into order. this
requires changing all fileservers and drivers to maintain such an per fid offset
and change the protocol to include it in the response, and also pass it to userspace
(new syscalls or pass it in TOS)
this only works for read pipelining, write is still screwed.
both options suck.
--
cinap
Diffstat (limited to 'sys/src/9/port/devmnt.c')
-rw-r--r-- | sys/src/9/port/devmnt.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sys/src/9/port/devmnt.c b/sys/src/9/port/devmnt.c index 52f093a1a..e6bbd02dc 100644 --- a/sys/src/9/port/devmnt.c +++ b/sys/src/9/port/devmnt.c @@ -30,8 +30,6 @@ struct Mntrpc uint rpclen; /* len of buffer */ Block* b; /* reply blocks */ Mntrpc* flushed; /* message this one flushes */ - void *iocomarg; /* Rpc completion callback for pipelining */ - void (*iocomfun)(void*, int); char done; /* Rpc completed */ }; @@ -1017,9 +1015,6 @@ mountio(Mnt *m, Mntrpc *r) lock(m); r->z = &up->sleep; r->m = m; - r->iocomarg = up->iocomarg; - r->iocomfun = up->iocomfun; - up->iocomfun = nil; r->list = m->queue; m->queue = r; unlock(m); @@ -1044,10 +1039,6 @@ mountio(Mnt *m, Mntrpc *r) if(devtab[m->c->type]->write(m->c, r->rpc, n, 0) != n) error(Emountrpc); - /* Rpc commited */ - if(r->iocomfun != nil) - (*r->iocomfun)(r->iocomarg, 0); - /* Gate readers onto the mount point one at a time */ for(;;) { lock(m); @@ -1190,11 +1181,6 @@ mountmux(Mnt *m, Mntrpc *r) /* look for a reply to a message */ if(q->request.tag == r->reply.tag) { *l = q->list; - - /* Rpc completed */ - if(q->iocomfun != nil) - (*q->iocomfun)(q->iocomarg, 1); - if(q == r) { q->done = 1; unlock(m); |