Re: mke2fs - Cant get free page

Dr. Werner Fink (werner@suse.de)
Fri, 15 Aug 1997 16:35:37 +0200


>
> I have seen Couldn't get a free page under 2.0.29
> with a _defect_ SCSI disk connected to an NCR.
> mke2fs slowed down to a hlt and the kernel gave lots of
> free page complaints, but no SCSI message.
>
> I have tested the (new :-( ) harddisk in 2 other machines
> afterwards and got SCSI Error.

Under high stress it's possible to trigger this "Couldn't get a free page"
with 2.0.29 ... an old fact. The risk is much higher under 2.0.30
... it was a long fight to let this message disapear. Now with a few
change to avoid deadlocks in buffer code the message is back :-(

There is the difference of my last patch on daveM's pre-patch-2.0.31-2
and the current pre-patch-2.0.31-6.

Here the last few lines of refill_freelist() in fs/buffer.c of
pre-patch-2.0.31-2-daveM

-----
if (nr_free_pages > 5) {
/* and repeat until we find something good */
if (grow_buffers(GFP_ATOMIC, size)) {
needed -= PAGE_SIZE;
goto repeat;
};
}

wakeup_bdflush(1);
}
-----

and in comparison the lines of refill_freelist() in fs/buffer.c of
pre-patch-2.0.31-6

-----
/*
* In order to protect our reserved pages,
* return now if we got any buffers.
*/
if (free_list[BUFSIZE_INDEX(size)])
return;

/* and repeat until we find something good */
if (!grow_buffers(GFP_ATOMIC, size))
wakeup_bdflush(1);

/* decrease needed even if there is no success */
needed -= PAGE_SIZE;
goto repeat;
}
-----

Note: the last two statements are identical with 2.0.29 (only
a comment and a empty line is added :).

Werner