diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-07-18 09:50:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-18 09:50:40 -0400 |
commit | 5304d5fc74a269cc6c3e70f9713684ca729abdf0 (patch) | |
tree | 6a5db62915abd260241a2b9aee34086c93293ca6 /include/linux/sched.h | |
parent | 54d35f29f49224d86b994acb6e5969b9ba09022d (diff) | |
parent | 78af08d90b8f745044b1274430bc4bc6b2b27aca (diff) |
Merge branch 'linus' into sched/core
Merge reason: branch had an old upstream base (-rc1-ish), but also
merge to avoid a conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5ba2c377bb5a..9bada20e2b23 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -351,8 +351,20 @@ extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | |||
351 | struct nsproxy; | 351 | struct nsproxy; |
352 | struct user_namespace; | 352 | struct user_namespace; |
353 | 353 | ||
354 | /* Maximum number of active map areas.. This is a random (large) number */ | 354 | /* |
355 | #define DEFAULT_MAX_MAP_COUNT 65536 | 355 | * Default maximum number of active map areas, this limits the number of vmas |
356 | * per mm struct. Users can overwrite this number by sysctl but there is a | ||
357 | * problem. | ||
358 | * | ||
359 | * When a program's coredump is generated as ELF format, a section is created | ||
360 | * per a vma. In ELF, the number of sections is represented in unsigned short. | ||
361 | * This means the number of sections should be smaller than 65535 at coredump. | ||
362 | * Because the kernel adds some informative sections to a image of program at | ||
363 | * generating coredump, we need some margin. The number of extra sections is | ||
364 | * 1-3 now and depends on arch. We use "5" as safe margin, here. | ||
365 | */ | ||
366 | #define MAPCOUNT_ELF_CORE_MARGIN (5) | ||
367 | #define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) | ||
356 | 368 | ||
357 | extern int sysctl_max_map_count; | 369 | extern int sysctl_max_map_count; |
358 | 370 | ||
@@ -488,6 +500,15 @@ struct task_cputime { | |||
488 | .sum_exec_runtime = 0, \ | 500 | .sum_exec_runtime = 0, \ |
489 | } | 501 | } |
490 | 502 | ||
503 | /* | ||
504 | * Disable preemption until the scheduler is running. | ||
505 | * Reset by start_kernel()->sched_init()->init_idle(). | ||
506 | * | ||
507 | * We include PREEMPT_ACTIVE to avoid cond_resched() from working | ||
508 | * before the scheduler is active -- see should_resched(). | ||
509 | */ | ||
510 | #define INIT_PREEMPT_COUNT (1 + PREEMPT_ACTIVE) | ||
511 | |||
491 | /** | 512 | /** |
492 | * struct thread_group_cputimer - thread group interval timer counts | 513 | * struct thread_group_cputimer - thread group interval timer counts |
493 | * @cputime: thread group interval timers. | 514 | * @cputime: thread group interval timers. |