Re: Avoiding *mandatory* overcommit...

From: Pavel Machek (pavel@suse.cz)
Date: Fri Mar 31 2000 - 16:09:44 EST


Hi!

> > Okay, so suppose you are using only memory you are allowed to use. Later
> > on, the system runs out of memory and swap. Your process touches one of its
> > pages that has been swapped out. The system must page in that page for you
> > in order for your process to continue running. The system, unfortunately,
> > cannot page in for your process since it can't page out because swap is
> > full. Please tell me what the system should do other than kill your process.
> ---
> 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.

Take a look at kernel memory allocation... There are kmallocs
everywhere. 1 page will not help anything.

BTW You need 6 pages in worst case on i386 _to make any progress at
all_. (Imagine instruction at page boundary, doing movsd from unaligned
doubleword on two pages to unaligned doubleword on other two pages.)
That means that system with less than 6 pages available to userspace
is dead!
                                                                Pavel

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

- 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