Re: hash table sizes

From: William Lee Irwin III
Date: Tue Nov 25 2003 - 23:24:18 EST


William Lee Irwin III <wli@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/