numa distance 2
来源:互联网 发布:it行业 云计算 编辑:程序博客网 时间:2024/05/01 10:30
/* Conform to ACPI 2.0 SLIT distance definitions */
#define LOCAL_DISTANCE 10
#define REMOTE_DISTANCE 20
在kernel中首先通过numa_alloc_distance来初始化numa_distance数组,如果是本地node,则默认初始化为10,如果是远端node,则默认初始化为20.
static int __init numa_alloc_distance(void)
{
/* fill with the default distances */
for (i = 0; i < numa_distance_cnt; i++)
for (j = 0; j < numa_distance_cnt; j++)
numa_distance[i * numa_distance_cnt + j] = i == j ?
LOCAL_DISTANCE : REMOTE_DISTANCE;
}
如果在dtb中有如下节点
distance-map {
compatible = "numa-distance";
distance-matrix = <0 1 5>, <2 3 5>;
};
则会调用numa_set_distance 来设定numa_distance 数组,也就是说numa_distance中没有初始化的本地node的distance是10,远端node的distance是20.这也就是distance-matrix 中沒有設定node的默認值.
void __init numa_set_distance(int from, int to, int distance)
{
numa_distance[from * numa_distance_cnt + to] = distance;
}
#define LOCAL_DISTANCE 10
#define REMOTE_DISTANCE 20
在kernel中首先通过numa_alloc_distance来初始化numa_distance数组,如果是本地node,则默认初始化为10,如果是远端node,则默认初始化为20.
static int __init numa_alloc_distance(void)
{
/* fill with the default distances */
for (i = 0; i < numa_distance_cnt; i++)
for (j = 0; j < numa_distance_cnt; j++)
numa_distance[i * numa_distance_cnt + j] = i == j ?
LOCAL_DISTANCE : REMOTE_DISTANCE;
}
如果在dtb中有如下节点
distance-map {
compatible = "numa-distance";
distance-matrix = <0 1 5>, <2 3 5>;
};
则会调用numa_set_distance 来设定numa_distance 数组,也就是说numa_distance中没有初始化的本地node的distance是10,远端node的distance是20.这也就是distance-matrix 中沒有設定node的默認值.
void __init numa_set_distance(int from, int to, int distance)
{
numa_distance[from * numa_distance_cnt + to] = distance;
}
0 0
- numa distance 2
- numa distance
- linux上获得numa node distance
- numa init 2
- NUMA
- numa
- numa
- Numa
- numa
- NUMA
- NUMA
- numa
- NUMA
- NUMA
- NUMA
- NUMA
- Distance
- distance
- Android 登陆功能的实现。
- ios项目打包
- shader Cg 基本数据类型
- Mysql中的load语句对null的处理
- HYSBZ 2588Spoj 10628. Count on a tree
- numa distance 2
- 数组中出现次数超过一般的数字
- 《C++ Primer Plus(第六版)》(5)(第四章 复合类型 答案2)
- 连续输入密码错误3次,第二天才能登录
- 机器学习-svm.点滴积累
- mysql合并两个表
- linux下安装Mysql
- atitit 短信验证码的源码实现 .docx
- Android Force close是什么引起的?