9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] PDP11 (Was: Re: what heavy negativity!)
@ 2018-10-10 17:34 cinap_lenrek
  2018-10-10 21:54 ` Steven Stallion
  0 siblings, 1 reply; 104+ messages in thread
From: cinap_lenrek @ 2018-10-10 17:34 UTC (permalink / raw)
  To: 9fans

> But the reason I want this is to reduce latency to the first
> access, especially for very large files. With read() I have
> to wait until the read completes. With mmap() processing can
> start much earlier and can be interleaved with background
> data fetch or prefetch. With read() a lot more resources
> are tied down. If I need random access and don't need to
> read all of the data, the application has to do pread(),
> pwrite() a lot thus complicating it. With mmap() I can just
> map in the whole file and excess reading (beyond what the
> app needs) will not be a large fraction.

you think doing single 4K page sized reads in the pagefault
handler is better than doing precise >4K reads from your
application? possibly in a background thread so you can
overlap processing with data fetching?

the advantage of mmap is not prefetch. its about not to do
any I/O when data is already in the *SHARED* buffer cache!
which plan9 does not have (except the mntcache, but that is
optional and only works for the disk fileservers that maintain
ther file qid ver info consistently). its *IS* really a linux
thing where all block device i/o goes thru the buffer cache.

--
cinap



^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: [9fans] PDP11 (Was: Re: what heavy negativity!)
@ 2018-10-10 22:19 cinap_lenrek
  0 siblings, 0 replies; 104+ messages in thread
From: cinap_lenrek @ 2018-10-10 22:19 UTC (permalink / raw)
  To: 9fans

hahahahahahahaha

--
cinap



^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: [9fans] PDP11 (Was: Re: what heavy negativity!)
@ 2018-10-10 16:14 cinap_lenrek
  0 siblings, 0 replies; 104+ messages in thread
From: cinap_lenrek @ 2018-10-10 16:14 UTC (permalink / raw)
  To: 9fans

oh! you wrote a nvme driver TOO? where can i find it?

maybe we can share some knowledge. especially regarding
some quirks. i dont own hardware myself, so i wrote it
using an emulator over a weekend and tested it on a
work machine afterwork.

http://code.9front.org/hg/plan9front/log/9df9ef969856/sys/src/9/pc/sdnvme.c

--
cinap



^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: [9fans] PDP11 (Was: Re: what heavy negativity!)
@ 2018-10-10  0:15 cinap_lenrek
  2018-10-10  0:22 ` Lyndon Nerenberg
  0 siblings, 1 reply; 104+ messages in thread
From: cinap_lenrek @ 2018-10-10  0:15 UTC (permalink / raw)
  To: 9fans

> To address Hiro's comments, I have no benchmarks on Plan 9, because
> the SDR code I run does not exist there.  But I do have experience
> with running SDR on Linux and FreeBSD with hardware like the HackRF
> One.  That hardware can easily saturate a USB2 interface/driver on
> both of those operating systems.  Given my experience with USB on
> Plan 9 to date, it's a safe bet that all the variants would die
> when presented with that amount of traffic.

why? the *HOST CONTROLLER* schedules the data transfers. if the
program doesnt do a read() theres nothing to schedule... (unless
its isochronous endpoint, in which case the controller dma's for
you in the background at the specified sampling rate).

> (I can knock down a Plan9 system with 56 Kb/s USB serial traffic.)

that sounds seriously scewed up. i have no issues here reading a usb
stick on my x230 with xhci at 32MB/s, not using any fancy streaming
optimization. no load at all. and this is just some garbage from the
supermarket.

> I can see about
> twisting up some code that would read the raw I/Q data from the SDR
> via USB and see how it stands up.  But the real question is what
> kind of delay, latency, and jitter will there be, getting that raw
> I/Q data from the USB interface up to the consuming application?

is this a isochronous endpoint? in that case you would not have to
worry much as the controller does all the timing for you in hardware.

> Eliminating as much of the copy in/out WRT the kernel cannot but
> help, especially when you're doing SDR decoding near the radios
> using low-powered compute hardware (think Pies and the like).

ahhhh! we'r talking about some crappy raspi here... probably with all
caches disabled... never mind.

> --lyndon

--
cinap



