Re: [(RT RFC) PATCH v2 3/9] rearrange rt_spin_lock sleep

2008-02-25 Thread Gregory Haskins
>>> On Mon, Feb 25, 2008 at 4:54 PM, in message <[EMAIL PROTECTED]>, Pavel Machek <[EMAIL PROTECTED]> wrote: > Hi! > >> @@ -720,7 +728,8 @@ rt_spin_lock_slowlock(struct rt_mutex *lock) >> * saved_state accordingly. If we did not get a real wakeup >> * then we return with the saved st

Re: [(RT RFC) PATCH v2 3/9] rearrange rt_spin_lock sleep

2008-02-25 Thread Pavel Machek
Hi! > @@ -720,7 +728,8 @@ rt_spin_lock_slowlock(struct rt_mutex *lock) >* saved_state accordingly. If we did not get a real wakeup >* then we return with the saved state. >*/ > - saved_state = xchg(¤t->state, TASK_UNINTERRUPTIBLE); > + saved_state = current->state;

[(RT RFC) PATCH v2 3/9] rearrange rt_spin_lock sleep

2008-02-25 Thread Gregory Haskins
The current logic makes rather coarse adjustments to current->state since it is planning on sleeping anyway. We want to eventually move to an adaptive (e.g. optional sleep) algorithm, so we tighten the scope of the adjustments to bracket the schedule(). This should yield correct behavior with or