linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Hiroyuki KAMEZAWA <kamezawa.hiroyu@jp.fujitsu.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: [RFC/PATCH] free_area[] bitmap elimination [3/3]
Date: Tue, 24 Aug 2004 10:05:29 -0700	[thread overview]
Message-ID: <1093367129.1009.63.camel@nighthawk> (raw)
In-Reply-To: <412B3785.30300@jp.fujitsu.com>

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. :)

> +#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.  

-- Dave

--
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>

  reply	other threads:[~2004-08-24 17:05 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 [this message]
2004-08-25  0:17   ` [Lhms-devel] " Hiroyuki KAMEZAWA

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=1093367129.1009.63.camel@nighthawk \
    --to=haveblue@us.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.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