mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
laptop-mode: Make flushes per-device
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: Matthew Garrett <mjg@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
9195291e5f
commit
31373d09da
4 changed files with 30 additions and 21 deletions
|
@ -96,8 +96,10 @@ static inline void inode_sync_wait(struct inode *inode)
|
|||
/*
|
||||
* mm/page-writeback.c
|
||||
*/
|
||||
void laptop_io_completion(void);
|
||||
void laptop_io_completion(struct backing_dev_info *info);
|
||||
void laptop_sync_completion(void);
|
||||
void laptop_mode_sync(struct work_struct *work);
|
||||
void laptop_mode_timer_fn(unsigned long data);
|
||||
void throttle_vm_writeout(gfp_t gfp_mask);
|
||||
|
||||
/* These are exported to sysctl. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue