cinap_lenrek | 27 Jul 01:24 2015
Picon

iounit and msize

why is devmnt using msize-IOHDRSZ to split up reads and writes instead
of the iounit of the channel?

mntrdwr():
	...
		nr = n;
		if(nr > m->msize-IOHDRSZ)
			nr = m->msize-IOHDRSZ;
		r->request.count = nr;

--
cinap

Ryan Gonzalez | 25 Jul 02:43 2015
Picon

Harvey OS: A new OS inspired heavily by Plan 9

https://medium.com/this-is-not-a-monad-tutorial/harvey-an-operating-system-with-plan-9-s-shadow-3081414e5f0b

I'm not affiliated with this whatsoever; I just saw it on Reddit and found it interesting.

I found this part particularly neat:

> We are working in ANSI POSIX environment to have most of well known tools and programs that programmers or end users expects to have in a modern operating system. Things that for traditional Plan 9 would be very difficult to have.

--
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.
Skip Tavakkolian | 24 Jul 23:52 2015

arm64 port?

i just ordered one of these and am wondering if anyone is working on a Plan 9 port:

https://developer.qualcomm.com/hardware/dragonboard-410c

Prof Brucee | 24 Jul 23:31 2015
Picon

Stick

Anyone with P9 experience on the Intel Compute Stick (aka STK1A32WFC)? It's a lot of PC for such a small cost and form factor. I think it was only released in oz last week. I have ordered one.

brucee
Prof Brucee | 24 Jul 05:54 2015
Picon

Has Linux jumped the shark?

I realize that it is pretty much required form in this forum to avoid criticizing Linux. (What is the point? Get on with you own hobbies. etc.). I would like to ask a very open question: has Linux with the release of 4.0 finally jumped the shark. My experience has been sticking to wearing an old shoe (aging Ubuntu box in the corner, rarely used and gathering dust). But now I see what *marvels* have been released on the general populace and recognize the double episodes and celebrity appearances. So I raise the question.

Thanks for your time,

brucee
Steve Simon | 22 Jul 18:02 2015
Picon

USB serial + raspberry PI

Hi,

Todays problem is getting a USB serial device to work with plan9 on a raspberry PI.

I have several dongles which seem to reprisent two chipsets.

One is recognised by the USB driver and it starts usb/serial for me,
sadly It just seems to receive a single character constantly.

The other is not recognised, but I start usb/serial manually and I
get quite a bit of life from it:

usb debug gives me:

usb/serial: startdevs: opening #0 /dev/usb/ep9.0
usb/serial: opendev 0x5d060 /dev/usb/ep9.0
usb/serial: /dev/usb/ep9.0 csp 255.0.0 vid 0x67b did 0x2303 refs 1
	none <nil> <nil>
	conf: cval 1 attrib a0 100 mA
		iface csp 255.0.0
		  alt 0 attr 2 ival 0
		  ep id 1 addr 129 dir in type intr itype 0 maxpkt 10 ntds 1
		  ep id 2 addr 2 dir out type bulk itype 0 maxpkt 64 ntds 1
		  ep id 3 addr 131 dir in type bulk itype 0 maxpkt 64 ntds 1
