diff options
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 4d075426988..16a982e389f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -349,8 +349,20 @@ extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | |||
349 | struct nsproxy; | 349 | struct nsproxy; |
350 | struct user_namespace; | 350 | struct user_namespace; |
351 | 351 | ||
352 | /* Maximum number of active map areas.. This is a random (large) number */ | 352 | /* |
353 | #define DEFAULT_MAX_MAP_COUNT 65536 | 353 | * Default maximum number of active map areas, this limits the number of vmas |
354 | * per mm struct. Users can overwrite this number by sysctl but there is a | ||
355 | * problem. | ||
356 | * | ||
357 | * When a program's coredump is generated as ELF format, a section is created | ||
358 | * per a vma. In ELF, the number of sections is represented in unsigned short. | ||
359 | * This means the number of sections should be smaller than 65535 at coredump. | ||
360 | * Because the kernel adds some informative sections to a image of program at | ||
361 | * generating coredump, we need some margin. The number of extra sections is | ||
362 | * 1-3 now and depends on arch. We use "5" as safe margin, here. | ||
363 | */ | ||
364 | #define MAPCOUNT_ELF_CORE_MARGIN (5) | ||
365 | #define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) | ||
354 | 366 | ||
355 | extern int sysctl_max_map_count; | 367 | extern int sysctl_max_map_count; |
356 | 368 | ||
@@ -486,6 +498,15 @@ struct task_cputime { | |||
486 | .sum_exec_runtime = 0, \ | 498 | .sum_exec_runtime = 0, \ |
487 | } | 499 | } |
488 | 500 | ||
501 | /* | ||
502 | * Disable preemption until the scheduler is running. | ||
503 | * Reset by start_kernel()->sched_init()->init_idle(). | ||
504 | * | ||
505 | * We include PREEMPT_ACTIVE to avoid cond_resched() from working | ||
506 | * before the scheduler is active -- see should_resched(). | ||
507 | */ | ||
508 | #define INIT_PREEMPT_COUNT (1 + PREEMPT_ACTIVE) | ||
509 | |||
489 | /** | 510 | /** |
490 | * struct thread_group_cputimer - thread group interval timer counts | 511 | * struct thread_group_cputimer - thread group interval timer counts |
491 | * @cputime: thread group interval timers. | 512 | * @cputime: thread group interval timers. |