All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Nigel Cunningham <nigel@tuxonice.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Linux PM <linux-pm@lists.linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	TuxOnIce-devel <tuxonice-devel@tuxonice.net>
Subject: Re: [PATCH] Hibernate: Implement readahead when resuming
Date: Mon, 4 Oct 2010 19:58:22 +0200	[thread overview]
Message-ID: <20101004175822.GK1518@ucw.cz> (raw)
In-Reply-To: <1285416056-9735-2-git-send-email-nigel@tuxonice.net>

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

  parent reply	other threads:[~2010-10-04 17:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25 12:00 Nigel's current for-rafael queue - one more patch Nigel Cunningham
2010-09-25 12:00 ` [PATCH] Hibernate: Implement readahead when resuming Nigel Cunningham
2010-09-25 19:02   ` Martin Steigerwald
2010-09-25 19:02   ` [linux-pm] " Martin Steigerwald
2010-09-25 19:58     ` Martin Steigerwald
2010-09-25 19:58     ` [linux-pm] " Martin Steigerwald
2010-09-25 20:37       ` with init=/bin/systemd USB/eSATA external mass storage no longer works (was: Re: [linux-pm] [PATCH] Hibernate: Implement readahead when resuming) Martin Steigerwald
2010-09-25 20:37       ` with init=/bin/systemd USB/eSATA external mass storage no longer works (was: " Martin Steigerwald
2010-09-25 21:24       ` [TuxOnIce-devel] [linux-pm] [PATCH] Hibernate: Implement readahead when resuming Nigel Cunningham
2010-09-25 22:10         ` Martin Steigerwald
2010-09-25 22:37           ` Nigel Cunningham
2010-09-28  8:06             ` Martin Steigerwald
2010-09-28  9:56               ` [TuxOnIce-devel] " Martin Steigerwald
2010-09-28  9:56               ` [TuxOnIce-devel] [linux-pm] " Martin Steigerwald
2010-09-28 11:09                 ` [TuxOnIce-devel] " Bojan Smojver
2010-09-28 11:09                 ` [linux-pm] " Bojan Smojver
2010-09-28  8:06             ` Martin Steigerwald
2010-09-25 22:37           ` Nigel Cunningham
2010-09-25 22:10         ` Martin Steigerwald
2010-09-25 21:24       ` Nigel Cunningham
2010-09-25 21:18     ` [linux-pm] " Nigel Cunningham
2010-09-25 21:18     ` Nigel Cunningham
2010-09-25 21:18     ` Nigel Cunningham
2010-10-04 17:58   ` Pavel Machek [this message]
2010-10-04 17:58   ` Pavel Machek
2010-09-25 12:00 ` Nigel Cunningham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101004175822.GK1518@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nigel@tuxonice.net \
    --cc=rjw@sisk.pl \
    --cc=tuxonice-devel@tuxonice.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.