Re: Avoiding *mandatory* overcommit...

From: Linda Walsh (law@sgi.com)
Date: Fri Mar 31 2000 - 00:16:43 EST


David Schwartz wrote:
>
> > One would assume the kernel always maintains at least 1
> > page for its own
> > paging purposes. So I touch my swapped out page. The kernel
> > reads my page into
> > the 'last page', and immediately pages out some other page,
> > regaining its "last
> > page". Repeat as necessary. It's a memory thrashing situation,
> > but not fatal.
>
> Fine, until some process touches a COW page and then the one spare page is
> gone.

---
	??? COW pages automatically have Virtual Memory reserved in a non-overcommit
environment. 

> Just because you reserved the space for COW doesn't mean that > something else won't come along and grab the space you reserved before you > get a chance to. --- ??? What's going to take it? The kernel won't hand it out. Are external programs going to modify kernel structure by writing to /dev/kmem or something?

> 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).

It should only need another page because of a request by some process to 'do' something or a request by kernel audit for another audit buffer if the audit demon isn't keeping up. At which point, if you want reliable auditing, the kernel puts the process that generated the audit record to sleep. Eventually auditd catches up or all processes hang waiting for audit buffers assuring that no more auditable events take place. As for other processes asking the kernel to 'do' something -- they get told "no".

-l

-- Linda A Walsh | Trust Technology, Core Linux, SGI law@sgi.com | Voice: (650) 933-5338

- 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 Mar 31 2000 - 21:00:28 EST