On Fri, 18 Dec 1998, Neil Conway wrote:
>
> Two little patches (~ one active line apiece). These are relative to
> 131ac13 btw.
Both look sane. The proc change penalty is just a random number, and I
agree that 20 is likely to be excessive. I changed it to 15 as per your
suggestion - being a random fudge-factor really means that the value
should be determined by either real thought or testing, and your input
counts as testing to me.
> The second patch addresses one specific problem, namely the delays that
> happen when you hit "ENTER" in a tcsh on a loaded SMP box. I don't like
> this patch at all, it's as ugly as hell, so perhaps it will be obvious
> to some guru or other how to fix the underlying problem:
The underlying problem is that playing around with "current->counter" was
just wrong, and deleting the line is the right thing to do. The counter
thing seems to be entirely historical, with no real reason for it any
more. Line deleted, no need to use #ifdef's and fancy comments. The only
reason it was there was probably that nobody had noticed it before.
(The only reason for doing a "current->counter = 0" is to force a
re-schedule when for some reason you can't sleep, from the time before we
had the SCHED_YIELD flag. However, in this case even that wasn't
necessary, as we actually force a sleep here anyway by setting our state
to TASK_INTERRUPTIBLE, so the counter twiddling seems to have been
entirely spurious and probably just a cut-and-paste error from the
parallel driver that used to need to do things like that when it was
polling).
Linus
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]