* [PATCH][plugsched 15/28] oom support function
@ 2004-10-30 14:39 Con Kolivas
0 siblings, 0 replies; only message in thread
From: Con Kolivas @ 2004-10-30 14:39 UTC (permalink / raw)
To: linux
Cc: Andrew Morton, Ingo Molnar, Peter Williams,
William Lee Irwin III, Alexander Nyberg, Nick Piggin
[-- Attachment #1.1: Type: text/plain, Size: 23 bytes --]
oom support function
[-- Attachment #1.2: oom_compat.diff --]
[-- Type: text/x-patch, Size: 1356 bytes --]
__oom_kill_task sets a specific time_slice; modify it to have it's
time_slice adjusted in a cpu-scheduler dependant fashion.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
Index: linux-2.6.10-rc1-mm2-plugsched1/include/linux/sched.h
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/include/linux/sched.h 2004-10-29 21:47:05.007044378 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/include/linux/sched.h 2004-10-29 21:47:46.780525066 +1000
@@ -741,6 +741,7 @@ extern int task_prio(const task_t *p);
extern int task_nice(const task_t *p);
extern int task_curr(const task_t *p);
extern int idle_cpu(int cpu);
+extern void set_oom_timeslice(task_t *p);
void yield(void);
Index: linux-2.6.10-rc1-mm2-plugsched1/mm/oom_kill.c
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/mm/oom_kill.c 2004-10-29 21:42:40.068391609 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/mm/oom_kill.c 2004-10-29 21:47:46.781524910 +1000
@@ -156,7 +156,7 @@ static void __oom_kill_task(task_t *p)
* all the memory it needs. That way it should be able to
* exit() and clear out its resources quickly...
*/
- p->time_slice = HZ;
+ set_oom_timeslice(p);
p->flags |= PF_MEMALLOC | PF_MEMDIE;
/* This process has hardware access, be more careful. */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-30 15:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-30 14:39 [PATCH][plugsched 15/28] oom support function Con Kolivas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome