__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 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. */