lkml.org 
[lkml]   [2007]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] Lumpy Reclaim V4
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-12 19:53    [W:0.041 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site