serial: vid 0x067b did 0x2303 vid 0x067b did 0x2303
serial[0]: ep ids: in 3 out 2 intr 1
usb/serial: /dev/usb/ep9.3 already exists; trying to open
usb/serial: opendev 0x5d680 /dev/usb/ep9.3
usb/serial: /dev/usb/ep9.2 already exists; trying to open
usb/serial: opendev 0x5d6c0 /dev/usb/ep9.2
usb/serial: /dev/usb/ep9.1 already exists; trying to open
usb/serial: opendev 0x50360 /dev/usb/ep9.1
serial: ep in /dev/usb/ep9.3 out /dev/usb/ep9.2
serial: ep intr /dev/usb/ep9.1
serial: valid interface, calling serinit
plinit
serial: type 1
serial: vendorread val: 0x8484 idx:0 buf:50480
serial: vendorread res:1
serial: vendorwrite val: 0x404 idx:0
serial: vendorwrite res:8
serial: vendorread val: 0x8484 idx:0 buf:50480
serial: vendorread res:1
serial: vendorread val: 0x8383 idx:0 buf:50480
serial: vendorread res:1
serial: vendorread val: 0x8484 idx:0 buf:50480
serial: vendorread res:1
serial: vendorwrite val: 0x404 idx:1
serial: vendorwrite res:8
serial: vendorread val: 0x8484 idx:0 buf:50480
serial: vendorread res:1
serial: vendorread val: 0x8383 idx:0 buf:50480
serial: vendorread res:1
serial: vendorwrite val: 0x0 idx:1
serial: vendorwrite res:8
serial: vendorwrite val: 0x1 idx:0
serial: vendorwrite res:8
serial: vendorwrite val: 0x2 idx:68
serial: vendorwrite res:8
serial: getparam: buf[0]=0x0 buf[1]=0xe1 buf[2]=0x0 buf[3]=0x0 buf[4]=0x0 buf[5]=0x0 buf[6]=0x8 
serial: getparam res: 7
b57600 c0 d0 e0 l8 m0 pn r0 s1 i0 
dev(0) type(1)  framing(0) overruns(0) berr(0)  serr(0)
serial: getparam: buf[0]=0x0 buf[1]=0xe1 buf[2]=0x0 buf[3]=0x0 buf[4]=0x0 buf[5]=0x0 buf[6]=0x8 
serial: getparam res: 7
serial: adding interface 0, 5d824
eiaU9...usb/serial: fsadd eiaU9
serial: reading from interrupt

and cat /dev/usb/ctl gives

ep9.3 enabled bulk r speed full maxpkt 256 pollival 0 samplesz 0 hz 0 hub 2 port 2 busy
ep9.2 enabled bulk w speed full maxpkt 256 pollival 0 samplesz 0 hz 0 hub 2 port 2 busy
ep9.1 enabled interrupt r speed full maxpkt 10 pollival 10 samplesz 0 hz 0 hub 2 port 2 busy

sadly though, the data is corrupted:

