linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@linuxmail.org>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	Linux Memory Management <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Suspend 2 merge: 43/51: Utility functions.
Date: Mon, 29 Nov 2004 08:36:15 +1100	[thread overview]
Message-ID: <1101677775.4343.262.camel@desktop.cunninghams> (raw)
In-Reply-To: <1101571874.8940.4383.camel@localhost>

Hi.

On Sun, 2004-11-28 at 03:11, Dave Hansen wrote:
> On Thu, 2004-11-25 at 16:04, Nigel Cunningham wrote:
> > On Fri, 2004-11-26 at 10:46, Pavel Machek wrote:
> > > How many bits do you need? Two? I'd rather use thow two bits than have
> > > yet another abstraction. Also note that it is doing big order
> > > allocation.
> > 
> > Three if checksumming is enabled IIRC. I'll happily use normal page
> > flags, but we only need them when suspending, and I understood they were
> > rarer than hen's teeth :>
> > 
> > MM guys copied so they can tell me I'm wrong :>
> 
> Please remember that, in almost all cases, any use of page->flags can be
> replaced by a simple list.  Is a page marked foo?  Well, just traverse
> this data structure and see if the page is in there.  It might be a
> stinking slow check, but it will *work*.
> 
> I think we're up to using 1 bit in the memory hotplug code, but we don't
> even need that if some operations can be implemented more slowly.  

Yes. That's the way suspending did things initially like checking which
pages were free. The bitmap was added to turn O(n^2) into O(n). Since
the calculations can potentially be done a few times (as memory is freed
so we can suspend), it was a big gain to use a bitmap.

Regards,

Nigel
-- 
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly.		-- Romans 5:6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

      reply	other threads:[~2004-11-28 21:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1101292194.5805.180.camel@desktop.cunninghams>
     [not found] ` <1101299832.5805.371.camel@desktop.cunninghams>
     [not found]   ` <20041125234635.GF2909@elf.ucw.cz>
2004-11-26  0:04     ` Nigel Cunningham
2004-11-27 16:11       ` Dave Hansen
2004-11-28 21:36         ` Nigel Cunningham [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=1101677775.4343.262.camel@desktop.cunninghams \
    --to=ncunningham@linuxmail.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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