Re: Linux-2.2.0 bad VM behaviour "dd if=/dev/zero of=/dev/hdc bs=256k"

Stephen C. Tweedie (sct@redhat.com)
Mon, 8 Feb 1999 15:59:14 GMT


Hi,

On Fri, 05 Feb 1999 17:28:27 MET, Heinz Mauelshagen
<mauelsha@ez-darmstadt.telekom.de> said:

> After thinking about refile_buffer and wakeup conditions for bdflush
> for a while i came to the following solution.

> It takes care of a fixed minimum of free buffers in the buffer cache.

Can you try the following very simple condition?

if (nr_buffers_type[BUF_DIRTY] > too_many) {
if (nr_buffers_type[BUF_LOCKED] > 2 * bdf_prm.b_un.ndirty)
wakeup_bdflush(1);
else
wakeup_bdflush(0);

In the long run I think we need a separate buffer class (say,
BUF_WORTHLESS :) for buffers which have been unlocked after write but
which have never been read, and to reuse these on an LRU basis when we
need new buffer heads. That will automatically recycle dirty buffers
during intensive write operations without exerting any pressure at all
on the rest of the VM. The old buffer cache used to do this anyway,
running LRU before growing the buffer cache if we were out of free
pages, and it makes a lot of sense to keep this behaviour for write
buffers.

--Stephen

-
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/