lkml.org 
[lkml]   [2003]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: hash table sizes
William Lee Irwin III <wli@holomorphy.com> wrote:
>> -#define pfn_valid(pfn) ((pfn) < num_physpages)
>> +#define pfn_valid(pfn) \
>> +({ \
>> + unsigned long __pfn__ = pfn; \
>> + u8 __nid__ = pfn_to_nid(__pfn__); \
>> + pg_data_t *__pgdat__; \
>> + __pgdat__ = __nid__ < MAX_NUMNODES ? NODE_DATA(__nid__) : NULL; \
>> + __pgdat__ && \
>> + __pfn__ >= __pgdat__->node_start_pfn && \
>> + __pfn__ - __pgdat__->node_start_pfn \
>> + < __pgdat__->node_spanned_pages; \
>> +})

On Tue, Nov 25, 2003 at 08:25:45PM -0800, Andrew Morton wrote:
> Boggle.
> Does this evaulate to the same thing on non-discontigmem? (surely no)
> Can we please arrange for it to?

The non-discontigmem case is unaltered, as it's handled in
include/asm-i386/page.h under a #ifdef. The semantics agree.

-- wli
-
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: 2005-03-22 13:58    [W:0.052 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site