Re: Memory allocation from ZONE_HIGHMEM ???

From: Christoph Lameter
Date: Thu Jul 14 2011 - 15:34:14 EST


On Wed, 13 Jul 2011, Pintu Agarwal wrote:

> I have a question regarding kernel memory allocation(using kmalloc) from ZONE_HIGHMEM zone.

kmalloc does not allocate from ZONE_HIGHMEM.

> But I want to specifically allocate pages from ZONE_HIGHMEM instead of Normal zone.
> How to explicitly do that in kernel?

You must use the page allocator. The slab allocators cannot use
ZONE_HIGHMEM. ZONE_HIGHMEM contains pages that are not directly accessible
from the processor.