From: Hiroyuki KAMEZAWA <kamezawa.hiroyu@jp.fujitsu.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-mm <linux-mm@kvack.org>,
lhms <lhms-devel@lists.sourceforge.net>,
William Lee Irwin III <wli@holomorphy.com>,
Hirokazu Takahashi <taka@valinux.co.jp>,
ncunningham@linuxmail.org
Subject: Re: [Lhms-devel] Re: [RFC/PATCH] free_area[] bitmap elimination [3/3]
Date: Wed, 25 Aug 2004 09:17:20 +0900 [thread overview]
Message-ID: <412BDA90.9040103@jp.fujitsu.com> (raw)
In-Reply-To: <1093367129.1009.63.camel@nighthawk>
Dave Hansen wrote:
> On Tue, 2004-08-24 at 05:41, Hiroyuki KAMEZAWA wrote:
>
>>+static inline int page_is_buddy(struct page *page, int order)
>>+{
>>+ if (page_count(page) == 0 &&
>>+ PagePrivate(page) &&
>>+ !PageReserved(page) &&
>>+ page_order(page) == order) {
>>+ /* check, check... see free_pages_check() */
>>+ if (page_mapped(page) ||
>>+ page->mapping != NULL ||
>>+ (page->flags & (
>>+ 1 << PG_lru |
>>+ 1 << PG_locked |
>>+ 1 << PG_active |
>>+ 1 << PG_reclaim |
>>+ 1 << PG_slab |
>>+ 1 << PG_swapcache |
>>+ 1 << PG_writeback )))
>>+ bad_page(__FUNCTION__, page);
>>+ return 1;
>>+ }
>>+ return 0;
>>+}
>
>
> Please share some code with the free_pages_check() that you stole this
> from. It's nasty enough to have one copy of it around. :)
Hmm... this part is different from free_pages_check() even if I stoled it from.
Becasuse PG_private bit check is not done here. Sharing some code with
frees_page_check() would make free_pages_check() complex to read.
And this is only a bug checking code and bad_page( __FUNCTION__ , page) is useful
to test this buddy system.
>>+#ifdef CONFIG_VIRTUAL_MEM_MAP
>>+ /* This check is necessary when
>>+ 1. there may be holes in zone.
>>+ 2. a hole is not aligned in this order.
>>+ currently, VIRTUAL_MEM_MAP case, is only case.
>>+ Is there better call than pfn_valid ?
>>+ */
>>+ if (!pfn_valid(zone->zone_start_pfn + (page_idx ^ (1 << order))))
>>+ break;
>>+#endif
>
>
> This should be hidden in a header somewhere. We don't want to have to
> see ia64-specific ifdefs in generic code.
>
Hmm, I understand what you say. I'll consider better another way.
But why #ifdef is inserted here is that this is RFC and
I want to make it clear this is IA64 specific.
Thank you for your all comments.
-- Kame
--
--the clue is these footmarks leading to the door.--
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.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:"aart@kvack.org"> aart@kvack.org </a>
prev parent reply other threads:[~2004-08-25 0:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-24 12:41 Hiroyuki KAMEZAWA
2004-08-24 17:05 ` Dave Hansen
2004-08-25 0:17 ` Hiroyuki KAMEZAWA [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=412BDA90.9040103@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=haveblue@us.ibm.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
--cc=ncunningham@linuxmail.org \
--cc=taka@valinux.co.jp \
--cc=wli@holomorphy.com \
/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