Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
597fb188
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
597fb188
编写于
1月 15, 2011
作者:
P
Pekka Enberg
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'slub/hotplug' into slab/urgent
上级
38567333
04d94879
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
2 deletion
+12
-2
include/linux/memory_hotplug.h
include/linux/memory_hotplug.h
+6
-0
mm/memory_hotplug.c
mm/memory_hotplug.c
+4
-0
mm/slub.c
mm/slub.c
+2
-2
未找到文件。
include/linux/memory_hotplug.h
浏览文件 @
597fb188
...
@@ -165,6 +165,12 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
...
@@ -165,6 +165,12 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
extern
void
put_page_bootmem
(
struct
page
*
page
);
extern
void
put_page_bootmem
(
struct
page
*
page
);
#endif
#endif
/*
* Lock for memory hotplug guarantees 1) all callbacks for memory hotplug
* notifier will be called under this. 2) offline/online/add/remove memory
* will not run simultaneously.
*/
void
lock_memory_hotplug
(
void
);
void
lock_memory_hotplug
(
void
);
void
unlock_memory_hotplug
(
void
);
void
unlock_memory_hotplug
(
void
);
...
...
mm/memory_hotplug.c
浏览文件 @
597fb188
...
@@ -409,6 +409,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
...
@@ -409,6 +409,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
int
ret
;
int
ret
;
struct
memory_notify
arg
;
struct
memory_notify
arg
;
lock_memory_hotplug
();
arg
.
start_pfn
=
pfn
;
arg
.
start_pfn
=
pfn
;
arg
.
nr_pages
=
nr_pages
;
arg
.
nr_pages
=
nr_pages
;
arg
.
status_change_nid
=
-
1
;
arg
.
status_change_nid
=
-
1
;
...
@@ -421,6 +422,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
...
@@ -421,6 +422,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
ret
=
notifier_to_errno
(
ret
);
ret
=
notifier_to_errno
(
ret
);
if
(
ret
)
{
if
(
ret
)
{
memory_notify
(
MEM_CANCEL_ONLINE
,
&
arg
);
memory_notify
(
MEM_CANCEL_ONLINE
,
&
arg
);
unlock_memory_hotplug
();
return
ret
;
return
ret
;
}
}
/*
/*
...
@@ -445,6 +447,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
...
@@ -445,6 +447,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
printk
(
KERN_DEBUG
"online_pages %lx at %lx failed
\n
"
,
printk
(
KERN_DEBUG
"online_pages %lx at %lx failed
\n
"
,
nr_pages
,
pfn
);
nr_pages
,
pfn
);
memory_notify
(
MEM_CANCEL_ONLINE
,
&
arg
);
memory_notify
(
MEM_CANCEL_ONLINE
,
&
arg
);
unlock_memory_hotplug
();
return
ret
;
return
ret
;
}
}
...
@@ -469,6 +472,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
...
@@ -469,6 +472,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
if
(
onlined_pages
)
if
(
onlined_pages
)
memory_notify
(
MEM_ONLINE
,
&
arg
);
memory_notify
(
MEM_ONLINE
,
&
arg
);
unlock_memory_hotplug
();
return
0
;
return
0
;
}
}
...
...
mm/slub.c
浏览文件 @
597fb188
...
@@ -3797,7 +3797,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
...
@@ -3797,7 +3797,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
}
}
}
}
down_read
(
&
slub_lock
);
lock_memory_hotplug
(
);
#ifdef CONFIG_SLUB_DEBUG
#ifdef CONFIG_SLUB_DEBUG
if
(
flags
&
SO_ALL
)
{
if
(
flags
&
SO_ALL
)
{
for_each_node_state
(
node
,
N_NORMAL_MEMORY
)
{
for_each_node_state
(
node
,
N_NORMAL_MEMORY
)
{
...
@@ -3838,7 +3838,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
...
@@ -3838,7 +3838,7 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
x
+=
sprintf
(
buf
+
x
,
" N%d=%lu"
,
x
+=
sprintf
(
buf
+
x
,
" N%d=%lu"
,
node
,
nodes
[
node
]);
node
,
nodes
[
node
]);
#endif
#endif
u
p_read
(
&
slub_lock
);
u
nlock_memory_hotplug
(
);
kfree
(
nodes
);
kfree
(
nodes
);
return
x
+
sprintf
(
buf
+
x
,
"
\n
"
);
return
x
+
sprintf
(
buf
+
x
,
"
\n
"
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录