Re: hash table sizes

From: Andrew Morton
Date: Tue Nov 25 2003 - 23:21:21 EST


William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:
>
> Speaking of which, no one's bothered fixing the X crashes on i386
> discontigmem. Untested patch below.
>
> ...
> -#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; \
> +})

Boggle.

Does this evaulate to the same thing on non-discontigmem? (surely no)

Can we please arrange for it to?
-
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/