lkml.org 
[lkml]   [1998]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 'disposable' dirty pages [was: Out Of Memory in v. 2.1]
On Thu, Oct 08, 1998 at 03:19:55PM +0100, Alan Cox wrote:

> The interface doesnt seem hard
>
> mprotect(buf,len, MDISCARDABLE)
>
> and then mprotect it back to something normal to use it. If the
> semantics are "COW's the zero page if discarded else gives the
> existing page back" then everything mallocish falls nicely into
> place.

I really like this idea... we simple mark memory we still might want
to use, but have otherwise decided we don't care what's in it.

That way, if the kernel is short on memory, it can burgle some of
these pages, and when an application decides it wants these again, we
just put a blank page back in its place...

This still doesn't solve the problem of all OOM situation though,
what if an application starts using these `disposable' pages (which
have been unmapped) and we don't have any free memory to replace the
unmapped pages with?




-cw


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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.042 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site