Re: Make pipe data structure be a circular list of pages, rather

Linus Torvalds
2005-01-13T22:37:02Z

On Thu, 13 Jan 2005, Ingo Oeser wrote:
>
> Hmm, that's a pity, because it makes hardware support more difficult.
>
> I thought you might consider an system call, which "wires up" fds.
>
> Imagine a device fd, which gets lots of measuring data, wired through a
> DSP pipe, spliced to realtime display fd and file storage fd.

I think that the solution to that is to make the pipe _be_ the driver
interface.

Remember: a pipe is just a set of buffers. If you have a hardware device
that could use the buffers, then there is nothing to say that the driver
couldn't be the "actor" that fills the buffers. So doing an "open()" on
the device would just create a pipe that gets filled by the hardware.

But that doesn't make the pipe an "actor". The pipe just remains a
standard way to encapsulate the notion of "set of buffers". It needs an
external actor to do something, but that actor can be a device driver
filling it up, or a system call that reads it or moves it to another
destination.

Linus