summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-18 15:50:22 +0200
committerIngo Molnar <mingo@elte.hu>2009-07-18 15:50:40 +0200
commit5304d5fc74a269cc6c3e70f9713684ca729abdf0 (patch)
tree6a5db62915abd260241a2b9aee34086c93293ca6 /include/linux/sched.h
parent54d35f29f49224d86b994acb6e5969b9ba09022d (diff)
parent78af08d90b8f745044b1274430bc4bc6b2b27aca (diff)
downloadop-kernel-dev-5304d5fc74a269cc6c3e70f9713684ca729abdf0.zip
op-kernel-dev-5304d5fc74a269cc6c3e70f9713684ca729abdf0.tar.gz
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.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5ba2c37..9bada20 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);
struct nsproxy;
struct user_namespace;
-/* Maximum number of active map areas.. This is a random (large) number */
-#define DEFAULT_MAX_MAP_COUNT 65536
+/*
+ * Default maximum number of active map areas, this limits the number of vmas
+ * per mm struct. Users can overwrite this number by sysctl but there is a
+ * problem.
+ *
+ * When a program's coredump is generated as ELF format, a section is created
+ * per a vma. In ELF, the number of sections is represented in unsigned short.
+ * This means the number of sections should be smaller than 65535 at coredump.
+ * Because the kernel adds some informative sections to a image of program at
+ * generating coredump, we need some margin. The number of extra sections is
+ * 1-3 now and depends on arch. We use "5" as safe margin, here.
+ */
+#define MAPCOUNT_ELF_CORE_MARGIN (5)
+#define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
extern int sysctl_max_map_count;
@@ -488,6 +500,15 @@ struct task_cputime {
.sum_exec_runtime = 0, \
}
+/*
+ * Disable preemption until the scheduler is running.
+ * Reset by start_kernel()->sched_init()->init_idle().
+ *
+ * We include PREEMPT_ACTIVE to avoid cond_resched() from working
+ * before the scheduler is active -- see should_resched().
+ */
+#define INIT_PREEMPT_COUNT (1 + PREEMPT_ACTIVE)
+
/**
* struct thread_group_cputimer - thread group interval timer counts
* @cputime: thread group interval timers.
OpenPOWER on IntegriCloud