> The point is that 2.1.x has the swap cache. Currently the swap cache is
> only an overhead since as now it isn' t caching nothing. The swap cache
> currently make sense only if nobody would write on the swapped out pages
> anymore. I am currently working (also Sthepen is working on that) to give
> a _sense_ to the swap cache since it seems to be the right thing to do. In
> real world I am pretty sure that my funny patch would work be faster than
> use the swap cache to avoid the swapin but the cache approch is more
> generic (works also if the parent process remap it' s memroy for example
> (pointed out by sct)).
It may be that a simple change to the swap cache policy would help keep pages
cached for situations like this. Currently pages are removed from the swap
cache when the last in-memory use is retired, but instead we could test the
swap_map use count and kept the page cached if there were multiple
references. Then it would be likely that a subsequent use would find the
cached page and not need a swap-in.
There's no harm in doing this, as the page could be reclaimed by shrink_mmap
if the system needs the memory. Perhaps Stephen can comment on whether this
would be effective ...
Regards,
Bill
-
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/