[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101004175822.GK1518@ucw.cz>
Date: Mon, 4 Oct 2010 19:58:22 +0200
From: Pavel Machek <pavel@....cz>
To: Nigel Cunningham <nigel@...onice.net>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Linux PM <linux-pm@...ts.linux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
TuxOnIce-devel <tuxonice-devel@...onice.net>
Subject: Re: [PATCH] Hibernate: Implement readahead when resuming
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists