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
ff710b16
Commit
ff710b16
authored
Oct 08, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 08, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] tidy for the max_thread stuff from the kernel list
parent
90a2541d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
kernel/fork.c
kernel/fork.c
+6
-4
No files found.
kernel/fork.c
View file @
ff710b16
...
...
@@ -165,12 +165,14 @@ void __init fork_init(unsigned long mempages)
* of memory.
*/
max_threads
=
mempages
/
(
THREAD_SIZE
/
PAGE_SIZE
)
/
8
;
/*
* we need to allow at least
1
0 threads to boot a system
* we need to allow at least
2
0 threads to boot a system
*/
init_task
.
rlim
[
RLIMIT_NPROC
].
rlim_cur
=
max
(
10
,
max_threads
/
2
);
init_task
.
rlim
[
RLIMIT_NPROC
].
rlim_max
=
max
(
10
,
max_threads
/
2
);
if
(
max_threads
<
20
)
max_threads
=
20
;
init_task
.
rlim
[
RLIMIT_NPROC
].
rlim_cur
=
max_threads
/
2
;
init_task
.
rlim
[
RLIMIT_NPROC
].
rlim_max
=
max_threads
/
2
;
}
static
struct
task_struct
*
dup_task_struct
(
struct
task_struct
*
orig
)
...
...
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