public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-kernel@vger.kernel.org
Cc: Pavel Machek <pavel@ucw.cz>, Andrew Morton <akpm@osdl.org>
Subject: Re: [swsusp] Rework image freeing
Date: Fri, 23 Sep 2005 23:19:06 +0200	[thread overview]
Message-ID: <200509232319.07380.rjw@sisk.pl> (raw)
In-Reply-To: <200509232252.53237.rjw@sisk.pl>

On Friday, 23 of September 2005 22:52, Rafael J. Wysocki wrote:
> Hi,
> 
> On Thursday, 22 of September 2005 11:46, Pavel Machek wrote:
> > Hi!
> > 
> > > > -
> > > > -/**
> > > > - *	calc_nr - Determine the number of pages needed for a pbe list.
> > > > - */
> > > > -
> > > > -static int calc_nr(int nr_copy)
> > > > -{
> > > > -	return nr_copy + (nr_copy+PBES_PER_PAGE-2)/(PBES_PER_PAGE-1);
> > > > -}
> > > 
> > > I can't see why you are going to drop this function.  Isn't it necessary any more?
> > 
> > I've actually decreased on-disk memory requirements by... guess what:
> > (nr_copy+PBES_PER_PAGE-2)/(PBES_PER_PAGE-1) factor. I do not store two
> > copies of page directories any more.
> 
> On-disk - yes, but we still need to allocate RAM to create the "pagedir".
> It takes ca (nr_copy_pages/(PBS_PER_PAGE-1) + !!(nr_copy_pages % (PBS_PER_PAGE-1))),

Sorry, this is not the right number, of course.  Should be
(nr_copy_pages/PBS_PER_PAGE + !!(nr_copy_pages % PBS_PER_PAGE))

Greetings,
Rafael


-- 
- 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-09-23 21:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-21 20:51 [swsusp] Rework image freeing Pavel Machek
2005-09-21 20:58 ` Andrew Morton
2005-09-21 21:19   ` Pavel Machek
2005-09-21 21:31     ` Andrew Morton
2005-09-21 21:11 ` Dave Hansen
2005-09-21 21:18 ` Dave Hansen
2005-09-21 21:23   ` Pavel Machek
2005-09-21 22:53 ` Rafael J. Wysocki
2005-09-22  4:54   ` Rafael J. Wysocki
2005-09-22  9:46   ` Pavel Machek
2005-09-23 20:52     ` Rafael J. Wysocki
2005-09-23 21:19       ` 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=200509232319.07380.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@osdl.org \
    --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