Skip to contentSkip to conversation

where to get ZONE_MOVABLE pathces?

DISCUSSION Jacky(GuangXiang Lee) 2 participants 2 messages Oct 17, 2007 11 messages not in the archive Memory management

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

----- Original Message -----
From: "Mel Gorman" <[email protected]>
To: "Jacky(GuangXiang Lee)" <[email protected]>
Sent: Tuesday, October 16, 2007 8:50 PM
Subject: Re: where to get ZONE_MOVABLE pathces?

Can I precisely make the RAM range of a specific DIMM to be a independent zone?
e.x., I have a machine with 2G RAM(in place of 2 DIMM socket , each socket is plugged with 1G RAM)
then I divided in kernel startup:
ZONE_DMA: 0~16M
ZONE_DMA32: 16M~1G
ZONE_READONLY:1G~2G (supposing this is my new created zone) hence the third zone corresponds to a DIMM hardware.
right?

Quoted 10 lines

On (16/10/07 16:24), Jacky(GuangXiang Lee) didst pronounce:

Quoted 3 lines

hi Mel,
I feel I need more knowledgement about node/zone than reading your that book.

Very well, but it is reaching the point where you should consider mailing linux-mm or kernelnewbies so that others will see the answers.

Quoted 2 lines

I have some stupid questions please:
1)In a typical server machine, what are the maximum sizes of each nodes?

Is

Quoted 27 lines
Quoted 1 line

there some materials about this exists?

The size of the node is only limited by the size of the physical address space supported by a machine.

Quoted 2 lines

2)Are all nodes in the same physical space? e.x., node 1: 0~2G, node 2:
2G~4G,node 3 :4G~6G...?

Not necessarily. Nodes can be at any part of the physical address space. They are not necessarily contiguous and nodes can actually overlap in some cases. For example, this can happen

Node 0: 0-2GB
Node 1: 3-6GB
Node 0: 8-10GB

Quoted 2 lines

3)In a specific node, does its zones be divided arbitrarily?

No, zones holes pages that have a particular addressing limitation and what they mean varies slightly between architectures. On i386, ZONE_DMA is 16MB because there are devices that can only use a 24 bit physical address. On x86_64, you have ZONE_DMA32 because there are 32 bit devices on 64 bit machines.

Quoted 1 line

Can you give some detailed materials or explain more minutely?

Quoted 12 lines

I'm not aware of recent detailed information on the subject. However, if you follow the code path starting from mm/page_alloc.c#free_area_init_nodes(), you'll see how the zones get initialised at boot-time. This is the arch-independent zone-sizing code that is used by a number of architectures. You'll see how the arch is responsible for passing in an array of PFNs denoting where zones end and how this information is used to size zones.

Signature · 3 lines
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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>

#12 lore raw
Quoted 2 lines · Jacky(GuangXiang Lee)

Can I precisely make the RAM range of a specific DIMM to be a independent zone?

Technically, yes as nothing stops you. Again, look at what mm/page_alloc.c#free_area_init_nodes() does to setup each of the zones as they currently exist.

Also, to reiterate, using a zone is easiest for a prototype but it's unlikely to be the final solution. You probably want to use page migration and a page-allocation callback from your driver to move pages you detect are read-only to flash.

Quoted 9 lines

e.x., I have a machine with 2G RAM(in place of 2 DIMM socket , each socket is plugged with 1G RAM)
then I divided in kernel startup:
ZONE_DMA: 0~16M
ZONE_DMA32: 16M~1G
ZONE_READONLY:1G~2G (supposing this is my new created zone) hence the third zone corresponds to a DIMM hardware.
right?

You cannot assume that PFN ranges correspond to DIMMs in the normal case. However, in your specific case where you have a piece of flash that you want to use as a DIMM, you know exactly what the PFN ranges are.

Signature · 7 lines
Mel Gorman

--
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>