Jens Axboe writes:
It's a heuristic, and sometimes that will work well and sometimes it will not. What if during this period of inactivity, you start bringing everything in from swap again, only to page it right out because the next memory hog starts running? From a logical standpoint, swap prefetch and the vm must work closely together to avoid paging in things which really aren't needed.
If the system is idle it doesn't cost anything to bring those pages in (laptop mode disables any prefetching if you're thinking about power consumption on laptops). And if the system wants the ram that has been filled with prefetched pages wrongly, the prefetched pages are at the tail end of the inactive LRU list with a copy on backing store so if they're not accessed they'll be the first thing dropped in preference to anything else, without any I/O.
Cheers, Con
Attachment:
pgpEzI5hQElJo.pgp
Description: PGP signature
- Follow-Ups:
- Re: [ck] Re: -mm merge plans
- From: Jens Axboe <[email protected]>
- Re: [ck] Re: -mm merge plans
- References:
- -mm merge plans
- From: Andrew Morton <[email protected]>
- Re: -mm merge plans
- From: "Ryan M." <[email protected]>
- Re: [ck] Re: -mm merge plans
- From: Jens Axboe <[email protected]>
- -mm merge plans
- Prev by Date: Re: [TCP]: rcvbuf lock when tcp_moderate_rcvbuf enabled
- Next by Date: Re: passing command line args to the kernel
- Previous by thread: Re: [ck] Re: -mm merge plans
- Next by thread: Re: [ck] Re: -mm merge plans
- Index(es):