Robert Collins wrote:
> I have a suggestion. If there are queued disk IO's, set the comm_timeout
> lower than 100.
It is at 10 ms (100/s).
At least for Linux x86 we can't go below this as this is the timer
resolution.
What we can do is
a) busy-wait for the I/O to complete (not very nice)
b) have a form of active signalling method indicating I/O have completed
b1) Once upon a time I used a ignored (but not blocked) signal for
this where the I/O thread signals the main thread if the main thread is
in select/poll (with reservation for races).
b2) Have the threads write a message to a pipe which is waited for by
comm_select.
> Another possibility is to do a decaying average of the last -say 100-
> comm_select call return times as a % of the timeout, and reduce the
> handed timeout to that %. That will result in no reduction when
> comm_select() times out, and will quickly reduce the timeout when it
> does return within the timeout.
Not much of a point as we select/poll can't go below the timer
resolution.
Regards
Henrik
Received on Thu Jan 02 2003 - 08:43:53 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:05 MST