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

From: Alan Cox
Date: Sun Aug 22 2004 - 08:06:27 EST


On Sul, 2004-08-22 at 13:16, Andi Kleen wrote:
> 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

Xorg and XFree assume the kernel will have intelligent limits. When the
range went up the EnableIO code in turn switched to ioperm.

The actual code is:

if (ioperm(0, 1024, 1) || iopl(3))
FatalError("xf86EnableIOPorts: Failed to set IOPL for
I/O\n")

(os-support/linux/lnx_video.c:xf86EnableIO)

Flip those around and rebuild.


-
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/