Skip to contentSkip to conversation

DMA32 zone unusable

DISCUSSION Mika Penttilä 2 participants 2 messages Nov 16, 2005 Memory management

lore
Share & tools
lore
#0 lore raw

The new DMA32 zone (which at least x86-64 has) is quite "interesting" :

#define __GFP_DMA32 ((__force gfp_t)0x04) <-----!!!!!

#define GFP_ZONEMASK 0x03 <------!!!!!

#define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK))

static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
unsigned int order)
{
if (unlikely(order >= MAX_ORDER))

       return NULL;

return __alloc_pages(gfp_mask, order,

       NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask));
}

So with GFP_DMA32 you never get those pages (but DMA instead).

--Mika

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 7 lines · Mika Penttila

The new DMA32 zone (which at least x86-64 has) is quite "interesting" :

#define __GFP_DMA32 ((__force gfp_t)0x04) <-----!!!!!

#define GFP_ZONEMASK 0x03 <------!!!!!

#define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK))

Yes that was a last minute change that was wrong. I will submit an update. Thanks for reviewing.

-Andi

Quoted 13 lines

static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
unsigned int order)
{
if (unlikely(order >= MAX_ORDER))
return NULL;

return __alloc_pages(gfp_mask, order,
NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask));
}

So with GFP_DMA32 you never get those pages (but DMA instead).

Quoted 8 lines

--Mika

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>