lkml.org 
[lkml]   [1997]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [partial fix?] Re: Badblocks and no free pages...
Date
Dr. Werner Fink wrote:
>> Does the following patch help a bit in those scenarios?
>> (it looks as if those two lines were supposed to be there by design --
>> they perfectly match the existing comment above them :-)
>>
>> Gadi
>>
>> --- linux/fs/buffer.c~ Mon May 5 14:55:14 1997
>> +++ linux/fs/buffer.c Mon May 5 14:55:14 1997
>> @@ -676,6 +676,8 @@
>> * now so as to ensure that there are still clean buffers available
>> * for user processes to use (and dirty).
>> */
>> + while(nr_buffers_type[BUF_DIRTY] > nr_buffers * bdf_prm.b_un.nfract/100)
>> + wakeup_bdflush(1);
>>
>> /* We are going to try to locate this much memory. */
>> needed = bdf_prm.b_un.nrefill * size;
>>
>
>
>
>What's about the folowing lines upto line 754 (goto repeat;)? It look's like
>the comment points to this code. In line 751/752 there is the needed
>wakeup_bdflush(1) ... isn't it?
>

My problem is I never studied linux buffermanagement much. I think
getblk() is a better place to fix than refill_freelist(), as getblk()
knows about the device. The fix should be something like:

if ( "nr of dirtybufs for this device" > "max nr of dirtybufs for a device" ) {
"mark some/all buffers for this device to be written"
wakeup_bdflush(1);
}

I am not sure it is allowed here to wait: "wakeup_bdflush(1)"
This should slow down new I/O actions for a single device before the other
processes slow down.

To do this we need "dirty counters per device", but how to implement these?

Chel

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