public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Aubrey <aubreylee@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC][PATCH] Fix area->nr_free-- went (-1) issue in buddy system
Date: Tue, 19 Dec 2006 14:46:56 +1100	[thread overview]
Message-ID: <458760B0.7090803@yahoo.com.au> (raw)
In-Reply-To: <6d6a94c50612181901m1bfd9d1bsc2d9496ab24eb3f8@mail.gmail.com>

Aubrey wrote:
> Hi all,
> 
> When I setup two zones (NORMAL and DMA) in my system, I got the
> following wired result from /proc/buddyinfo.
> ----------------------------------------------------------------------------------------- 
> 
> root:~> cat /proc/buddyinfo
> Node 0, zone      DMA      2      1      2      1      1      0      0
>     1      1      2      2      0      0      0
> Node 0, zone   Normal      1      1      1      1      1      1      0
>     0 4294967295      0 4294967295      2      0      0
> ----------------------------------------------------------------------------------------- 
> 
> 
> As you see, two area->nr_free went -1.
> 
> After dig into the code, I found the problem is in the fun
> __free_one_page() when the kernel boot up call free_all_bootmem(). If
> two zones setup, it's possible NORMAL zone merged a block whose order
> =8 at the first time(this time zone[NORMA]->free_area[8].nr_free = 0)
> and found its buddy in the DMA zone. So the two blocks will be merged
> and area->nr_free went to -1.

This should not happen because the pages are checked to ensure they are
from the same zone before merging.

What kind of system do you have? What is the dmesg and the .config? It
could be that the zones are not properly aligned and CONFIG_HOLES_IN_ZONE
is not set.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

--
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:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-12-19  3:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-19  3:01 [RFC][PATCH] Fix area->nr_free-- went (-1) issue in buddy system Aubrey
2006-12-19  3:46 ` Nick Piggin [this message]
2006-12-19  6:16   ` Aubrey
2006-12-19  6:34     ` Nick Piggin
2006-12-19  7:41       ` Aubrey

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=458760B0.7090803@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=aubreylee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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