并è¡è®¡ç®çèæ¯ï¼
èªè®¡ç®æºè¯çä¹æ¥èµ·ï¼å¯¹å
¶æä¾æ´å¼ºè®¡ç®è½åç追æ±å§ç»æ²¡æé´æãæ©æç计ç®æºéè¿ä¸æå°æé«æ¶éé¢çæ¥å å¿«å¤çé度ãç°å¨ï¼æ¶éçé®é¢è¶æ¥è¶éå°éå¶ï¼æ ¹æ®ç±å æ¯å¦ç¸å¯¹è®ºï¼çµåçé度ä¸ä¼è¶
è¿å
éï¼é¢ççä¸ææé«ï¼æå³ççµåä¿¡å·ä»ä¸æ®µå°è¾¾å¦ä¸ç«¯çè·ç¦»å°±è¦è¶çï¼è®¡ç®æºå°±è¦ä¸æåå°ãä½æ¯ï¼ä¼´éæ¶éçå å¿«ï¼å¤çå¨ççéä¹æ¥å§å¢å¤§ï¼æ£çé¨ä»¶å¿
ä¸å¯å°ï¼è¿«ä½¿è®¡ç®æºçä½ç§¯ä¸å¯è½æ éå¶çåå°ï¼éè¿å å¿«æ¶éæ¥å¢å¼ºè®¡ç®è½åçæ¹æ³éå°äºç¶é¢ã
æ¢ç¶ä¸è½å°è®¡ç®æºæ éåå°ï¼é£ä¹å°±å°è¯å¦ä¸ç§æè·¯ï¼éè¿æ©å±è®¡ç®åå
çæ°éï¼è¾¾å°å¢å¼ºè®¡ç®è½åçç®çãäºæ¯å°±æäºå¤å¤çæºç³»ç»ï¼å
æ¬å¹¶è¡è®¡ç®æºï¼ä»¥ååå¸å¼è®¡ç®æºç³»ç»ãNUMAï¼Non Uniform Memory Accessï¼ä½ä¸ºå¤å¤çæºç³»ç»ä¸ç§å
¸åæ¶æï¼å
·æåºå«äºå
¶ä»å¤å¤çæºç³»ç»çç¹æ§ã
1.å
·æ对ææCPUå¯è§çç»ä¸çå°å空é´
2.éè¿LOADãSTOREæ令访é®è¿ç«¯åå¨å¨
3.访é®è¿ç«¯åå¨å¨çé度ä½äºè®¿é®æ¬å°åå¨å¨
NUMAç³»ç»ç®ä»ï¼
NUMAï¼Non Uniform Memory Accessï¼ï¼å³éä¸è´å
å访é®ï¼æ¯é对UMAï¼Uniform Memory Accessï¼æåºçãå
¸åçUMAæ¶æï¼å¦SMPï¼Symmetric MultiProcessingï¼æºå¨ï¼å¤ä¸ªCPU以åä¸ä¸ªæå¤ä¸ªä¸»åå¨å¨æ¨¡åéè¿ä¸æ¡ç³»ç»æ»çº¿éä¿¡ãéçç³»ç»è§æ¨¡çæ©å¤§ï¼CPUæ°éä¸æå¢å ï¼å¯¹ç³»ç»æ»çº¿çäºæ¢ç°è±¡è¶å严éï¼ç³»ç»æ»çº¿å¸¦å®½æ为äºå¤CPU访åçç¶é¢ã
NUMAæ¶æä¸ï¼å¤CPU对主åç访é®å¹¶é对ççï¼æ¯ä¸ªCPUé½æèªå·±ç主åï¼ CPUä¸èªå·±ç主åç©çä¸è·ç¦»æ´è¿ï¼è®¿é®é度æ´å¿«ï¼è访é®è¿ç«¯åå¨å¨çé度ç¸å¯¹è¦æ
¢ãNUMAç¨Nodeæ¥ç®¡çCPUä¸ä¸»åãä¸ä¸ªNUMAç³»ç»ç±å¤ä¸ªNUMA Nodeç»æï¼å
¶ä¸æ¯ä¸ªNodeå¯ä»¥æ¥æå¤ä¸ªCPUï¼ä½æ¯åªæä¸ä¸ªå
åæ§å¶å¨ï¼ä¿è¯æ¬NodeçææCPU对æ¬Nodeç主åå®ç°å¯¹ç访é®ï¼èå
¶å®NodeçCPU对æ¬Nodeç主å访é®å»¶è¿è¦å¤§ä¸äºã
NUMAç³»ç»çå¯å¨æµç¨ï¼
ç³»ç»å çµï¼å¯¹äºåCPUæºå¨ï¼CPUç´æ¥æ§è¡BIOSç¨åºï¼ä½æ¯å¯¹äºå¤å¤çæºç³»ç»ï¼ç±åªä¸ªCPUæ§è¡è¯¥ç¨åºæ¯ä¸ªé®é¢ãé对è¿ä¸ªé®é¢ï¼IntelæåºäºMultiple Processor Initialization Protocolï¼è¯¥åè®®è§å®äºä¸¤ç§ç±»åçCPUï¼ä½ä¸ºä¸»å¯å¨CPUçBSPï¼Bootstrap Processorï¼ï¼ä½ä¸ºåºç¨æå¡CPUçAPï¼Application Processorï¼ï¼ç³»ç»å çµåéè¿ä¸»æ¿ä¸ç硬件éæ©æºå¶ï¼éæ©ä¸ä¸ªCPUä½ä¸ºBSPï¼èå°å
¶å®CPUä½ä¸ºAPãï¼å
·ä½çåè®®ä¸éæ©ç®æ³ç»èï¼åèãIA-32 Architectures Software Developer's Manual 3Aãï¼Chapter 7ï¼Multiple Processor Managementï¼[1]å¨BSPä¸æ§è¡BIOSç¨åºï¼è¯»å/设置CMOSç¸å
³ä¿¡æ¯ï¼å¹¶å®æèªæ£ç¨åºï¼ä¸ºå
¶å®AP建ç«ç®¡çå表ï¼æ¤æ¶ææAPåå¤äºç©ºè½¬ç¶æã
Linuxéè¿è¯»åç³»ç»çfirmwareä¸çACPI表ï¼è·å¾NUMAç³»ç»çCPUåç©çå
ååå¸ä¿¡æ¯ï¼æéè¦çæ¯SRATï¼System Resource Affinity Tableï¼åSLITï¼System Locality Information Tableï¼ãSRATä¸å
å«ä¸¤ä¸ªç»æï¼Processor Local APIC/SAPIC Affinity Structureç¨äºè®°å½CPUä¿¡æ¯ï¼Memory Affinity Structureç¨äºè®°å½ä¸»åä¿¡æ¯[3]ãLinux kernelä¸éè¿include/acpi/actbl1.hä¸acpi_table_slitä¸acpi_table_sratè®°å½SLITä¸SRATç»æä¿¡æ¯ï¼éè¿acpi_numa_init()å½æ°è¯»åç³»ç»firmwareä¸çæ°æ®ï¼èµå¼ç»ä»¥ä¸ä¸¤ä¸ªç»æï¼ç¨äºNUMAç³»ç»åå§åã代ç ï¼ä»¥Linux2.6.36 kernel为ä¾ï¼
温馨提示:答案为网友推荐,仅供参考