Messages in this thread | | | Date | Tue, 31 Mar 1998 15:34:38 +0200 | From | "Dr. Werner Fink" <> | Subject | Re: Magic in swap code. :-) |
| |
> I am not a kernel hacker but a read carefully this thread about swap > performence... > And I have a idea, don't know if it is good or bad so here it is as is : > > Lets implement a state of kswap where it tries to pre-swap a page, > to pre-swap a page is just put it on disk mark it in the page structure > as being on disk but KEEP it in memory.
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
| |