All of lore.kernel.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 17:34:39 +1100	[thread overview]
Message-ID: <458787FF.6080404@yahoo.com.au> (raw)
In-Reply-To: <6d6a94c50612182216r15cd99a3p59bbe3d49cb482f0@mail.gmail.com>

Hi Aubery!

Aubrey wrote:
> Hi Nick,
> 
> Thanks for your reply again, ;-).
> 
> On 12/19/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> 
>>
>> This should not happen because the pages are checked to ensure they are
>> from the same zone before merging.
> 
> 
> How? page_is_buddy() only check if the buddy has the buddy flag and
> has the same order.
> Where can I find the same zone is checked?

Ah OK, you're using 2.6.16? Later kernels have a check for this. I
guess you could backport it?

> 
>>
>> What kind of system do you have? What is the dmesg and the .config?
> 
> 
> I'm using the blackfin uclinux. dmesg and .config is attached.
> 
>> It could be that the zones are not properly aligned and 
>> CONFIG_HOLES_IN_ZONE
>> is not set.
> 
> 
> I changed the code in paging_init(), see below:
> -----------------------------------------
> #if 0
>                zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> 
> PAGE_SHIFT;
>                zones_size[ZONE_NORMAL] = 0;
> #else
>                zones_size[ZONE_DMA] = (end_mem/2 - PAGE_OFFSET) >> 
> PAGE_SHIFT;
>                zones_size[ZONE_NORMAL] = (end_mem/2 - PAGE_OFFSET) >>
> PAGE_SHIFT;
> #endif
> -----------------------------------------
> This is only what I did the change. I also suspect the zones are not
> properly aligned, But how to align it? I think our system doesn't need
> CONFIG_HOLES_IN_ZONE.

That's right. I guess you can either align your zone sizes (must be
aligned to MAX_ORDER size), or add the zone check in page_is_buddy.

Hope that works.

Nick

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

WARNING: multiple messages have this Message-ID (diff)
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 17:34:39 +1100	[thread overview]
Message-ID: <458787FF.6080404@yahoo.com.au> (raw)
In-Reply-To: <6d6a94c50612182216r15cd99a3p59bbe3d49cb482f0@mail.gmail.com>

Hi Aubery!

Aubrey wrote:
> Hi Nick,
> 
> Thanks for your reply again, ;-).
> 
> On 12/19/06, Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> 
>>
>> This should not happen because the pages are checked to ensure they are
>> from the same zone before merging.
> 
> 
> How? page_is_buddy() only check if the buddy has the buddy flag and
> has the same order.
> Where can I find the same zone is checked?

Ah OK, you're using 2.6.16? Later kernels have a check for this. I
guess you could backport it?

> 
>>
>> What kind of system do you have? What is the dmesg and the .config?
> 
> 
> I'm using the blackfin uclinux. dmesg and .config is attached.
> 
>> It could be that the zones are not properly aligned and 
>> CONFIG_HOLES_IN_ZONE
>> is not set.
> 
> 
> I changed the code in paging_init(), see below:
> -----------------------------------------
> #if 0
>                zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> 
> PAGE_SHIFT;
>                zones_size[ZONE_NORMAL] = 0;
> #else
>                zones_size[ZONE_DMA] = (end_mem/2 - PAGE_OFFSET) >> 
> PAGE_SHIFT;
>                zones_size[ZONE_NORMAL] = (end_mem/2 - PAGE_OFFSET) >>
> PAGE_SHIFT;
> #endif
> -----------------------------------------
> This is only what I did the change. I also suspect the zones are not
> properly aligned, But how to align it? I think our system doesn't need
> CONFIG_HOLES_IN_ZONE.

That's right. I guess you can either align your zone sizes (must be
aligned to MAX_ORDER size), or add the zone check in page_is_buddy.

Hope that works.

Nick

-- 
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  6:35 UTC|newest]

Thread overview: 9+ 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:01 ` Aubrey
2006-12-19  3:46 ` Nick Piggin
2006-12-19  3:46   ` Nick Piggin
2006-12-19  6:16   ` Aubrey
2006-12-19  6:34     ` Nick Piggin [this message]
2006-12-19  6:34       ` Nick Piggin
2006-12-19  7:41       ` Aubrey
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=458787FF.6080404@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.