From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: <3C62CE67D1FF8260C5450B3D0AE7AA1A@felloff.net> In-Reply-To: From: Steven Stallion Date: Wed, 10 Oct 2018 21:26:36 -0500 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset="UTF-8" Subject: Re: [9fans] zero copy & 9p (was Re: PDP11 (Was: Re: what heavy negativity!) Topicbox-Message-UUID: ebd22f4e-ead9-11e9-9d60-3106f5b1d025 On Wed, Oct 10, 2018 at 8:20 PM Dan Cross wrote: >> don't forget the code complexity with dealing with these scattered >> pages in the *DRIVERS*. > > It's really not that hard. The way Linux does it is pretty bad, but it's not like that's the only way to do it. SunOS and Win32 (believe it or not) managed to get this "right"; dealing with zero-copy in those kernels was a non-event. I'm not sure I understand the assertion how this would affect constituent drivers. This sort of detail is handled at a higher level - the driver generally operates on a buffer that gets jammed into a ring for DMA transfer. Apart from grabbing the physical address, the worst you may have to do is pin/unpin the block for the DMA operation. From the driver's perspective, it's memory. It doesn't matter where it came from (or who owns it for that matter). > Or don't. There's a lot to be said for keeping it simple...