mem_map in NUMA -- where is it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While going through Mel gorman's book, I read that mem_map for NUMA
systems is  treated as a virtual array at PAGE_OFFSET. I have a hard
time visualizing it. I could understand the the explanation  as
follows.
mem_map[pfn] should not be accessed as it is. calculate the actual
node corresponding to pfn and access the page as
pglist_data[A]->node_zonelists[B]->zone_mem_map[C], where,
A : node_id, calculated using pfn,
B: offset in the zonelist calculated using pfn and,
C : offset in the local mem_map calculated using pfn.
Is my understanding correct?

(Maybe one can find the page using the node_mem_map as well, but that
is another question.)
Now, why should the mem_map be initialized to PAGE_OFFSET? Where is it
done? In page_alloc.c, I found mem_map = NODE_DATA(0)->node_mem_map;
when CONFIG_FLAT_NODE_MEM_MAP  is defined (non numa case).  If my
understanding is correct, this case should hold for NUMA as well.

What am I missing?
Regards,
Om

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux