From: Con Kolivas <kernel@kolivas.org>
To: linux <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
Peter Williams <pwil3058@bigpond.net.au>,
William Lee Irwin III <wli@holomorphy.com>,
Alexander Nyberg <alexn@dsv.su.se>,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: [PATCH][plugsched 15/28] oom support function
Date: Sun, 31 Oct 2004 00:39:33 +1000 [thread overview]
Message-ID: <4183A7A5.1080805@kolivas.org> (raw)
[-- 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 --]
reply other threads:[~2004-10-30 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4183A7A5.1080805@kolivas.org \
--to=kernel@kolivas.org \
--cc=akpm@osdl.org \
--cc=alexn@dsv.su.se \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=pwil3058@bigpond.net.au \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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