This is how swap cache works :-)
Werner
>
> So after a while most of the main memory should be pre-swapped ie on disk.
> When the system needs memory : just go through the page structure and
> free pages according to whatever algo you want and swap it out,
> as pages are already on disk you just need to mark in NOT IN MEMORY
> and that's all.
> Of course you have to be sure that the page pre-swapped is really the
> same as the page in memory... (maybe this is the hard part)
> If you access a pre-swapped page in write mode mark it as DIFFERENT from
> the pre-swapped image and free the pre-swapped image.
> This way kswap should to most of its disk activity when the system is idle
> and keep the maximum of pages in memory but ready to be freed...
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu