mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Coywolf Qi Hunt <coywolf@sosdg.org>
To: pavel@suse.cz
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [patch] SUSPEND_PD_PAGES-fix
Date: Wed, 16 Mar 2005 15:28:00 -0500	[thread overview]
Message-ID: <20050316202800.GA22750@everest.sosdg.org> (raw)


Hello,

This fixes SUSPEND_PD_PAGES, which wastes one page under most cases.


	Coywolf


Signed-off-by: Coywolf Qi Hunt <coywolf@gmail.com>
diff -pruN 2.6.11-mm4/include/linux/suspend.h 2.6.11-mm4-cy/include/linux/suspend.h
--- 2.6.11-mm4/include/linux/suspend.h	2005-03-17 01:22:16.000000000 +0800
+++ 2.6.11-mm4-cy/include/linux/suspend.h	2005-03-17 04:14:16.000000000 +0800
@@ -34,7 +34,7 @@ typedef struct pbe {
 #define SWAP_FILENAME_MAXLENGTH	32
 
 
-#define SUSPEND_PD_PAGES(x)     (((x)*sizeof(struct pbe))/PAGE_SIZE+1)
+#define SUSPEND_PD_PAGES(x)     (((x)*sizeof(struct pbe)+PAGE_SIZE-1)/PAGE_SIZE)
 
 extern dev_t swsusp_resume_device;
    

             reply	other threads:[~2005-03-16 20:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16 20:28 Coywolf Qi Hunt [this message]
2005-03-18 11:39 ` Pavel Machek
2005-03-18 13:34   ` Rafael J. Wysocki
2005-03-18 18:56     ` Rafael J. Wysocki
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=20050316202800.GA22750@everest.sosdg.org \
    --to=coywolf@sosdg.org \
    --cc=akpm@osdl.org \
    --cc=coywolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.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®