Re: How to read-protect a vm_area?

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Tue, 17 Feb 1998 10:28:36 +0100 (MET)


On Mon, 16 Feb 1998, Linus Torvalds wrote:
> On Tue, 17 Feb 1998, Itai Nahshon wrote:
> > When free memory became low the pager started to mark pages as "not present"
> > for the hardware (but not swap them out yet), and put these pages on the
> > free page list. A separate bit tells the software that the page is still
> > there. If such page is accessed, it causes a page fault trap. The trap
> > handler just needs to turn on the "present" and the simulated "accessed"
> > bits, (some list manipulation was also involved). these events are counted as
> > "reclaims" by vmstat.
>
> Linux does some similar tricks with the dirty bits and the "swap cache".
> Not the same, but the basic ideas are fairly similar.

It would be _very_ nice to do the 'inactive-list-thingy'
with Linux too. If we have 1/4th of memory inactive, the
fragmentation problem becomes moot... We just have to do
some bookkeeping to make sure that Linux will keep large
free area's from allocating (just don't reclaim pages if
nr_free_pages_bigorder < min_free_pages / 2 and the page
is in DMAable memory).

All we need to do for that is implementing the swap cache
for pagecached pages too. And we need to allocate order-0
and order-1 pages from the top of memory (still have that
patch lying around).

Linus' patch makes most of this possible, but how do I do
the pagecache swap-cache thingy?
And, of course, we need to reuse the oldest non-dma freed
page first, but that can be done relatively simply.

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu