> > > This makes it rather hard to go around trying to free pages
> > > within a certain physical range.
> >
> > Well, what does kernel do when it runs out of memory ? For example when I
> > mmap a large file and start reading it back and force ?
>
> It doesn't care which physical page it gets. Processes being freeing
> up/swapping pages they have mappings to. The map counts hit zero and the
> page is discarded.
Right, but instead of trying to balance cache available memory and swap
my swapper will only be concerned whether the page can be evicted and
whether it is from the address range I want.
The scheme is like:
open -> request buffer allocation -> start region_swapper ->
-> wait for freed memory to accumulate and reserve as it appears ->
-> when enough is available stop swapper and declare allocation finished
Vladimir Dergachev
>
> Alan
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/