Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
ea982d9f
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ea982d9f
编写于
11月 11, 2013
作者:
P
Pekka Enberg
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'slab/struct-page' into slab/next
上级
d56791b3
7e007355
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
243 addition
and
365 deletion
+243
-365
include/linux/mm_types.h
include/linux/mm_types.h
+16
-8
include/linux/slab.h
include/linux/slab.h
+8
-1
include/linux/slab_def.h
include/linux/slab_def.h
+2
-2
mm/slab.c
mm/slab.c
+217
-354
未找到文件。
include/linux/mm_types.h
浏览文件 @
ea982d9f
...
...
@@ -42,18 +42,22 @@ struct page {
/* First double word block */
unsigned
long
flags
;
/* Atomic flags, some possibly
* updated asynchronously */
struct
address_space
*
mapping
;
/* If low bit clear, points to
* inode address_space, or NULL.
* If page mapped as anonymous
* memory, low bit is set, and
* it points to anon_vma object:
* see PAGE_MAPPING_ANON below.
*/
union
{
struct
address_space
*
mapping
;
/* If low bit clear, points to
* inode address_space, or NULL.
* If page mapped as anonymous
* memory, low bit is set, and
* it points to anon_vma object:
* see PAGE_MAPPING_ANON below.
*/
void
*
s_mem
;
/* slab first object */
};
/* Second double word */
struct
{
union
{
pgoff_t
index
;
/* Our offset within mapping. */
void
*
freelist
;
/* sl
ub/slo
b first free object */
void
*
freelist
;
/* sl
[aou]
b first free object */
bool
pfmemalloc
;
/* If set by the page allocator,
* ALLOC_NO_WATERMARKS was set
* and the low watermark was not
...
...
@@ -109,6 +113,7 @@ struct page {
};
atomic_t
_count
;
/* Usage count, see below. */
};
unsigned
int
active
;
/* SLAB */
};
};
...
...
@@ -130,6 +135,9 @@ struct page {
struct
list_head
list
;
/* slobs list of pages */
struct
slab
*
slab_page
;
/* slab fields */
struct
rcu_head
rcu_head
;
/* Used by SLAB
* when destroying via RCU
*/
};
/* Remainder is not double word aligned */
...
...
include/linux/slab.h
浏览文件 @
ea982d9f
...
...
@@ -51,7 +51,14 @@
* }
* rcu_read_unlock();
*
* See also the comment on struct slab_rcu in mm/slab.c.
* This is useful if we need to approach a kernel structure obliquely,
* from its address obtained without the usual locking. We can lock
* the structure to stabilize it and check it's still at the given address,
* only if we can be sure that the memory has not been meanwhile reused
* for some other kind of object (which our subsystem's lock might corrupt).
*
* rcu_read_lock before reading the address, then rcu_read_unlock after
* taking the spinlock within the structure expected at that address.
*/
#define SLAB_DESTROY_BY_RCU 0x00080000UL
/* Defer freeing slabs to RCU */
#define SLAB_MEM_SPREAD 0x00100000UL
/* Spread some memory over cpuset */
...
...
include/linux/slab_def.h
浏览文件 @
ea982d9f
...
...
@@ -41,8 +41,8 @@ struct kmem_cache {
size_t
colour
;
/* cache colouring range */
unsigned
int
colour_off
;
/* colour offset */
struct
kmem_cache
*
slabp
_cache
;
unsigned
int
slab
_size
;
struct
kmem_cache
*
freelist
_cache
;
unsigned
int
freelist
_size
;
/* constructor func */
void
(
*
ctor
)(
void
*
obj
);
...
...
mm/slab.c
浏览文件 @
ea982d9f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录