Re: [PATCH] free_memory_available() fix

David Burrows (
Tue, 3 Mar 1998 11:49:55 +1000 (EST)

On Tue, 3 Mar 1998, Rik van Riel wrote:

> Hi there,
> Here's the patch to free_memory_available() in mm/page_alloc.c.
> The comment above the source code should give you enough
> info to get started on my algoritm...
> Please verify it, I've only compiled it :-(, but it
> should be correct nevertheless... (just remember to
> read it first).

I've patched pre5, and I'm witnessing a rather startling performance
increase.. I have 32mb ram, on my p133 running a pretty stock RH5 with
glibc 2.06.. Anyway, I have a 16mb swap partition, and I noticed that when
all the swap gets eaten up (eg 0 free swap) the system returns to its disk
chomping process blocking state.. :) I was disappointed, so I created a
16mb file, mkswapped it, swapon swapfile, and bingo everything is running
very sweet. I'm running X, Gimp, Netscape, x11amp, rxvts, and various
other memory chugging daemons, and the music is playing continuosly.. Well
Done! This is while loading a web page, running filters in Gimp etc, alt
tabbing between processes is impressively interactive.. :)

/me does multiple backflips! :)

[snadge@shed snadge]$ cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 31862784 31186944 675840 12169216 266240 12644352
Swap: 33218560 26337280 6881280
MemTotal: 31116 kB
MemFree: 660 kB
MemShared: 11884 kB
Buffers: 260 kB
Cached: 12348 kB
SwapTotal: 32440 kB
SwapFree: 6720 kB

That looks very right, even eating into 26mb swap, everything still works
great!!!! :) :) :)

rm -rf /mnt/win :)

> The patch is against 2.1.89-pre2, but judging from the
> posts to linux-kernel, it should apply to newer versions
> without a hitch.

That it does..



p.s: You rule! :)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to