Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
42ddc4cb
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 2 年 前同步成功
通知
173
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
42ddc4cb
编写于
5月 06, 2009
作者:
P
Pekka Enberg
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'topic/documentation', 'topic/slub/fixes' and 'topic/urgent' into for-linus
上级
51e95bed
818cf590
1f0532eb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
2 deletion
+9
-2
mm/slob.c
mm/slob.c
+4
-1
mm/slub.c
mm/slub.c
+5
-1
未找到文件。
mm/slob.c
浏览文件 @
42ddc4cb
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/swap.h>
/* struct reclaim_state */
#include <linux/cache.h>
#include <linux/cache.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/module.h>
...
@@ -255,6 +256,8 @@ static void *slob_new_pages(gfp_t gfp, int order, int node)
...
@@ -255,6 +256,8 @@ static void *slob_new_pages(gfp_t gfp, int order, int node)
static
void
slob_free_pages
(
void
*
b
,
int
order
)
static
void
slob_free_pages
(
void
*
b
,
int
order
)
{
{
if
(
current
->
reclaim_state
)
current
->
reclaim_state
->
reclaimed_slab
+=
1
<<
order
;
free_pages
((
unsigned
long
)
b
,
order
);
free_pages
((
unsigned
long
)
b
,
order
);
}
}
...
@@ -407,7 +410,7 @@ static void slob_free(void *block, int size)
...
@@ -407,7 +410,7 @@ static void slob_free(void *block, int size)
spin_unlock_irqrestore
(
&
slob_lock
,
flags
);
spin_unlock_irqrestore
(
&
slob_lock
,
flags
);
clear_slob_page
(
sp
);
clear_slob_page
(
sp
);
free_slob_page
(
sp
);
free_slob_page
(
sp
);
free_page
((
unsigned
long
)
b
);
slob_free_pages
(
b
,
0
);
return
;
return
;
}
}
...
...
mm/slub.c
浏览文件 @
42ddc4cb
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
*/
*/
#include <linux/mm.h>
#include <linux/mm.h>
#include <linux/swap.h>
/* struct reclaim_state */
#include <linux/module.h>
#include <linux/module.h>
#include <linux/bit_spinlock.h>
#include <linux/bit_spinlock.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
...
@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
...
@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
__ClearPageSlab
(
page
);
__ClearPageSlab
(
page
);
reset_page_mapcount
(
page
);
reset_page_mapcount
(
page
);
if
(
current
->
reclaim_state
)
current
->
reclaim_state
->
reclaimed_slab
+=
pages
;
__free_pages
(
page
,
order
);
__free_pages
(
page
,
order
);
}
}
...
@@ -1909,7 +1912,7 @@ static inline int calculate_order(int size)
...
@@ -1909,7 +1912,7 @@ static inline int calculate_order(int size)
* Doh this slab cannot be placed using slub_max_order.
* Doh this slab cannot be placed using slub_max_order.
*/
*/
order
=
slab_order
(
size
,
1
,
MAX_ORDER
,
1
);
order
=
slab_order
(
size
,
1
,
MAX_ORDER
,
1
);
if
(
order
<
=
MAX_ORDER
)
if
(
order
<
MAX_ORDER
)
return
order
;
return
order
;
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
...
@@ -2522,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order);
...
@@ -2522,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order);
static
int
__init
setup_slub_max_order
(
char
*
str
)
static
int
__init
setup_slub_max_order
(
char
*
str
)
{
{
get_option
(
&
str
,
&
slub_max_order
);
get_option
(
&
str
,
&
slub_max_order
);
slub_max_order
=
min
(
slub_max_order
,
MAX_ORDER
-
1
);
return
1
;
return
1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录