mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: SD scheduler testing hitch
@ 2007-04-08 18:34 Al Boldi
  2007-04-09  6:23 ` Mike Galbraith
  0 siblings, 1 reply; 10+ messages in thread
From: Al Boldi @ 2007-04-08 18:34 UTC (permalink / raw)
  To: linux-kernel

Mike Galbraith wrote:
> On Sat, 2007-04-07 at 19:17 +0200, Mike Galbraith wrote:
> > I lowered the time to 500us, and ran at nice -10.. it starves tenpercent
> > here every time.  (ran as taskset -c 1 nice -n -10 ./fairtest)  The
> > starving 10% duty cycle task has trouble getting 1% CPU.
>
> Hmm.  Playing with it some more today, it still happens, but it's not
> very repeatable.  Something is odd.  I wonder if any SD using readers
> will try it.

Tried it on mainline 2.6.20.3.
It's not easily repeatable, but it's got the same problem.

top - 21:21:45 up 27 min,  0 users,  load average: 0.80, 0.43, 0.20
Tasks:  45 total,   3 running,  42 sleeping,   0 stopped,   0 zombie
Cpu(s):  24.3% user,   0.5% system,   0.0% nice,  75.0% idle,   0.2% IO-wait
Mem:    499488k total,    27352k used,   472136k free,     1996k buffers
Swap:  1020088k total,        0k used,  1020088k free,     9160k cached

  PID  PR  NI  VIRT  RES  SHR SWAP nFLT nDRT WCHAN     S %CPU    TIME+  Command 
  688  25   0  1804  412  352 1392    0    0 rest_init R 94.7   2:37.01 fairtest
  689  15   0  1804  264  204 1540    0    0 rest_init R  0.0   0:00.79 fairtest
    1  15   0  1440  500  444  940   15    0 rest_init S  0.0   0:00.73 init    


Thanks!

--
Al


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [sched] redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array
@ 2007-04-04 14:04 Dmitry Adamushko
  2007-04-04 14:15 ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Adamushko @ 2007-04-04 14:04 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Andrew Morton, Linux Kernel

Hello,

Scenario:

Currently running [task1] boosts a priority (lowers a static_prio) of
[task2] via { setpriority -> set_user_nice } and [task2] happens to be
in the "expired" array at the moment.

According to the set_user_nice(), "delta" is negative (the prio is
boosted) and, hence, resched_task(rq->curr) is called.

As the [task2] is in the "expired" array and there are still tasks (at
least [task1]) in the "active" one, the triggered reschedule is just
useless (e.g. gets control back to [task1]).

Am I missing something?

The same is applicable to rt_mutex_setprio().

Of course, not a big deal, but it's easily avoidable, e.g. (delta < 0
&& array == rq->active).

Thanks in advance for any comments.

-- 
Best regards,
Dmitry Adamushko

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-04-09  9:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-08 18:34 SD scheduler testing hitch Al Boldi
2007-04-09  6:23 ` Mike Galbraith
2007-04-09  9:20   ` Dmitry Adamushko
2007-04-09  9:57     ` Mike Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2007-04-04 14:04 [sched] redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array Dmitry Adamushko
2007-04-04 14:15 ` Ingo Molnar
2007-04-04 20:05   ` [PATCH] " Dmitry Adamushko
2007-04-07  0:03     ` Andrew Morton
2007-04-07  9:24       ` Ingo Molnar
2007-04-07 16:20         ` SD scheduler testing hitch Mike Galbraith
2007-04-07 17:17           ` Mike Galbraith
2007-04-08  8:02             ` Mike Galbraith
2007-04-09  0:14               ` Dmitry Adamushko
2007-04-09  0:23                 ` Dmitry Adamushko
2007-04-09  5:54                   ` Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®