Re: Avoiding *mandatory* overcommit...

From: Matija Nalis (mnalis-j@voyager.hr)
Date: Sat Apr 01 2000 - 07:13:41 EST


On 31 Mar 2000 13:18:30 +0200, Linda Walsh <law@sgi.com> wrote:
>David Schwartz wrote:
>> If you earmark swap pages for COW and don't let anything
>> else touch them, you'll have to kill processes when the kernel needs another
>> page even if there's plenty of free swap left. That doesn't seem to make a
>> lot of sense.
>---
> And why will the kernel need another page? It doesn't just keep growing
>randomly unless there is a memory leak (kernel bug).

For variuos reasons. Somebody called sysmlink() and filesystem driver needs
to allocate a page for copyfromuser(). Or somebody started backup, and tar
invoked open on /dev/st0, which triggered SCSI tape driver to allocate SCSI
buffer the size twice the requested block size. Or somebody tried to access
devices which is handled by kmod, and kernel now needs to insmod the driver.
Or any of billion other reasons. Kernel do allocate memory on demand, and
they need RAM (swap won't do).

There is no easy, nor cheap way to avoid this (you could probably make
kernel to just statically preallocate all memory it will ever need. Try at
and let me know it went.)

-- 
Opinions above are GNU-copylefted.

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



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:07 EST