Re: [patch] context-switching overhead in X, ioport(), 2.6.8.1

From: Andi Kleen
Date: Sun Aug 22 2004 - 07:21:31 EST


Ingo Molnar <mingo@xxxxxxx> writes:

> while debugging/improving scheduling latencies i got the following
> strange latency report from Lee Revell:
>
> http://krustophenia.net/testresults.php?dataset=2.6.8.1-P6#/var/www/2.6.8.1-P6
>
> this trace shows a 120 usec latency caused by XFree86, on a 600 MHz x86
> system. Looking closer reveals:
>
> 00000002 0.006ms (+0.003ms): __switch_to (schedule)
> 00000002 0.088ms (+0.082ms): finish_task_switch (schedule)
>
> it took more than 80 usecs for XFree86 to do a context-switch!
>
> it turns out that the reason for this (massive) context-switching
> overhead is the following change in 2.6.8:
>
> [PATCH] larger IO bitmaps
[...]

At least older XFree86 (4.2/3 time frame) used to only use iopl(). I
know it because at some point ioperm() was completely broken on
x86-64, but the X server never hit it. I wonder why they changed
that. Anyways, perhaps it would be better to just change the X server
back to use iopl(), because it will be always faster than using
ioperm.

-Andi

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