public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Naoaki MAEDA" <maeda.naoaki@gmail.com>
To: "MAEDA Naoaki" <maeda.naoaki@jp.fujitsu.com>
Cc: "Mike Galbraith" <efault@gmx.de>,
	linux-kernel@vger.kernel.org, ckrm-tech@lists.sourceforge.net
Subject: Re: [ckrm-tech] Re: [RFC][PATCH 3/9] CPU controller - Adds timeslice scaling
Date: Fri, 21 Apr 2006 20:50:26 +0900	[thread overview]
Message-ID: <9fe69740604210450h798eded8nff1ef8b98c0f151@mail.gmail.com> (raw)
In-Reply-To: <44489E27.2090108@jp.fujitsu.com>

> Mike Galbraith wrote:
> > On Fri, 2006-04-21 at 11:27 +0900, maeda.naoaki@jp.fujitsu.com wrote:
> >> Index: linux-2.6.17-rc2/kernel/sched.c
> >> ===================================================================
> >> --- linux-2.6.17-rc2.orig/kernel/sched.c
> >> +++ linux-2.6.17-rc2/kernel/sched.c
> >> @@ -173,10 +173,17 @@
> >>
> >>  static unsigned int task_timeslice(task_t *p)
> >>  {
> >> +    unsigned int timeslice;
> >> +
> >>      if (p->static_prio < NICE_TO_PRIO(0))
> >> -            return SCALE_PRIO(DEF_TIMESLICE*4, p->static_prio);
> >> +            timeslice = SCALE_PRIO(DEF_TIMESLICE*4, p->static_prio);
> >>      else
> >> -            return SCALE_PRIO(DEF_TIMESLICE, p->static_prio);
> >> +            timeslice = SCALE_PRIO(DEF_TIMESLICE, p->static_prio);
> >> +
> >> +    if (!TASK_INTERACTIVE(p))
> >> +            timeslice = cpu_rc_scale_timeslice(p, timeslice);
> >> +
> >> +    return timeslice;
> >>  }
> >
> > Why does timeslice scaling become undesirable if TASK_INTERACTIVE(p)?
> > With this barrier, you will completely disable scaling for many loads.
>
> Because interactive tasks tend to spend very small timeslice at one
> time, scaling timeslice for these tasks is not effective to control
> CPU spent.

It was not good explanation. Let me restate that.
The effect of shortening timeslice is to let the task be expired soon
by shortening
its remainder timeclice, so it still works even if the task consome very small
timeslice at one time. However, expired TASK_INTERACTIVE tasks will be requeued
to the active for a while by the scheduler, so shortening timeslice
doesn't work well for
TASK_INTERACTIVE tasks.

Thanks,
MAEDA Naoaki

  reply	other threads:[~2006-04-21 11:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21  2:27 [RFC][PATCH 0/9] CKRM CPU resource controller maeda.naoaki
2006-04-21  2:27 ` [RFC][PATCH 1/9] CPU controller - Adds class load estimation maeda.naoaki
2006-04-21  2:27 ` [RFC][PATCH 2/9] CPU controller - Adds class hungry detection maeda.naoaki
2006-04-21  2:27 ` [RFC][PATCH 3/9] CPU controller - Adds timeslice scaling maeda.naoaki
2006-04-21  8:17   ` Mike Galbraith
2006-04-21  8:56     ` MAEDA Naoaki
2006-04-21 11:50       ` Naoaki MAEDA [this message]
2006-04-21 12:03         ` [ckrm-tech] " Mike Galbraith
2006-04-21 11:53       ` Mike Galbraith
2006-04-21  2:27 ` [RFC][PATCH 4/9] CPU controller - Adds interface functions maeda.naoaki
2006-04-21  2:27 ` [RFC][PATCH 5/9] CPU controller - Documents how the controller works maeda.naoaki
2006-04-23  7:13   ` Mike Galbraith
2006-04-24  6:25     ` [ckrm-tech] " MAEDA Naoaki
2006-04-24  9:49       ` Mike Galbraith
2006-04-21  2:27 ` [RFC][PATCH 6/9] CPU controller - Adds basic functions and registering the controller maeda.naoaki
2006-04-21  2:28 ` [RFC][PATCH 7/9] CPU controller - Adds routines to change share values and show stat maeda.naoaki
2006-04-21  2:28 ` [RFC][PATCH 8/9] CPU controller - Adds cpu hotplug notifier maeda.naoaki
2006-04-21  2:28 ` [RFC][PATCH 9/9] CPU controller - Documents how to use the controller maeda.naoaki

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=9fe69740604210450h798eded8nff1ef8b98c0f151@mail.gmail.com \
    --to=maeda.naoaki@gmail.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maeda.naoaki@jp.fujitsu.com \
    /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