Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
de16834e
Commit
de16834e
authored
Jul 29, 2002
by
Hugh Dickins
Committed by
Linus Torvalds
Jul 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] update overcommit doc and comment
Update Doc and remove FIXME comment from fork.c now accounting right.
parent
e054680b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
Documentation/vm/overcommit-accounting
Documentation/vm/overcommit-accounting
+6
-8
kernel/fork.c
kernel/fork.c
+0
-5
No files found.
Documentation/vm/overcommit-accounting
View file @
de16834e
...
...
@@ -37,13 +37,13 @@ How It Works
The overcommit is based on the following rules
For a file backed map
SHARED or READ only - 0 cost (the file is the map not swap)
SHARED or READ-only - 0 cost (the file is the map not swap)
PRIVATE WRITABLE - size of mapping per instance
WRITABLE SHARED - size of mapping per instance
For a direct map
SHARED or READ only - size of mapping
PRIVATE WRITEABLE - size of mapping per instance
For an anonymous or /dev/zero map
SHARED - size of mapping
PRIVATE READ-only - 0 cost (but of little use)
PRIVATE WRITABLE - size of mapping per instance
Additional accounting
Pages made writable copies by mmap
...
...
@@ -66,5 +66,3 @@ o Implement actual limit enforcement
To Do
-----
o Account ptrace pages (this is hard)
o Account for shared anonymous mappings properly
- right now we account them per instance
kernel/fork.c
View file @
de16834e
...
...
@@ -210,17 +210,12 @@ static inline int dup_mmap(struct mm_struct * mm)
retval
=
-
ENOMEM
;
if
(
mpnt
->
vm_flags
&
VM_DONTCOPY
)
continue
;
/*
* FIXME: shared writable map accounting should be one off
*/
if
(
mpnt
->
vm_flags
&
VM_ACCOUNT
)
{
unsigned
int
len
=
(
mpnt
->
vm_end
-
mpnt
->
vm_start
)
>>
PAGE_SHIFT
;
if
(
!
vm_enough_memory
(
len
))
goto
fail_nomem
;
charge
+=
len
;
}
tmp
=
kmem_cache_alloc
(
vm_area_cachep
,
SLAB_KERNEL
);
if
(
!
tmp
)
goto
fail_nomem
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment