public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: akpm@zip.com.au, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Hot/cold allocation -- swsusp can not handle hot pages
Date: Sat, 2 Nov 2002 10:46:12 -0800	[thread overview]
Message-ID: <20021102184612.GI23425@holomorphy.com> (raw)
In-Reply-To: <20021102181900.GA140@elf.ucw.cz>

On Sat, Nov 02, 2002 at 07:19:00PM +0100, Pavel Machek wrote:
> Swsusp counts free pages, and relies on fact that when it allocates
> page there's one free page less. That is no longer true with hot
> pages.
> I attempted to work it around but it seems I am getting hot pages even
> when I ask for cold one. This seems to fix it. Does it looks like
> "possibly mergable" patch?
> --- clean/mm/page_alloc.c	2002-11-01 00:37:44.000000000 +0100
> +++ linux-swsusp/mm/page_alloc.c	2002-11-01 22:53:47.000000000 +0100
> @@ -361,7 +361,7 @@
>  	unsigned long flags;
>  	struct page *page = NULL;
>  
> -	if (order == 0) {
> +	if ((order == 0) && !cold) {
>  		struct per_cpu_pages *pcp;
>  
>  		pcp = &zone->pageset[get_cpu()].pcp[cold];
> 

This doesn't seem to be doing what you want, even if it seems to work.
If you want there to be one free page less, then allocating it will
work regardless. What are you looking for besides that? If it's not
already working you want some additional semantics. Could this involve
is_head_of_free_region()? That should be solvable with a per-cpu list
shootdown algorithm to fully merge all the buddy bitmap things.


Bill

  reply	other threads:[~2002-11-02 18:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-02 18:19 Hot/cold allocation -- swsusp can not handle hot pages Pavel Machek
2002-11-02 18:46 ` William Lee Irwin III [this message]
2002-11-02 20:22   ` Pavel Machek
2002-11-02 21:48     ` Andrew Morton
2002-11-03 20:08       ` Pavel Machek
2002-11-03 20:14         ` William Lee Irwin III
2002-11-03 20:21         ` Andrew Morton
2002-11-03 20:26           ` Pavel Machek
2002-11-03 20:52         ` William Lee Irwin III
2002-11-03 21:22           ` William Lee Irwin III
2002-11-03 22:53           ` Pavel Machek

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=20021102184612.GI23425@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@zip.com.au \
    --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