lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1289416881.2084.41.camel@laptop>
Date:	Wed, 10 Nov 2010 20:21:21 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Raistlin <raistlin@...ux.it>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Chris Friesen <cfriesen@...tel.com>, oleg@...hat.com,
	Frederic Weisbecker <fweisbec@...il.com>,
	Darren Hart <darren@...art.com>,
	Johan Eker <johan.eker@...csson.com>,
	"p.faure" <p.faure@...tech.ch>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Claudio Scordino <claudio@...dence.eu.com>,
	michael trimarchi <trimarchi@...is.sssup.it>,
	Fabio Checconi <fabio@...dalf.sssup.it>,
	Tommaso Cucinotta <cucinotta@...up.it>,
	Juri Lelli <juri.lelli@...il.com>,
	Nicola Manica <nicola.manica@...i.unitn.it>,
	Luca Abeni <luca.abeni@...tn.it>,
	Dhaval Giani <dhaval@...is.sssup.it>,
	Harald Gustafsson <hgu1972@...il.com>,
	paulmck <paulmck@...ux.vnet.ibm.com>
Subject: Re: [RFC][PATCH 05/22] sched: SCHED_DEADLINE policy implementation

On Fri, 2010-10-29 at 08:30 +0200, Raistlin wrote:
> +       if (task_has_dl_policy(p) || task_has_rt_policy(p)) {
> +               p->se.load.weight = 0;
> +               p->se.load.inv_weight = WMULT_CONST;
> +               return;
> +       } 

---
commit 17bdcf949d03306b308c5fb694849cd35f119807
Author: Linus Walleij <linus.walleij@...ricsson.com>
Date:   Mon Oct 11 16:36:51 2010 +0200

    sched: Drop all load weight manipulation for RT tasks
    
    Load weights are for the CFS, they do not belong in the RT task. This makes all
    RT scheduling classes leave the CFS weights alone.
    
    This fixes a real bug as well: I noticed the following phonomena: a process
    elevated to SCHED_RR forks with SCHED_RESET_ON_FORK set, and the child is
    indeed SCHED_OTHER, and the niceval is indeed reset to 0. However the weight
    inserted by set_load_weight() remains at 0, giving the task insignificat
    priority.
    
    With this fix, the weight is reset to what the task had before being elevated
    to SCHED_RR/SCHED_FIFO.
    
    Cc: Lennart Poettering <lennart@...ttering.net>
    Cc: stable@...nel.org
    Signed-off-by: Linus Walleij <linus.walleij@...ricsson.com>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
    LKML-Reference: <1286807811-10568-1-git-send-email-linus.walleij@...ricsson.com>
    Signed-off-by: Ingo Molnar <mingo@...e.hu>

diff --git a/kernel/sched.c b/kernel/sched.c
index 5f64fed..728081a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1855,12 +1855,6 @@ static void dec_nr_running(struct rq *rq)
 
 static void set_load_weight(struct task_struct *p)
 {
-	if (task_has_rt_policy(p)) {
-		p->se.load.weight = 0;
-		p->se.load.inv_weight = WMULT_CONST;
-		return;
-	}
-
 	/*
 	 * SCHED_IDLE tasks get minimal weight:
 	 */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