From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) From: Bakul Shah In-Reply-To: Date: Tue, 9 Oct 2018 23:24:13 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1806122E-7160-403A-A2F0-027E5E77E31A@bitblocks.com> References: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] PDP11 (Was: Re: what heavy negativity!) Topicbox-Message-UUID: eadc44ee-ead9-11e9-9d60-3106f5b1d025 On Oct 9, 2018, at 3:06 PM, erik quanstrom = wrote: >=20 > with meltdown/Spectre mitigations in place, I would like to see = evidence that flip is faster than copy. If your system is well balanced, you should be able to stream data as fast as memory allows[1]. In such a system copying things N times will reduce throughput by similar factor. It may be that plan9 underperforms so much this doesn't matter normally. 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. The default assumption here seems to be that doing this will be very complicated and be as bad as on Linux. But Linux is not a good model of what to do and examples of what not to do are not useful guides in system design. There are other OSes such as the old Apollo Aegis (AKA Apollo/Domain), KeyKOS & seL4 that avoid copying[2]. Though none of this matters right now as we don't even have a paper design so please put down your clubs and swords :-) [1] See: https://code.kx.com/q/cloud/aws/benchmarking/ A single q process can ingest data at 1.9GB/s from a single drive. 16 can achieve 2.7GB/s, with theoretical max being 2.8GB/s. [2] Liedke's original L4 evolved into a provably secure seL4 and in the process it became very much like KeyKOS. Capability systems do pass around pages as protected objects and avoid copying. Sort of like how in a program you'd pass a huge array by reference and not by value to a function.