lkml.org 
[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [1/4] standardize bit waiting data type
William Lee Irwin III wrote:
>>+ prepare_to_wait(wqh, &wait.wait, TASK_UNINTERRUPTIBLE);
>>+ if (buffer_locked(bh)) {
>>+ sync_buffer(bh);
>>+ io_schedule();
>>+ }
>> finish_wait(wqh, &wait.wait);
>> }

On Fri, Sep 03, 2004 at 11:53:55AM +0200, Martin Wilck wrote:
> Why don't you need a do..while loop any more ?
> There is also no loop in __wait_on_bit() in the completed patch series.

Part of the point of filtered waitqueues is to reestablish wake-one
semantics. This means two things:
(a) those waiting merely for a bit to clear with no need to set it,
i.e. all they want is to know a transition from set to
clear occurred, are only woken once and don't need to loop
waking and sleeping
(b) Of those tasks waiting for a bit to clear so they can set it
exclusively, only one needs to be woken, and after the first
is woken, it promises to clear the bit again, so there is no
need to wake more tasks.

These two aspects of wake-one semantics give it highly attractive
performance characteristics.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.060 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site