[ENBD] 2.4.32 (2004-03-07)

Peter T. Breuer ptb at it.uc3m.es
Thu Mar 11 07:44:16 MST 2004


"Also sprach Anders Blomdell:"
>   From sched.c:
> 
>   * schedule_timeout - sleep until timeout
>   * @timeout: timeout value in jiffies
>   *
>   * Make the current task sleep until @timeout jiffies have
>   * elapsed. The routine will return immediately unless
>   * the current task state has been set (see set_current_state()).
> !!!!!!!!!!!!!

Ooops. Looks good!

>   *
>   * You can set the task state as follows -
>   *
>   * %TASK_UNINTERRUPTIBLE - at least @timeout jiffies are guaranteed to
>   * pass before the routine returns. The routine will return 0

Uh huh.

>   *
>   * %TASK_INTERRUPTIBLE - the routine may return early if a signal is
>   * delivered to the current task. In this case the remaining time
>   * in jiffies will be returned, or 0 if the timer expired in time

OK, well that looks like what is wanted. I agree with you! Add and see
how it goes. What is the current task state at the time we call, by
the way? We would like to return to it.

>   *
>   * The current task state is guaranteed to be TASK_RUNNING when this
>   * routine returns.

Thanks for knowing this!

However the state is set to UNINTERRUPTIBLE in wait_for_completion, and
yes, you are right, setting the state to INTERRUPTIBLE would help
greatly in the schedule_timeout in clr_kernel_queue. We just want to 
let somebody else in occasionally.

I'm not sure if it should be set while still under the io request lock
or not. We surface from the lock in order to call schedule_timeout.

Thanks! Don't let me go home today without adding the call.

Peter



More information about the ENBD mailing list