All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Martin Andersson <martin.andersson@control.lth.se>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org,
	Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>
Subject: Re: [Patch] task interactivity calculation (was Strange	interactivity behaviour)
Date: Tue, 28 Feb 2006 17:28:44 +0100	[thread overview]
Message-ID: <1141144124.7944.2.camel@homer> (raw)
In-Reply-To: <440466BC.8020801@control.lth.se>

On Tue, 2006-02-28 at 16:05 +0100, Martin Andersson wrote:
>  >On Tue, 2006-02-28 at 11:33 +0100, Martin Andersson wrote:
> >>The appended patch fixes the problem mentioned in 
> >>http://lkml.org/lkml/2006/2/27/104
> >>regarding wrong truncations in the calculation of task interactivity 
> >>when the nice value is negative. The problem causes the interactivity to 
> >>scale nonlinearly and differ from examples in the code.
> 
> Hi Mike,
> 
> Point taken. Is it correct now?

Looks perfect to me.

	-Mike

> 
> /Martin
> 
> Signed-off-by: Martin Andersson <martin.andersson@control.lth.se>
> 
> diff -uprN linux-2.6.15.4.orig/kernel/sched.c linux-2.6.15.4/kernel/sched.c
> --- linux-2.6.15.4.orig/kernel/sched.c	2006-02-10 08:22:48.000000000 +0100
> +++ linux-2.6.15.4/kernel/sched.c	2006-02-28 15:49:12.000000000 +0100
> @@ -142,7 +142,8 @@
>   	(v1) * (v2_max) / (v1_max)
> 
>   #define DELTA(p) \
> -	(SCALE(TASK_NICE(p), 40, MAX_BONUS) + INTERACTIVE_DELTA)
> +	(SCALE(TASK_NICE(p) + 20, 40, MAX_BONUS) - 20 * MAX_BONUS / 40 + \
> +	INTERACTIVE_DELTA)
> 
>   #define TASK_INTERACTIVE(p) \
>   	((p)->prio <= (p)->static_prio - DELTA(p))
> 


      reply	other threads:[~2006-02-28 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 11:40 Strange interactivity behaviour Martin Andersson
2006-02-28 10:33 ` [Patch] task interactivity calculation (was Strange interactivity behaviour) Martin Andersson
2006-02-28 14:07   ` Mike Galbraith
2006-02-28 15:05     ` Martin Andersson
2006-02-28 16:28       ` Mike Galbraith [this message]

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=1141144124.7944.2.camel@homer \
    --to=efault@gmx.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.andersson@control.lth.se \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.org \
    /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.