public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: coywolf@gmail.com, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] SUSPEND_PD_PAGES-fix
Date: Fri, 18 Mar 2005 19:56:43 +0100	[thread overview]
Message-ID: <200503181956.46089.rjw@sisk.pl> (raw)
In-Reply-To: <200503181434.59214.rjw@sisk.pl>

On Friday, 18 of March 2005 14:34, Rafael J. Wysocki wrote:
> Hi,
> 
> On Friday, 18 of March 2005 12:39, Pavel Machek wrote:
> > Hi!
> > 
> > 
> > > This fixes SUSPEND_PD_PAGES, which wastes one page under most cases.
> > 
> > Ok, applied to my tree, will eventually propagate it. (I hope it looks
> > okay to you, rafael).
> 
> SUSPEND_PD_PAGES is not necessary in swsusp any more. :-)  We can just
> drop it, together with the pagedir_order variable, which is not used.  I'll
> send a patch later today.

The patch follows.

Greets,
Rafael


Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

diff -Nrup linux-2.6.12-rc1/include/linux/suspend.h linux-2.6.12-rc1-a/include/linux/suspend.h
--- linux-2.6.12-rc1/include/linux/suspend.h	2005-03-18 18:50:15.000000000 +0100
+++ linux-2.6.12-rc1-a/include/linux/suspend.h	2005-03-18 18:58:27.000000000 +0100
@@ -34,8 +34,6 @@ typedef struct pbe {
 #define SWAP_FILENAME_MAXLENGTH	32
 
 
-#define SUSPEND_PD_PAGES(x)     (((x)*sizeof(struct pbe))/PAGE_SIZE+1)
-
 extern dev_t swsusp_resume_device;
    
 /* mm/vmscan.c */
diff -Nrup linux-2.6.12-rc1/kernel/power/swsusp.c linux-2.6.12-rc1-a/kernel/power/swsusp.c
--- linux-2.6.12-rc1/kernel/power/swsusp.c	2005-03-18 18:50:18.000000000 +0100
+++ linux-2.6.12-rc1-a/kernel/power/swsusp.c	2005-03-18 18:59:46.000000000 +0100
@@ -98,7 +98,6 @@ unsigned int nr_copy_pages __nosavedata 
  */
 suspend_pagedir_t *pagedir_nosave __nosavedata = NULL;
 static suspend_pagedir_t *pagedir_save;
-static int pagedir_order __nosavedata = 0;
 
 #define SWSUSP_SIG	"S1SUSPEND"
 
@@ -1219,7 +1218,6 @@ static int check_header(void)
 		return -EPERM;
 	}
 	nr_copy_pages = swsusp_info.image_pages;
-	pagedir_order = get_bitmask_order(SUSPEND_PD_PAGES(nr_copy_pages));
 	return error;
 }
 

-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
		-- Lewis Carroll "Alice's Adventures in Wonderland"

  reply	other threads:[~2005-03-18 18:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16 20:28 [patch] SUSPEND_PD_PAGES-fix Coywolf Qi Hunt
2005-03-18 11:39 ` Pavel Machek
2005-03-18 13:34   ` Rafael J. Wysocki
2005-03-18 18:56     ` Rafael J. Wysocki [this message]
2005-03-19  0:02       ` Pavel Machek
2005-03-18 15:56   ` Coywolf Qi Hunt

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=200503181956.46089.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@osdl.org \
    --cc=coywolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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