From: Mike Galbraith <efault@gmx.de>
To: Paolo Ornati <ornati@fastwebnet.it>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Con Kolivas <kernel@kolivas.org>, Ingo Molnar <mingo@elte.hu>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Peter Williams <pwil3058@bigpond.net.au>
Subject: Re: [SCHED] wrong priority calc - SIMPLE test case
Date: Tue, 10 Jan 2006 16:18:14 +0100 [thread overview]
Message-ID: <5.2.1.1.2.20060110153406.00be63e8@pop.gmx.net> (raw)
In-Reply-To: <20060110145321.00aa7040@localhost>
At 02:53 PM 1/10/2006 +0100, Paolo Ornati wrote:
>On Tue, 10 Jan 2006 14:01:36 +0100
>Mike Galbraith <efault@gmx.de> wrote:
>
> > > > Can you please try this version? It tries harder to correct any
> > >
> > >It seems that you have forgotten the to attach the patch...
> >
> > Drat. At least I'm not the first to ever do so :)
>
>This version basically works like the the previous, except that it makes
>the priority adjustment faster (that is fine).
>
>However I can fool it the same way.
>
>"./a.out 7000"
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5459 paolo 22 0 2392 288 228 S 71.3 0.1 0:09.47 a.out
>
>"./a.out 3000"
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5493 paolo 19 0 2396 292 228 R 49.8 0.1 0:14.42 a.out
>
>"./a.out 1500"
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5495 paolo 18 0 2396 288 228 S 33.4 0.1 0:09.60 a.out
>
>
>Fooling it:
>
>"./a.out 7000 & ./a.out 6537 & ./a.out 6347 & ./a.out 5873 &"
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5502 paolo 19 0 2392 288 228 R 27.0 0.1 0:05.64 a.out
> 5503 paolo 19 0 2396 288 228 R 26.0 0.1 0:07.50 a.out
> 5505 paolo 19 0 2396 292 228 R 25.6 0.1 0:07.24 a.out
> 5504 paolo 18 0 2392 288 228 R 21.0 0.1 0:06.78 a.out
>
>(priorities fluctuate between 18/19)
>
>
>Again with more of them:
>
>./a.out 7000 & ./a.out 6537 & ./a.out 6347 & ./a.out 5873& ./a.out 6245 &
>./a.out 5467 &
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5525 paolo 18 0 2396 288 228 R 26.4 0.1 0:07.48 a.out
> 5521 paolo 19 0 2396 288 228 R 22.0 0.1 0:09.00 a.out
> 5524 paolo 19 0 2392 288 228 R 19.6 0.1 0:07.21 a.out
> 5523 paolo 19 0 2392 288 228 R 13.0 0.1 0:10.60 a.out
> 5520 paolo 19 0 2392 288 228 R 11.0 0.1 0:08.46 a.out
> 5522 paolo 19 0 2396 288 228 R 7.8 0.1 0:07.14 a.out
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5528 paolo 18 0 2392 288 228 R 19.7 0.1 0:18.15 a.out
> 5533 paolo 15 0 2396 288 228 S 19.3 0.1 0:19.12 a.out
> 5531 paolo 18 0 2396 288 228 R 18.5 0.1 0:19.23 a.out
> 5532 paolo 17 0 2392 288 228 R 15.1 0.1 0:18.55 a.out
> 5529 paolo 18 0 2396 288 228 R 14.7 0.1 0:13.05 a.out
> 5530 paolo 18 0 2392 288 228 R 12.5 0.1 0:20.42 a.out
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 5530 paolo 18 0 2392 288 228 R 21.0 0.1 0:25.42 a.out
> 5533 paolo 18 0 2396 288 228 R 20.2 0.1 0:24.75 a.out
> 5529 paolo 18 0 2396 288 228 R 16.2 0.1 0:17.68 a.out
> 5532 paolo 18 0 2392 288 228 R 14.8 0.1 0:23.33 a.out
> 5531 paolo 18 0 2396 288 228 R 14.4 0.1 0:23.96 a.out
> 5528 paolo 18 0 2392 288 228 R 13.6 0.1 0:23.03 a.out
I don't think it's being fooled, it's pulling these guys down, it's just
that the plausible limit goes up the more tasks you're sharing the cpu
with, so they hit the throttle less. If you start a bunch of tasks who
only do a short burn such that their individual cpu usage isn't much, but
together they use all available cpu, you can still severely starve
non-sleeping == low priority tasks. This patch won't help for that...
that's an entirely different problem, and fortunately one that doesn't seem
to happen much in real life otherwise folks would be bitching like
crazy. To guard against it, there are a lot of different things you can
do. All of the ways that I know of are very bad for the desktop user, and
fortunately for me, beyond the intended scope of this patch :)
-Mike
next prev parent reply other threads:[~2006-01-10 15:18 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-27 18:09 [SCHED] Totally WRONG prority calculation with specific test-case (since 2.6.10-bk12) Paolo Ornati
2005-12-27 21:48 ` Paolo Ornati
2005-12-27 23:26 ` Con Kolivas
2005-12-28 11:01 ` Paolo Ornati
2005-12-28 11:19 ` Con Kolivas
2005-12-28 11:35 ` Paolo Ornati
2005-12-28 17:23 ` Paolo Ornati
2005-12-28 17:39 ` Paolo Ornati
2005-12-30 13:52 ` [SCHED] wrong priority calc - SIMPLE test case Paolo Ornati
2005-12-31 2:06 ` Peter Williams
2005-12-31 10:34 ` Paolo Ornati
2005-12-31 10:52 ` Paolo Ornati
2005-12-31 11:12 ` Con Kolivas
2005-12-31 13:44 ` Peter Williams
2005-12-31 16:31 ` Paolo Ornati
2005-12-31 22:04 ` Peter Williams
2005-12-31 8:13 ` Mike Galbraith
2005-12-31 11:00 ` Paolo Ornati
2005-12-31 15:11 ` Paolo Ornati
2005-12-31 16:37 ` Mike Galbraith
2005-12-31 17:24 ` Paolo Ornati
2005-12-31 17:42 ` Paolo Ornati
2006-01-01 11:39 ` Paolo Ornati
2006-01-02 9:15 ` Mike Galbraith
2006-01-02 9:50 ` Paolo Ornati
2006-01-09 11:11 ` Mike Galbraith
2006-01-09 15:52 ` Mike Galbraith
2006-01-09 16:08 ` Con Kolivas
2006-01-09 18:14 ` Mike Galbraith
2006-01-09 20:00 ` Paolo Ornati
2006-01-09 20:23 ` Paolo Ornati
2006-01-10 7:08 ` Mike Galbraith
2006-01-10 12:07 ` Mike Galbraith
2006-01-10 12:56 ` Paolo Ornati
2006-01-10 13:01 ` Mike Galbraith
2006-01-10 13:53 ` Paolo Ornati
2006-01-10 15:18 ` Mike Galbraith [this message]
2006-01-13 1:13 ` Con Kolivas
2006-01-13 1:32 ` Con Kolivas
2006-01-13 10:46 ` Paolo Ornati
2006-01-13 10:51 ` Con Kolivas
2006-01-13 13:01 ` Mike Galbraith
2006-01-13 14:34 ` Con Kolivas
2006-01-13 16:15 ` Mike Galbraith
2006-01-14 2:05 ` Con Kolivas
2006-01-14 2:56 ` Mike Galbraith
2005-12-27 23:59 ` [SCHED] Totally WRONG prority calculation with specific test-case (since 2.6.10-bk12) Peter Williams
2005-12-28 10:20 ` Paolo Ornati
2005-12-28 13:38 ` Peter Williams
2005-12-28 19:45 ` Paolo Ornati
2005-12-29 3:13 ` Nick Piggin
2005-12-29 3:35 ` Peter Williams
2005-12-29 8:11 ` Nick Piggin
2006-01-27 16:57 [SCHED] wrong priority calc - SIMPLE test case Con Kolivas
2006-01-27 20:06 ` MIke Galbraith
2006-01-27 23:18 ` Con Kolivas
2006-01-28 0:01 ` Peter Williams
2006-01-28 3:43 ` MIke Galbraith
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=5.2.1.1.2.20060110153406.00be63e8@pop.gmx.net \
--to=efault@gmx.de \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=ornati@fastwebnet.it \
--cc=pwil3058@bigpond.net.au \
/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
Powered by JetHome