Re: [TRIVIAL PATCH] Ensure pfn_to_nid() is always defined for i386

From: Mike Fedyk
Date: Mon Jan 05 2004 - 17:56:59 EST


On Mon, Dec 22, 2003 at 04:26:40PM -0800, Martin J. Bligh wrote:
> + * for now assume that 64Gb is max amount of RAM for whole system
> + * 64Gb / 4096bytes/page = 16777216 pages
> + */
> +#define MAX_NR_PAGES 16777216
> +#define MAX_ELEMENTS 256
> +#define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS)

Why not do the calculation in the define, and use PAGE_SIZE?

If PAGE_SIZE isn't 4k will it break the rest of this code, or will the
calculations make sence with larger PAGE_SIZE?

Might as well make it easier to go in the direction of variable PAGE_SIZE
instead of keeping the assumption.
-
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/