On Tue, 2012-05-08 at 14:41 -0700, Joe Zeff wrote:
On 05/08/2012 02:31 PM, Patrick O'Callaghan wrote:
> I think you're underestimating the amount of extra effort this would
> require for each program.
Actually, I was thinking in terms of "if this switch is set, don't use
uninturrupted sleep." And, I'd be very astonished if any of the
maintainers would be willing to do something like that. Mostly, I was
thinking in theoretical terms about what could be done to prevent this
in the highly unlikely case that somebody was willing to do the work.
That's not something the programmer can control. Low-level file
operations can go into D state because that's what the implementation
level requires. Depending on requirements, the programmer might be able
to use aio(7) calls, but it complicates things greatly and AFAIK doesn't
guarantee that the program will never wait.
poc