public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gregory Haskins" <ghaskins@novell.com>
To: "Peter Zijlstra" <peterz@infradead.org>
Cc: <mingo@elte.hu>, <rostedt@goodmis.org>,
	<linux-kernel@vger.kernel.org>, <linux-rt-users@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH 2/2] sched: readjust the load whenever task_setprio()is invoked
Date: Fri, 18 Jul 2008 07:01:58 -0600	[thread overview]
Message-ID: <48805C06.BA47.005A.0@novell.com> (raw)
In-Reply-To: <1216384984.28405.36.camel@twins>

>>> On Fri, Jul 18, 2008 at  8:43 AM, in message <1216384984.28405.36.camel@twins>,
Peter Zijlstra <peterz@infradead.org> wrote: 
> On Thu, 2008-07-03 at 15:37 -0600, Gregory Haskins wrote:
>> The load may change with the priority, so be sure to recompute its value.
>> 
>> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
>> CC: Peter Zijlstra <peterz@infradead.org>
>> CC: Ingo Molnar <mingo@elte.hu>
> 
> Right, but in this case we'd need to do the dec/inc load game again
> because otherwise we'll skew stuff - see the previuos mail on how
> dequeue_task() doesn't actually do that.
> 
> Also, it looks like current mainline still has this issue.
> 
> OTOH - since prio boosting is a temporal feature, not changing the load
> isn't too bad, we ought to get back to where we came from pretty
> quickly.

Yeah, I agree.  This issue probably didn't actually matter much in practice.

It just "looked" wrong, so I figured I'd fix it ;)

-Greg

> 
> 
> 
>> ---
>> 
>>  kernel/sched.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/kernel/sched.c b/kernel/sched.c
>> index b046754..c3f41b9 100644
>> --- a/kernel/sched.c
>> +++ b/kernel/sched.c
>> @@ -4637,6 +4637,7 @@ void task_setprio(struct task_struct *p, int prio)
>>  		p->sched_class = &fair_sched_class;
>>  
>>  	p->prio = prio;
>> +	set_load_weight(p);
>>  
>>  //	trace_special_pid(p->pid, __PRIO(oldprio), PRIO(p));
>>  	prev_resched = _need_resched();
>> 




      reply	other threads:[~2008-07-18 12:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 21:37 [PATCH 0/2] sched: misc fixes for stable-25.y and 25-rt Gregory Haskins
2008-07-03 21:37 ` [PATCH 1/2] sched: remove extraneous load manipulations Gregory Haskins
2008-07-18 12:39   ` Peter Zijlstra
2008-07-18 12:53     ` Gregory Haskins
2008-07-21 22:06     ` Gregory Haskins
2008-07-03 21:37 ` [PATCH 2/2] sched: readjust the load whenever task_setprio() is invoked Gregory Haskins
2008-07-18 12:43   ` Peter Zijlstra
2008-07-18 13:01     ` Gregory Haskins [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=48805C06.BA47.005A.0@novell.com \
    --to=ghaskins@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox