[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-fsdevel
Subject: Re: [replace-alexv-buffer.c-patch] Re: [PATCH] Several bad bugs in
From: "Stephen C. Tweedie" <sct () redhat ! com>
Date: 1999-04-23 13:44:32
[Download RAW message or body]
Hi,
On Thu, 22 Apr 1999 15:42:15 -0400 (EDT), Alexander Viro
<viro@math.psu.edu> said:
>[snip]
>> @@ -653,10 +629,13 @@
>> * around on the free list, and we can get in a loop if we are not careful.
>> */
>> for(nlist = 0; nlist < NR_LIST; nlist++) {
>> + refiled:
>> bh = lru_list[nlist];
>> for (i = nr_buffers_type[nlist]*2 ; --i > 0 ; bh = bhnext) {
>> if(!bh)
>> break;
>> + if (bh->b_list != nlist)
>> + goto refiled;
> Ahem... Busy-waiting is fun, ain't it? What did you really mean
>in the chunk above?
It's not a busy-wait. If bh->b_list has changed, it just means that the
"bhnext" buffer got refiled while we blocked in wait_on_buffer the
previous time round the loop. That buffer is no longer on the current
lru_list so we won't see it after the reattempt.
--Stephen
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic