Re: Buffer Memory

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Thu, 11 Jun 1998 06:43:52 +0200 (MET DST)


On Wed, 10 Jun 1998, Heinz Mauelshagen wrote:

> Buffer cache eats up main protions of physical memory in any i/o
> intensive situation, no matter what /proc/sys/vm/buffermem percentage tells.
>
> The following patch fixes this at least for me &*)

> --- linux-2.1.105/fs/buffer.c Wed Jun 10 17:30:40 1998
> +++ linux-2.1.105/fs/buffer.c.orig Fri Jun 5 07:53:50 1998
>
> - if ( nr_free_pages < freepages.min * 2 ||
> - ( buffermem >> PAGE_SHIFT) * 100 >
> - buffer_mem.max_percent * num_physpages) return 0;
> -

o Patch is reverse :)
o This can give some nasty deadlocks, better would be to
allocate one 'last' page to the buffer memory, call
bdflush, schedule and return. This might give us enough
delay to clear things up.
o Something like this, written by me, got rejected by
Linus once for the very same reason I just outlined :)

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu