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: <alpine.LFD.2.00.0903121524370.29264@localhost.localdomain>
Date:	Thu, 12 Mar 2009 15:25:22 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Peter Zijlstra <peterz@...radead.org>
cc:	Arjan van de Ven <arjan@...ux.intel.com>, mingo@...hat.com,
	hpa@...or.com, dvhltc@...ibm.com, linux-kernel@...r.kernel.org,
	rusty@...tcorp.com.au, mingo@...e.hu,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:core/futexes] futex: use current->time_slack_ns for rt
 tasks too

On Thu, 12 Mar 2009, Peter Zijlstra wrote:

> On Thu, 2009-03-12 at 06:53 -0700, Arjan van de Ven wrote:
> > Darren Hart wrote:
> > > Commit-ID:  16f4993f4e9860715918efd4eeac928f8de1218b
> > > Gitweb:     http://git.kernel.org/tip/16f4993f4e9860715918efd4eeac928f8de1218b
> > > Author:     "Darren Hart" <dvhltc@...ibm.com>
> > > AuthorDate: Thu, 12 Mar 2009 00:55:59 -0700
> > > Commit:     Ingo Molnar <mingo@...e.hu>
> > > CommitDate: Thu, 12 Mar 2009 11:20:57 +0100
> > > 
> > > futex: use current->time_slack_ns for rt tasks too
> > > 
> > > RT tasks should set their timer slack to 0 on their own.  This
> > > patch removes the 'if (rt_task()) slack = 0;' block in
> > > futex_wait.
> > 
> > Hi,
> > 
> > can you explain the rationale for this reasoning?
> 
> Yeah, I found it iffy as well, I think we want something like the below
> instead though..

Yup, that's what I meant when I hollered about the timer_slack_ns
hackery in futex.c

Thanks,

	tglx

> ---
> 
> Subject: sched: adjust timer_slack_ns on scheduler policy change
> From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Date: Thu Mar 12 15:01:02 CET 2009
> 
> Ensure RT tasks have 0 timer slack.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
>  kernel/sched.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-2.6/kernel/sched.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched.c
> +++ linux-2.6/kernel/sched.c
> @@ -5511,10 +5511,12 @@ __setscheduler(struct rq *rq, struct tas
>  	case SCHED_NORMAL:
>  	case SCHED_BATCH:
>  	case SCHED_IDLE:
> +		p->timer_slack_ns = p->default_timer_slack_ns;
>  		p->sched_class = &fair_sched_class;
>  		break;
>  	case SCHED_FIFO:
>  	case SCHED_RR:
> +		p->timer_slack_ns = 0;
>  		p->sched_class = &rt_sched_class;
>  		break;
>  	}
> 
--
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