^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: [9fans] PDP11 (Was: Re: what heavy negativity!)
@ 2018-10-09 19:49 cinap_lenrek
  2018-10-09 19:56 ` hiro
  0 siblings, 1 reply; 104+ messages in thread
From: cinap_lenrek @ 2018-10-09 19:49 UTC (permalink / raw)
  To: 9fans

also, i wonder how much is the actual copy overhead you claim is the issue.
maybe the impact for copying is more dominated by the memory allocator used
for allocb(). have you measured?

--
cinap



^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: [9fans] PDP11 (Was: Re: what heavy negativity!)
@ 2018-10-09 19:47 cinap_lenrek
  2018-10-09 22:01 ` erik quanstrom
  2018-10-09 23:43 ` Lyndon Nerenberg
  0 siblings, 2 replies; 104+ messages in thread
From: cinap_lenrek @ 2018-10-09 19:47 UTC (permalink / raw)
  To: 9fans

> The big one is USB.  disk/radio->kernel->user-space-usbd->kernel->application.
> Four copies.

that sounds wrong.

usbd is not involved in the data transfer. it mainly is just responsible to
enumerating devices and instantiating drivers and registering the endpoints
in devusb. after that you access the endpoint files from devusb which goes
directly to the kernel. devusb also allows you to create a alias for a
endpoint file which then appears directly under /dev. usb audio uses this
mechanism. the usb driver just activates the device and provides the ctl/volume
files, while audio data is handled by the kernel's devusb.

on another remark regarding zero copy. the reason plan9 drivers are small comes
from NOT doing these "optimizations". identity mapping the low part of memory
in the kernel avoids alot of trouble and allows you to get DMA capable memory
with just wrapping a pointer in PADDR(va). no page lists needed. no MMU tricks
needed in the drivers. you can use any kernel memory va for DMA... even your
kernel stack! its never paged out. you can be sure it is not changed while the
device looks at it ect. do not underestimate the impact of this "simplification".

linux block layer is broken in that regard btw. it just hands user pages into
the drivers without making sure they do not change while the i/o is in flight,
which results in all kinds of false-negatives when you actually start verifying
your raid arrays as different snapshots in time got written out to the raid
members. they know about this and ignore it because benchmarks are more important.

--
cinap



^ permalink raw reply	[flat|nested] 104+ messages in thread
* [9fans] PDP11 (Was: Re:  what heavy negativity!)
@ 2018-10-08  3:38 Lucio De Re
  2018-10-08  4:29 ` Digby R.S. Tarvin
  2018-10-08  8:09 ` Nils M Holm
  0 siblings, 2 replies; 104+ messages in thread
From: Lucio De Re @ 2018-10-08  3:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 10/8/18, Digby R.S. Tarvin <digbyt42@gmail.com> wrote:
>
> So the question is... is plan9 still lean and mean enough to fit onto a
> machine with a 64K address space? Doing a port would certainly provide
> plenty of opportunity to tinker with the lights and switches on front
> panel, and if it the port was initially limited to being a CPU server,
> there would be no need to worry about displays and mass storage.... just
> the compiler back end and low level kernel support.
>
You really must be thinking of Inferno, native, running in a host with
1MiB of memory. 64KiB isn't enough for anything other than maybe CPM.
Even MPM won't cut it, I don't think.

Lucio.



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

end of thread, other threads:[~2018-10-17 18:14 UTC | newest]

Thread overview: 104+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 17:34 [9fans] PDP11 (Was: Re: what heavy negativity!) cinap_lenrek
2018-10-10 21:54 ` Steven Stallion
2018-10-10 22:26   ` [9fans] zero copy & 9p (was " Bakul Shah
2018-10-10 22:52     ` Steven Stallion
2018-10-11 20:43     ` Lyndon Nerenberg
2018-10-11 22:28       ` hiro
2018-10-12  6:04       ` Ori Bernstein
2018-10-13 18:01         ` Charles Forsyth
2018-10-13 21:11           ` hiro
2018-10-14  5:25             ` FJ Ballesteros
2018-10-14  7:34               ` hiro
2018-10-14  7:38                 ` Francisco J Ballesteros
2018-10-14  8:00                   ` hiro
2018-10-15 16:48                     ` Charles Forsyth
2018-10-15 17:01                       ` hiro
2018-10-15 17:29                       ` hiro
2018-10-15 23:06                         ` Charles Forsyth
2018-10-16  0:09                       ` erik quanstrom
2018-10-17 18:14                       ` Charles Forsyth
2018-10-10 22:29   ` [9fans] " Kurt H Maier
2018-10-10 22:55     ` Steven Stallion
2018-10-11 11:19       ` Aram Hăvărneanu
2018-10-11  0:26   ` Skip Tavakkolian
2018-10-11  1:03     ` Steven Stallion
2018-10-14  9:46   ` Ole-Hjalmar Kristensen
2018-10-14 10:37     ` hiro
2018-10-14 17:34       ` Ole-Hjalmar Kristensen
2018-10-14 19:17         ` hiro
2018-10-15  9:29         ` Giacomo Tesio
  -- strict thread matches above, loose matches on Subject: below --
2018-10-10 22:19 cinap_lenrek
2018-10-10 16:14 cinap_lenrek
2018-10-10  0:15 cinap_lenrek
2018-10-10  0:22 ` Lyndon Nerenberg
2018-10-09 19:49 cinap_lenrek
2018-10-09 19:56 ` hiro
2018-10-09 19:47 cinap_lenrek
2018-10-09 22:01 ` erik quanstrom
2018-10-09 23:43 ` Lyndon Nerenberg
2018-10-10  5:52   ` hiro
2018-10-10  8:13     ` Digby R.S. Tarvin
2018-10-10  9:14       ` hiro
2018-10-10 13:59         ` Steve Simon
2018-10-10 21:32         ` Digby R.S. Tarvin
2018-10-11 17:43     ` Lyndon Nerenberg
2018-10-11 19:11       ` hiro
2018-10-11 19:27         ` Lyndon Nerenberg
2018-10-11 19:56           ` hiro
2018-10-10  5:57   ` hiro
2018-10-08  3:38 Lucio De Re
2018-10-08  4:29 ` Digby R.S. Tarvin
2018-10-08  7:20   ` hiro
2018-10-08 12:03     ` Charles Forsyth
2018-10-08 17:20       ` hiro
2018-10-08 21:55         ` Digby R.S. Tarvin
2018-10-08 23:03           ` Dan Cross
2018-10-09  0:14             ` Bakul Shah
2018-10-09  1:34               ` Christopher Nielsen
2018-10-09  3:28               ` Lucio De Re
2018-10-09  8:23                 ` hiro
2018-10-09  9:45                 ` Ethan Gardener
2018-10-09 17:50                   ` Bakul Shah
2018-10-09 18:57                     ` Ori Bernstein
2018-10-10  7:32                 ` Giacomo Tesio
2018-10-09 17:45               ` Lyndon Nerenberg
2018-10-09 18:49                 ` hiro
2018-10-09 19:14                   ` Lyndon Nerenberg
2018-10-09 22:05                     ` erik quanstrom
2018-10-11 17:54                       ` Lyndon Nerenberg
2018-10-11 18:04                         ` Kurt H Maier
2018-10-11 19:23                         ` hiro
2018-10-11 19:24                           ` hiro
2018-10-11 19:25                             ` hiro
2018-10-11 19:26                         ` Skip Tavakkolian
2018-10-11 19:39                           ` Lyndon Nerenberg
2018-10-11 19:44                             ` Skip Tavakkolian
2018-10-11 19:47                               ` Lyndon Nerenberg
2018-10-11 19:57                                 ` hiro
2018-10-11 20:23                                   ` Lyndon Nerenberg
2018-10-10 10:42                     ` Ethan Gardener
2018-10-09 19:23                   ` Lyndon Nerenberg
2018-10-09 19:34                     ` hiro
2018-10-09 19:36                       ` hiro
2018-10-09 19:40                       ` Lyndon Nerenberg
2018-10-10  0:18                       ` Dan Cross
2018-10-10  5:45                         ` hiro
2018-10-09 22:06                     ` erik quanstrom
2018-10-10  6:24                       ` Bakul Shah
2018-10-10 13:58                         ` erik quanstrom
2018-10-09 22:42                   ` Dan Cross
2018-10-09 19:09                 ` Bakul Shah
2018-10-09 19:30                   ` Lyndon Nerenberg
2018-10-09  3:08             ` Digby R.S. Tarvin
2018-10-09 11:58               ` Ethan Gardener
2018-10-09 13:59                 ` erik quanstrom
2018-10-09 22:22                 ` Digby R.S. Tarvin
2018-10-10 10:38                   ` Ethan Gardener
2018-10-10 23:15                     ` Digby R.S. Tarvin
2018-10-11 18:10                       ` Lyndon Nerenberg
2018-10-11 20:55                         ` Digby R.S. Tarvin
2018-10-11 21:03                           ` Lyndon Nerenberg
2018-10-09 14:02               ` erik quanstrom
2018-10-08  8:12   ` Nils M Holm
2018-10-08  9:12     ` Digby R.S. Tarvin
2018-10-08  8:09 ` Nils M Holm

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