Re: [PATCH] Hibernate: Implement readahead when resuming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> Add support for submitting reads before they're needed. This greatly
> improves the speed of resuming:
> 
> From
> 
> PM: Image read at 66 MB/s.
> 
> to
> 
> PM: Image read at 229 MB/s.
> 
> ...and removes the need for the sync_read flag.

Hmm, not bad.

> @@ -67,13 +70,14 @@ static void hib_end_bio(struct bio *bio, int err)
>   *	@off	physical offset of page.
>   *	@page:	page we're reading or writing.
>   *	@sync:	whether the i/o should be done synchronously
> + *	@ra:	whether the page is readahead
>   *

This sync flag?

Merge sync and ra into 'flags' to make code easier to read?

>   *	Straight from the textbook - allocate and initialize the bio.
>   *	If we're reading, make sure the page is marked as dirty.
>   *	Then submit it and, if @sync, wait.
>   */
>  static int submit(int rw, struct block_device *bdev, sector_t sector,
> -		struct page *page, int sync)
> +		struct page *page, int sync, int ra)
>  {
>  	const int bio_rw = rw | REQ_SYNC | REQ_UNPLUG;
>  	struct bio *bio;

> +	printk("(1) Submitting readahead of sector %llu to page %p.\n",
> +			offset, ra_page);

KERN_INFO?

> +	return submit(READ, hib_resume_bdev, offset * (PAGE_SIZE >> 9),
> +			ra_page, 0, 1);
> +}
> +
> +int start_more_readahead(void)

Too generic name for global function?

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux