Re: [PATCH] mm: implement swap prefetching

From: Bernd Eckenfels
Date: Mon Feb 06 2006 - 20:35:43 EST


Andrew Morton <akpm@xxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/