All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Dave Hansen <hansendc@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Mel Gorman <mel@csn.ul.ie>
Subject: Re: [PATCH 1/3] Lumpy Reclaim V4
Date: Mon, 12 Mar 2007 18:48:13 +0000	[thread overview]
Message-ID: <45F5A06D.4030004@shadowen.org> (raw)
In-Reply-To: <1173724576.11945.100.camel@localhost.localdomain>

Dave Hansen wrote:
> On Mon, 2007-03-12 at 18:23 +0000, Andy Whitcroft wrote:
>> +                       /* The target page is in the block, ignore it. */
>> +                       if (unlikely(pfn == page_pfn))
>> +                               continue;
>> +#ifdef CONFIG_HOLES_IN_ZONE
>> +                       /* Avoid holes within the zone. */
>> +                       if (unlikely(!pfn_valid(pfn)))
>> +                               break;
>> +#endif 
> 
> Would having something like:
> 
>         static inline int pfn_in_zone_hole(unsigned long pfn)
>         {
>         #ifdef CONFIG_HOLES_IN_ZONE
>         	if (unlikely(!pfn_valid(pfn)))
>         		return 1;
>         #endif 
>         	return 0;
>         }
>         
> help us out?  page_is_buddy() and page_is_consistent() appear to do the
> exact same thing, with the same #ifdef.

Funny you mention that.  I have a patch hanging around which basically
does that.  I'd been planning to send it up.  It adds a
pfn_valid_within() which you use when you already know a relative page
within the MAX_ORDER block is valid.  I'd not sent it cause I thought
the name sucked.

-apw

WARNING: multiple messages have this Message-ID (diff)
From: Andy Whitcroft <apw@shadowen.org>
To: Dave Hansen <hansendc@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Mel Gorman <mel@csn.ul.ie>
Subject: Re: [PATCH 1/3] Lumpy Reclaim V4
Date: Mon, 12 Mar 2007 18:48:13 +0000	[thread overview]
Message-ID: <45F5A06D.4030004@shadowen.org> (raw)
In-Reply-To: <1173724576.11945.100.camel@localhost.localdomain>

Dave Hansen wrote:
> On Mon, 2007-03-12 at 18:23 +0000, Andy Whitcroft wrote:
>> +                       /* The target page is in the block, ignore it. */
>> +                       if (unlikely(pfn == page_pfn))
>> +                               continue;
>> +#ifdef CONFIG_HOLES_IN_ZONE
>> +                       /* Avoid holes within the zone. */
>> +                       if (unlikely(!pfn_valid(pfn)))
>> +                               break;
>> +#endif 
> 
> Would having something like:
> 
>         static inline int pfn_in_zone_hole(unsigned long pfn)
>         {
>         #ifdef CONFIG_HOLES_IN_ZONE
>         	if (unlikely(!pfn_valid(pfn)))
>         		return 1;
>         #endif 
>         	return 0;
>         }
>         
> help us out?  page_is_buddy() and page_is_consistent() appear to do the
> exact same thing, with the same #ifdef.

Funny you mention that.  I have a patch hanging around which basically
does that.  I'd been planning to send it up.  It adds a
pfn_valid_within() which you use when you already know a relative page
within the MAX_ORDER block is valid.  I'd not sent it cause I thought
the name sucked.

-apw

--
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:[~2007-03-12 18:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 18:22 [PATCH 0/3] Lumpy Reclaim V5 Andy Whitcroft
2007-03-12 18:22 ` Andy Whitcroft
2007-03-12 18:23 ` [PATCH 1/3] Lumpy Reclaim V4 Andy Whitcroft
2007-03-12 18:23   ` Andy Whitcroft
2007-03-12 18:36   ` Dave Hansen
2007-03-12 18:36     ` Dave Hansen
2007-03-12 18:48     ` Andy Whitcroft [this message]
2007-03-12 18:48       ` Andy Whitcroft
2007-03-12 18:23 ` [PATCH 2/3] lumpy: back out removal of active check in isolate_lru_pages Andy Whitcroft
2007-03-12 18:23   ` Andy Whitcroft
2007-03-12 18:24 ` [PATCH 3/3] lumpy: only count taken pages as scanned Andy Whitcroft
2007-03-12 18:24   ` Andy Whitcroft
2007-03-16  3:20 ` [PATCH 0/3] Lumpy Reclaim V5 Andrew Morton
2007-03-16  3:20   ` Andrew Morton
2007-03-17 13:27   ` Andy Whitcroft
2007-03-17 13:27     ` Andy Whitcroft

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=45F5A06D.4030004@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@osdl.org \
    --cc=hansendc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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.