Re: [PATCH] laptop-mode-2.6.0, version 5

From: Andrew Morton
Date: Fri Jan 02 2004 - 16:06:11 EST


Bart Samwel <bart@xxxxxxxxx> wrote:
>
> Find attached version 5 of the laptop-mode patch. It includes the
> following changes:
>
> * Fix for supporting 64-bit sector_t (thanks hugang!)

%Lu expects an unsigned long long argument and nothing else, so we should
cast this sector_t to unsigned long long, not u64.

With u64 this code will generate a warning on ppc64 (at least), because
ppc64's u64 is unsigned long.

> * Simplified the design a bit, saved us a timer. It now only wakes up
> kupdate to write back stuff: kupdate disregards age while laptop_mode is
> active, so it writes back everything anyway.
>
> * balance_dirty_pages does it's job again in laptop mode. However, when
> it decides to write back pages, it now also calls disk_is_spun_up(),
> which makes sure that the remainder of the dirty pages are written
> immediately as well. That means that if a writer writes an amount of
> data that is about 50% of memory, and dirty_ratio is 40%, that the disk
> will spin up after 4/5ths of the data is written, will write the full
> 4/5ths of the data at once, and then the disk can spin down again
> because the remaining 10% will be not be written until the next spin-up.

hum, OK, I'll tkae a look at that, thanks.

> * The control script now sets dirty_background_ratio to the same value
> as dirty_ratio, so that background writes are effectively disabled. This
> enables a writer to fill up up to dirty_ratio (default 40%) of the
> memory with dirty blocks before the disk is spun up.
>
> * Includes control script (scripts/laptop_mode).
>
> * Includes docs (Documentation/laptop-mode.txt).

Can you please place the control script inside laptop-mode.txt rather than
in scripts/? The scripts directory is for kernel build tools, not for
kernel runtime support things.

Thanks.
-
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/