Scheduling: interactive problems still there in 129

Neil Conway (nconway.list@ukaea.org.uk)
Fri, 20 Nov 1998 10:28:17 +0000


This has been mentioned by many people so far (I seem to recall even
seeing patches) but is still there in 129.

To observe why I think it's a real bug, read on.

On a 2.0.34 UP machine, I ran a CPU hog (no I/O), then in another
window, held down a key (say 'h') and watched the shell print lots of
h's to my window. No problem whatsoever, nice uniform speed and
response.

Now on a 2.1.129 SMP machine (2 cpus) I run two copies of the same CPU
hog. Now my key-holding down gets lots of pauses, some short, some
quite long (like the odd one is 100's of milliseconds) (measured by eye
:-)).

Interesting aside: in a bash, holding down the 'enter' key produces
reasonably frequent command prompts while this is going on but still
quite jerky. In a tcsh on the other hand, holding down 'enter' produces
command prompts at the rate of only about 5 per second, i.e. realllly
slow. I don't understand this, and quick tests with strace didn't
enlighten me as to why it was taking so long.

Sorry Linus, but you were right to hang back a bit from 2.2 - if the
patch that was floating around out there (don't have it anymore, sorry)
works, should we not use it ?

Nuther aside re scheduling, and (as is my style!) it's a prelim cos I
have had no time recently to test this: when I run say 3 CPU hogs on a
2 CPU machine, each of which needs say 1 minute of CPU time, and I start
them maybe 2 seconds apart, I get the weird effect that the first one to
start gets CONSISTENTLY more CPU time than the others - I mean it gets
instead of 66% ish, more like 75% ish of a CPU, and pulls further and
further ahead of its buddies as the run-time increases (watching total
cpu time from top). This bug was present in 2.1.106 and I can't swear
to it still being there. Similarly, the 2nd job gets more CPU than the
first (and I don't just mean because it started earlier). I presume
this implies a sorting problem in the scheduler code ?

Neil

PS: Apologies to all for sitting on these bugs and not speaking up. I'm
a physicist by profession, and I officially spend 0% of my job doing
this. I have been hanging back due to thinking maybe the bugs weren't
real and not wanting to waste time until I had fully checked them out,
but Christmas (and 2.2) is coming too and I still... So I've decided
it's better to alert people with partial reports than wait forever for
the finished article and let 2.2 be released with bugs that I didn't
mention. Nuff said.



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