Messages in this thread | | | From | Chel van Gennip <> | Subject | Re: [partial fix?] Re: Badblocks and no free pages... | Date | Mon, 5 May 1997 19:12:11 +0100 (WETDST) |
| |
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
| |