Re: Strange interrupt behaviour

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Wed, 15 Jul 1998 14:13:09 +0100


On Wed, Jul 15, 1998 at 02:04:04AM +0200, MOLNAR Ingo wrote:
> i'd do something like this to satisfy higher-order goals:
>
> if (makes_situation_better(this_candidate_page,order))
> swap_out(this_candidate_page);
>
> where 'makes_situation_better()' gives higher points if this given page
> fills out 'the last spot' in an order-sized bitmap-block of the
> buddy-bitmap. It gives higher points too if lower-order lists are not
> properly populated yet. (ie. we'd have less or zero chance to create a new
> N-th order free page). But it will give lower points if this swapout
> populates an already properly (or over-) populated list.
>
> This way we get a kind of percolation model, where lower-order pages grow
> randomly, actually reaching higher-order sooner or later.

Thinking of percolation, and the reverse page mapping stuff (that's
being written to walk vma lists, not full reverse page tables, right?).

On smaller memory machines, I intuit that if 25% free pages are needed
to find an 8k aligned region, as pages are being aggressively unmapped
to find this and then paged out or discarded, they're being pulled back
in just as quickly if they're in use.

We can't (yet) move data to a different page when it's mapped in a
process, because of the reverse mapping problem. But can we perhaps
move data that resides in the swap cache, instead of swapping it out or
discarding it? To encourage old pages to good `makes_situation_better'
places and new pages (which are likely to be reused soon) away from
there?

When a large region is required, the copies could be done synchronously
with the last unmapping of page in try_to_swap_out. Perhaps the
probability of copying a page when it is unmapped can be varied, up to
100% when a large region is required, and lower at other times for newer
pages.

-- Jamie

-
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.altern.org/andrebalsa/doc/lkml-faq.html