lkml.org 
[lkml]   [1999]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux-2.2.4 testpatch..
On 24 Mar 1999, Linus Torvalds wrote:

>There's a potential problem under certain load conditions with 2.2.4,
>which should be fixed by this one-liner. If you have trouble with 2.2.4

> remove_from_queues(buf);
>+ buf->b_count = 0;
> put_last_free(buf);
> }

Which is the problem?

The only place that reuse the buffer is placed in the freelist is getblk
here:

[..]
bh = free_list[isize];
if (!bh)
goto refill;
remove_from_free_list(bh);

/* OK, FINALLY we know that this buffer is the only one of its kind,
* and that it's unused (b_count=0), unlocked, and clean.
*/
init_buffer(bh, dev, block, end_buffer_io_sync, NULL);
[..]

And look at init_buffer():

[..]
void init_buffer(struct buffer_head *bh, kdev_t dev, int block,
bh_end_io_t *handler, void *dev_id)
{
bh->b_count = 1;
^^^^^^^^^^^^^^^
bh->b_list = BUF_CLEAN;
[..]

Also after get_unused_buffer_head there is a b_count = 0 (that btw, looks
like not needed to me because a bh-header in the unused_list will be
zeroed for sure).

Maybe I missing something...

Andrea Arcangeli


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

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