News for hackers. Stuff that matters.
Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by Animats on Friday May 03, 2019 @03:00PM (#19821256)
Those are more like add-on features a driver can use if present. They don't push peripheral interfaces into a standard channel-like format. Nor are they close to one that can be exposed to application programs.
Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by kazinator on Friday May 03, 2019 @04:49PM (#19822140)
We can't expose a DMA controller directly to programs, but an API could be devised for it. Such a thing is needed even just from the mere portability point of view: making different DMA controllers on different systems look the same.

Applications will typically specify transfers using virtual addresses, but DMA controllers will understand physical memory (usually, but maybe there are virtually mapped ones out there). Plus there are other issues like restricted ranges: DMA that cannot acces all physical memory but just a certain range. The API will have to convert ranges of virtual addresses to one or more physical ranges, which are then queued as one or more DMA operations and somehow deal with the problem that not just any old memory allocation in the application is DMA-able.

Applications talking to channel hardware directly using dedicated CPU instructions is only possible in some vendor-locked IBM mainframe world. It's not otherwise feasible simply for business/market/economic reasons having nothing to do with technical feasibility.

An operating system API is basically a set of extensions to the instruction set available in the application's virtual machine; it's no different from some dedicated I/O instructions, just perhaps less efficient (which may or may not matter).

Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by Unklejoe on Friday May 03, 2019 @08:22PM (#19823416)
> but DMA controllers will understand physical memory

Yup, this is what I’ve found on many embedded SoCs. It’s unfortunate. The fact that they need physical addresses makes them not worth using in many cases (mainly when trying to move user buffers around).

Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by hyc_symas on Saturday May 04, 2019 @01:58PM (#19828054)
Sun supported DMA to virtual addresses in SunOS / Solaris. Made some aspects of drivers easier.
Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by CamperBob2 on Friday May 03, 2019 @06:29PM (#19822822)
They don't push peripheral interfaces into a standard channel-like format.

How does this not describe a PCIe bus master?

Frankly I don't understand any of this. High-performance I/O works by accessing main memory directly, just like it always has. The CPU then has to wait on main memory, just like it always has. Saying that the CPU is somehow the bottleneck seems to fall into the "not even wrong" area. There is no danger of I/O bandwidth approaching L1 or even L2 speeds anytime soon.

Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by ncmncm on Friday May 03, 2019 @08:29PM (#19823443)
400 Gbps is 50 GBps, or 50 bytes per ns. A 100-byte packet comes every 2ns. The bottleneck is not cache bandwidth, it is the number of instructions you have time to execute per unit of I/O: in 6 cycles you will not get to run 24 instructions, especially if you have to wait 3 cycles for your L1 cache.
Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by CamperBob2 on Friday May 03, 2019 @09:36PM (#19823722)
But you aren't waiting on L1, except in the sense that you're waiting on line fills from main memory. If the problem is that you don't have enough time to do something with the data you're getting, how is that solvable by architectural changes external to the CPU?

In the real world, if you need to deal with 400 Gb/s, you aren't going to send it to a single general-purpose CPU using any type of bus or channel. The CPU won't see it until another ASIC (or FPGA, I suppose) crunches it first.

Yes, that may impose a limit on the speed of an external network that a CPU can deal with, but that's the way it goes. MCA was never going to save us at this end of the Moore's Law curve.

Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by ncmncm on Friday May 03, 2019 @10:33PM (#19823981)
It is only solvable by architectural changes external to the CPU. Even at 40Gbps, which we live with now, that's 20 ns per packet, or 80 ns at a pokey 10Gbps, certainly not enough time to do a system call per packet.

So you need the hardware to divvy traffic up to multiple queues -- rings, really -- and a core for each ring. The packets just show up in memory, and the cores had just better keep up. If that looks to you like the same old POSIX architecture, I don't know what to say.

It was around 2010 that the network pipes got faster than the SAN file servers, and suddenly file output capacity had to be incorporated into network flow control.

Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by dkersten on Friday May 03, 2019 @04:17PM (#19821876)
So would it be correct to say that functionally, it’s similar to DMA, but the API is different because “channels” expose a consistent interface while DMA doesn’t?
Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by kazinator on Friday May 03, 2019 @04:50PM (#19822153)
Channels only expose a consistent interface as long as there is no other mainframe other than an IBM one, or compatible.

Once you have two, and you want portable applications, using channel I/O instructions directly inline goes out the window; you need an API.

Re:I/O Is Faster Than CPU – Let’s Partition Resources and El... by marshray on Friday May 03, 2019 @05:10PM (#19822310)
One could say this about any library or OS feature. Berkeley Sockets, for example.

Porting code is easier when there are portable APIs. But that doesn't diminish from the quality of the abstraction.