• Matthew Garrett's avatar
    laptop-mode: Make flushes per-device · 31373d09
    Matthew Garrett authored
    One of the features of laptop-mode is that it forces a writeout of dirty
    pages if something else triggers a physical read or write from a device.
    The current implementation flushes pages on all devices, rather than only
    the one that triggered the flush. This patch alters the behaviour so that
    only the recently accessed block device is flushed, preventing other
    disks being spun up for no terribly good reason.
    Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
    Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    31373d09
page-writeback.c 36.2 KB