Messages in this thread | | | From | (Bernd Eckenfels) | Subject | Re: [PATCH] mm: implement swap prefetching | Date | Tue, 07 Feb 2006 02:37:36 +0100 |
| |
Andrew Morton <akpm@osdl.org> wrote: >> +/* >> + * How many pages to prefetch at a time. We prefetch SWAP_CLUSTER_MAX * >> + * swap_prefetch per PREFETCH_INTERVAL, but prefetch ten times as much at a >> + * time in laptop_mode to minimise the time we keep the disk spinning. >> + */ >> +static inline unsigned long prefetch_pages(void) >> +{ >> + return (SWAP_CLUSTER_MAX * swap_prefetch * (1 + 9 * !!laptop_mode)); >> +} > > I don't think this should be done in-kernel. There's a nice script to > start and stop laptop mode. We can make this decision in that script.
I agree, the default could be depending on laptop mode, but if a value is specified or changed by sysctl, it should not be automatically tuned (in that case)
Gruss Bernd - 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/
| |