This sounds like a reasonable idea, and I like it much more than your
original poll2(2) proposal.
As you noticed, it might require a lot of changes. That could
be reduced if you add a flag to struct file that tells whether the
underlying driver supports synchronizing the field at all. Then you
could go through the files and see whether you can trust this field,
and call the poll operation otherwise.
With this interface, you could then implement that improved polling
for the most interesting case: TCP sockets. If you get a significant
speed-up on this, other driver authors could consider following your
interface.
Regards,
Martin