aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/swap.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-09-26 02:32:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 11:48:58 -0400
commitab954160350c91c77ae03740ef90458c3ad5412c (patch)
tree28f99d765c2c6d497a1f5543b1867875cd6102a5 /include/linux/swap.h
parent3a4f7577c9ef393ca80c783f02ffbc125de771c7 (diff)
[PATCH] swsusp: write speedup
Switch the swsusp writeout code from 4k-at-a-time to 4MB-at-a-time. Crufty old PIII testbox: 12.9 MB/s -> 20.9 MB/s Sony Vaio: 14.7 MB/s -> 26.5 MB/s The implementation is crude. A better one would use larger BIOs, but wouldn't gain any performance. The memcpys will be mostly pipelined with the IO and basically come for free. The ENOMEM path has not been tested. It should be. Cc: Pavel Machek <pavel@ucw.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r--include/linux/swap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index a2f5ad7c2d2e..3d434cbffe26 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -12,6 +12,8 @@
12 12
13struct notifier_block; 13struct notifier_block;
14 14
15struct bio;
16
15#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ 17#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
16#define SWAP_FLAG_PRIO_MASK 0x7fff 18#define SWAP_FLAG_PRIO_MASK 0x7fff
17#define SWAP_FLAG_PRIO_SHIFT 0 19#define SWAP_FLAG_PRIO_SHIFT 0
@@ -216,7 +218,8 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *);
216/* linux/mm/page_io.c */ 218/* linux/mm/page_io.c */
217extern int swap_readpage(struct file *, struct page *); 219extern int swap_readpage(struct file *, struct page *);
218extern int swap_writepage(struct page *page, struct writeback_control *wbc); 220extern int swap_writepage(struct page *page, struct writeback_control *wbc);
219extern int rw_swap_page_sync(int, swp_entry_t, struct page *); 221extern int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page,
222 struct bio **bio_chain);
220 223
221/* linux/mm/swap_state.c */ 224/* linux/mm/swap_state.c */
222extern struct address_space swapper_space; 225extern struct address_space swapper_space;