Mazzoli: How fast are Linux pipes anyway?
Mazzoli: How fast are Linux pipes anyway?
Posted Jun 10, 2022 17:32 UTC (Fri) by NYKevin (subscriber, #129325)In reply to: Mazzoli: How fast are Linux pipes anyway? by willy
Parent article: Mazzoli: How fast are Linux pipes anyway?
Whichever is easier. As long as it's consistent and well-documented, userspace can figure out the rest.
However, I should point out that, if the pipe does not shuffle down, then you need to add an API for telling userspace the current read/write offsets, so that userspace knows where to begin reading or writing. Regardless, you also want an API for setting (or at least advancing) those offsets, so that userspace can emulate read/write calls. Therefore, you might as well not bother with the shuffling-down logic and just provide full get/set support for the offsets.
