linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [SCHED] Totally WRONG prority calculation with specific test-case (since 2.6.10-bk12)
@ 2005-12-27 18:09 Paolo Ornati
  2005-12-27 21:48 ` Paolo Ornati
  0 siblings, 1 reply; 58+ messages in thread
From: Paolo Ornati @ 2005-12-27 18:09 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hello,

I've found an easy-to-reproduce-for-me test case that shows a totally
wrong priority calculation: basically a CPU-intensitive process gets
better priority than a disk-intensitive one (dd if=bigfile
of=/dev/null ...).

Seems impossible, isn't it?

---- THE NUMBERS with 2.6.15-rc7 -----

The test-case is the Xvid encoding of dvd-ripped track with transcode
(using "dvd::rip" interface). The copied-and-pasted command line is
this:

mkdir -m 0775 -p '/home/paolo/tmp/test/tmp' &&
cd /home/paolo/tmp/test/tmp && dr_exec transcode -H 10 -a 2 -x vob,null
-i /home/paolo/tmp/test/vob/003 -w 1198,50 -b 128,0,0 -s 1.972
--a52_drc_off -f 25 -Y 52,8,52,8 -B 27,10,8 -R 1 -y xvid4,null
-o /dev/null --print_status 20 && echo DVDRIP_SUCCESS mkdir -m 0775 -p
'/home/paolo/tmp/test/tmp' && cd /home/paolo/tmp/test/tmp && dr_exec
transcode -H 10 -a 2 -x vob -i /home/paolo/tmp/test/vob/003 -w 1198,50
-b 128,0,0 -s 1.972 --a52_drc_off -f 25 -Y 52,8,52,8 -B 27,10,8 -R 2 -y
xvid4 -o /home/paolo/tmp/test/avi/003/test-003.avi --print_status 20 &&
echo DVDRIP_SUCCESS


Here there is a TOP snapshot while running it:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5721 paolo     16   0  115m  18m 2428 R 84.4  3.7   0:15.11 transcode
 5736 paolo     25   0 50352 4516 1912 R  8.4  0.9   0:01.53 tcdecode
 5725 paolo     15   0  115m  18m 2428 S  4.6  3.7   0:00.84 transcode
 5738 paolo     18   0  115m  18m 2428 S  0.8  3.7   0:00.15 transcode
 5734 paolo     25   0 20356 1140  920 S  0.6  0.2   0:00.12 tcdemux
 5731 paolo     25   0 47312 2540 1996 R  0.4  0.5   0:00.08 tcdecode
 5319 root      15   0  166m  16m 2584 S  0.2  3.2   0:25.06 X
 5444 paolo     16   0 87116  22m  15m R  0.2  4.6   0:04.05 konsole
 5716 paolo     16   0 10424 1160  876 R  0.2  0.2   0:00.06 top
 5735 paolo     25   0 22364 1436  932 S  0.2  0.3   0:00.01 tcextract


DD running alone:

paolo@tux /mnt $ mount space/; time dd if=space/bigfile of=/dev/null bs=1M count=128; umount space/
128+0 records in
128+0 records out

real    0m4.052s
user    0m0.000s
sys     0m0.209s

DD while transcoding:

paolo@tux /mnt $ mount space/; time dd if=space/bigfile of=/dev/null bs=1M count=128; umount space/
128+0 records in
128+0 records out

real    0m26.121s
user    0m0.001s
sys     0m0.255s

---------------------------------------

I've tried older kernels finding that 2.6.11 is the first affected.

Going on with testing...

        2.6.11-rc[1-5]:
2.6.11-rc3 bad
2.6.11-rc1 bad

        2.6.10-bk[1-14]
2.6.10-bk7 good
2.6.10-bk11 good
2.6.10-bk13 bad
2.6.10-bk12 bad

So the problem was introduced with:
	>> 2.6.10-bk12 09-Jan-2005 <<

The exact behaviour is different with 2.6.11/12/13/14... for example:
with 2.6.11 the priority of "transcode" is initially set to ~25 and go
down to 17/18 when running DD.

The problem doesn't seem 100% reproducible with every kernel, sometimes
a "BAD" kernel looks "GOOD"... or maybe it was me confused by too
much compile/install/reboot/test work ;)

Other INFO:
- I'm on x86_64
- preemption ON/OFF doesn't make any differences


Can anyone reproduce this?
IOW: is this affecting only my machine?

-- 
	Paolo Ornati
	Linux 2.6.15-rc7-gf89f5948 on x86_64

^ permalink raw reply	[flat|nested] 58+ messages in thread
* Re: [SCHED] wrong priority calc - SIMPLE test case
@ 2006-01-27 16:57 Con Kolivas
  2006-01-27 20:06 ` MIke Galbraith
  0 siblings, 1 reply; 58+ messages in thread
From: Con Kolivas @ 2006-01-27 16:57 UTC (permalink / raw)
  To: Mike Galbraith
  Cc: Paolo Ornati, Linux Kernel Mailing List, Ingo Molnar,
	Nick Piggin, Andrew Morton

On Saturday 14 January 2006 03:15, Mike Galbraith wrote:
 > At 01:34 AM 1/14/2006 +1100, Con Kolivas wrote:
 > >On Saturday 14 January 2006 00:01, Mike Galbraith wrote:
 > > > At 09:51 PM 1/13/2006 +1100, Con Kolivas wrote:
 > > > >See my followup patches that I have posted following "[PATCH 0/5]
 > > > > sched - interactivity updates". The first 3 patches are what you
 > > > > tested. These patches are being put up for testing hopefully in -mm.
 > > >
 > > > Then the (buggy) version of my simple throttling patch will need to
 > > > come out.  (which is OK, I have a debugged potent++ version)
 > >
 > >Your code need not be mutually exclusive with mine. I've simply damped the
 > >current behaviour. Your sanity throttling is a good idea.
 >
 > I didn't mean to imply that they're mutually exclusive, and after doing
 > some testing, I concluded that it (or something like it) is definitely
 > still needed.  The version that's in mm2 _is_ buggy however, so ripping it
 > back out wouldn't hurt my delicate little feelings one bit.  In fact, it
 > would give me some more time to instrument and test integration with your
 > changes.

Ok I've communicated this to Andrew (cc'ed here too) so he should remove your
patch pending a new version from you.

 > (Which I think are good btw because they remove what I considered
 > to be warts; the pipe and uninterruptible sleep barriers.

Yes I felt your abuse wrt to these in an earlier email...

 > Um... try irman2
 > now... pure evilness)

Hrm I've been using staircase which is immune for so long I'd all but
forgotten about this test case. Looking at your code I assume your changes
should help this?

Con
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

end of thread, other threads:[~2006-01-28  3:42 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).