mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Namhyung Kim <namhyung.kim@lge.com>
Cc: Namhyung Kim <namhyung@gmail.com>, Pavel Machek <pavel@ucw.cz>,
	Len Brown <len.brown@intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM / Hibernate: Correct additional page calculation
Date: Tue, 17 Jan 2012 23:54:49 +0100	[thread overview]
Message-ID: <201201172354.49708.rjw@sisk.pl> (raw)
In-Reply-To: <1326768189-13074-1-git-send-email-namhyung.kim@lge.com>

On Tuesday, January 17, 2012, Namhyung Kim wrote:
> The struct bm_block is allocated by chain_alloc(),
> so it'd better counting it in LINKED_PAGE_DATA_SIZE.

Yes, good catch, thanks!

I'm going to push this to Linus in the next round of fixes.

Thanks,
Rafael


> Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
> ---
>  kernel/power/snapshot.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
> index cbe2c1441392..7196d3c023e1 100644
> --- a/kernel/power/snapshot.c
> +++ b/kernel/power/snapshot.c
> @@ -812,7 +812,8 @@ unsigned int snapshot_additional_pages(struct zone *zone)
>  	unsigned int res;
>  
>  	res = DIV_ROUND_UP(zone->spanned_pages, BM_BITS_PER_BLOCK);
> -	res += DIV_ROUND_UP(res * sizeof(struct bm_block), PAGE_SIZE);
> +	res += DIV_ROUND_UP(res * sizeof(struct bm_block),
> +			    LINKED_PAGE_DATA_SIZE);
>  	return 2 * res;
>  }
>  
> 


      reply	other threads:[~2012-01-17 22:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17  2:43 Namhyung Kim
2012-01-17 22:54 ` Rafael J. Wysocki [this message]

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=201201172354.49708.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@gmail.com \
    --cc=pavel@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®