The choice I see is between:
1. re-arming the one-shot notification when the user gets EAGAIN
2. re-arming the one-shot notification when the user reads all the data
that was waiting (such that the very next read would return EGAIN).
#1 is what Davide wants; I think John and Mark are arguing for #2.
I suspect that Davide would be happy with #2, but advises
programmers to read until EGAIN anyway just to make things clear.
If the programmer is smart enough to figure out how to do that without
hitting EAGAIN, that's fine. Essentially, if he tries to get away
without getting an EAGAIN, and his program stalls because he didn't
read all the data that's available and thereby doesn't reset the
one-shot readiness event, it's his own damn fault, and he should
go back to using level-triggered techniques like classical poll()
or blocking i/o.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/