From: tip-bot for Mike Galbraith <efault@gmx.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
peterz@infradead.org, efault@gmx.de, mzxreary@0pointer.de,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:sched/core] sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks
Date: Wed, 17 Jun 2009 16:36:44 GMT [thread overview]
Message-ID: <tip-6c697bdf08a09ce461e305a22362973036e95db3@git.kernel.org> (raw)
In-Reply-To: <1245228482.27326.1.camel@marge.simson.net>
Commit-ID: 6c697bdf08a09ce461e305a22362973036e95db3
Gitweb: http://git.kernel.org/tip/6c697bdf08a09ce461e305a22362973036e95db3
Author: Mike Galbraith <efault@gmx.de>
AuthorDate: Wed, 17 Jun 2009 10:48:02 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 17 Jun 2009 18:34:18 +0200
sched: Add SCHED_RESET_ON_FORK functionality for nice < 0 tasks
Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Lennart Poettering <mzxreary@0pointer.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1245228482.27326.1.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 50e4e3d..34f9424 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2627,6 +2627,11 @@ void sched_fork(struct task_struct *p, int clone_flags)
if (p->normal_prio < DEFAULT_PRIO)
p->prio = DEFAULT_PRIO;
+ if (PRIO_TO_NICE(p->static_prio) < 0) {
+ p->static_prio = NICE_TO_PRIO(0);
+ set_load_weight(p);
+ }
+
/*
* We don't need the reset flag anymore after the fork. It has
* fulfilled its duty:
next prev parent reply other threads:[~2009-06-17 16:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 15:27 [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, fourth try Lennart Poettering
2009-06-15 15:37 ` [tip:sched/core] sched: Introduce SCHED_RESET_ON_FORK scheduling policy flag tip-bot for Lennart Poettering
2009-06-16 9:05 ` [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, fourth try Mike Galbraith
2009-06-16 16:47 ` Lennart Poettering
2009-06-17 8:46 ` [patch 1/2] " Mike Galbraith
2009-06-17 8:48 ` [patch 2/2] " Mike Galbraith
2009-06-17 16:36 ` tip-bot for Mike Galbraith [this message]
2009-06-17 16:36 ` [tip:sched/core] sched: Clean up SCHED_RESET_ON_FORK tip-bot for Mike Galbraith
2009-06-17 10:32 ` [tip:sched/core] sched: Introduce SCHED_RESET_ON_FORK scheduling policy flag, fix tip-bot for Mike Galbraith
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=tip-6c697bdf08a09ce461e305a22362973036e95db3@git.kernel.org \
--to=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=mzxreary@0pointer.de \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.