pw��r=on mon=noneZ hdp=ok se]g=0 int-en�n=c2 in��t-dest=�0 int-��edid=0�
edid=fqinishe�d trys��=8 state=idle, er�Qer=no er�ror
pwr=on mo%rmn=none �hdp=ok Wseg=0 iNnt-en=c�2 int-d�est=0 i�nt-edid=0�B=
edid=fini�&shed tr[ys=8 s%�tate=id�le, erro=no errkor
pw��r=on mon=�onnone hd�p=ok se�g=0 int-en=c2:�c int-dest=0 int-edid=��d0
edid=finishe�d trys=X8 stat	�e=idle*�, err=")no erro9r

Anyone have a EIA dongle that is known to work with the PI?
anyone any ideas what might be wrong?

-Steve

Eduardo Alvarez | 22 Jul 15:20 2015
Picon

Plumbing - Files with spaces

Hello, all,

I've recently been introduced to plan9port, and have been fiddling about with the plumber. As a test, I tried using the plumber to open several different files wherever I specified. I noticed, however, that I was unable to plumb files whose names had spaces in them. A search on google on the subject threw as the only solution "use shorter filenames". Fair enough, but I wanted to know if this is a limitation of the plumber itself, or if the regular expressions used can accomodate for spaces.

Regards,

Eduardo Alvarez
Steve Simon | 21 Jul 10:51 2015
Picon

usb disk - no partitions?

the usb disk driver does not seem to support partitions,
Am I doing somthing wrong, or is that just how it is?

e.g.

	cherry% ls /dev/sdU0.0/
	/dev/sdU0.0/ctl
	/dev/sdU0.0/data
	/dev/sdU0.0/raw

	cherry% disk/fdisk -p /dev/sdU0.0/data > /dev/sdU0.0/ctl

	cherry% ls /dev/sdU0.0/
	/dev/sdU0.0/ctl
	/dev/sdU0.0/data
	/dev/sdU0.0/raw

-Steve

Håkon Robbestad Gylterud | 20 Jul 22:56 2015
Picon

Inverting exit status in mk recipes

Hello 9fans,

I am trying to write a test target in an mkfile which checks a few
negative tests.

My intuition was that this would be written as

test:QV:
  ! command1
  ! command2
  …

However, such a recipe always fails since mk will fail if command1 has a
non-empty exit status.

Thus I wonder: What the idiomatic way of doing this?

The best solution I have found thus far is to write:

test:QVE:
   ! command1 && ! command2 && …

But this makes it rather less intelligible.

Best regards,
 Håkon

Prof Brucee | 18 Jul 14:19 2015
Picon

It's all happening at Club Birriga

A bidness venture is underway locally. Like all good ideas it is super secret so to be sure you never heard about it from me. If you are interested in participating please contact me with an "I am great" report.

You may get to participate in a fruitful adventure.

Some of you fellas already have an assured seat on the bus and some may need to go thru a bit of training/vetting. I'll all be true sailing and by the book (prospectus in this case).

Regards,

Prof brucee
cinap_lenrek | 18 Jul 04:49 2015
Picon

9p pipelining experiment

i would like to share a little experiment:

http://felloff.net/usr/cinap_lenrek/stream/

the idea is todo pipelining over 9p only with small
changes to devmnt. that is, instead of:

T1 *stall* R1 T2 *stall* R2 T3 *stall* R3 ...

we want todo:

T1 T2 R1 T3 R2 R3

so i made devstream thats like devdup (/fd) so
when you open /fd/0stream, you get a little stream back
that will do i/o ontop of the original fd channel in
parallel. you cannot seek in a stream, but it will
read or write stuff in this pipelined manner in the
background.

this has similar semantics like the "ftp like steaming 9p"
stuff but doesnt need protocol changes or an out of band
channel.

there are two kinds of files that are important to
distinguish when we do read pipelining:

- files honoring the offset
- files ignoring the offset

in the first case, we have to reorder the responses by file offset
and and need to keep track of holes when a read returns less data
than requested.

in the second case, we need to reorder them in response order.

in the lack of having qid bits for this, i came up with the following
hack to detect the mode:

read from offset 0x7fffffffffffff first. when we get bytes back, we
can assume the file doesnt honor the offset, and otherwise it does.
this is just a hack for now to play with this idea. it would be
better to know beforehand with some mode bits but this appears to
work fine.

for pipelining, we need to know when a request is commited (written
to the 9p channel and on its way to the server), and for reads on
files not honoring the offset, we need to know the order in which
the responses arrived.

for this, the following fields where added to the Proc structure:

+	void	*iocomarg;	/* I/O completion callback for pipelining */
+	void	(*iocomfun)(void*, int);

devmnt just calls (*up->iocomfun)(up->iocomarg, 0); when a 9p
request was commited and (*up->iocomfun)(up->iocomarg, 1) when
it received a response (up is the original processes in this
case, but doesnt call it like that obviously as mountmux() can
run on a different proc).

this is enougth to implement the pipelining. streamwrite() is
implemented by first acquiering a qlock, then we take a buffer
from a queue, then write it. when the file is devmnt, iocom is
called from within devmnt and will release the qlock when the
write is commited. which allows another writer process to take
another buffer from the queue and write it...

note we do not rely on iocom to be called within devmnt, in
case the file doent give us any hints, we just call it ourselfs
after the read or write returns.

things that are not worked out yet completely:

- zero length reads currently terminate the stream
- only way to drain/flush a write stream is to close it (want
some barrier (zero length write??))
- how many procs should we use? currently using 4 readers and 2 writers
- bugs: most likely

any questions?

--
cinap


Gmane