public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@clear.net.nz>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@digeo.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Faster SWSUSP free page counting
Date: Tue, 18 Mar 2003 22:09:48 +1200	[thread overview]
Message-ID: <1047982188.2204.8.camel@laptop-linux.cunninghams> (raw)
In-Reply-To: <20030318082008.GC10472@atrey.karlin.mff.cuni.cz>

Hi.

The speed difference depends of course upon the number of pages free and
the degree of fragmentation. I guess the easy answer is that it was
written and kept because it helped. Having talked to Andrew about the
use of page flags, I'll do some more changes before we put it to Linus -
I'll use a dynamically allocated bitmap instead of pageflags.

Regards,

Nigel

On Tue, 2003-03-18 at 20:20, Pavel Machek wrote:
> Hi!
> 
> > This patch improves the speed of SWSUSP's count_and_copy_data_pages
> > function by generating a map of the free pages before iterating through
> > the list of pages. The net result is to go from O(n^2) to O(n), if I
> > remember my computer science correctly.
> 
> Is the speed difference noticable?
> 
> If yes than okay, but generate_free_page_map() should still be moved
> into kernel/suspend.c.
> 								Pavel
-- 
Nigel Cunningham
495 St Georges Road South, Hastings 4201, New Zealand

Be diligent to present yourself approved to God as a workman who does
not need to be ashamed, handling accurately the word of truth.
	-- 2 Timothy 2:14, NASB.


      reply	other threads:[~2003-03-18 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 23:43 [PATCH] Faster SWSUSP free page counting Nigel Cunningham
2003-03-18  8:20 ` Pavel Machek
2003-03-18 10:09   ` 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=1047982188.2204.8.camel@laptop-linux.cunninghams \
    --to=ncunningham@clear.net.nz \
    --cc=akpm@digeo.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