Date: Sun, 31 Dec 1995 21:58:06 +1100 From: Bruce Evans <bde@zeta.org.au> To: freebsd-hackers@freebsd.org, j@uriah.heep.sax.de Subject: Re: /dev/io Message-ID: <199512311058.VAA27229@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> The KDENABIO ioctl originates in SYSV, although in SYSV it is used >> to enable ports set in an IO permission bitmap. Most X servers need >> ports beyond the 0-0x3ff usually covered by such a bitmap. Also there >> is a performance penalty in using the bitmap. >In particular, it would require us to use CPU task switching. I >believe FreeBSD's context switching behaviour has been fine-tuned to >be better without separate task state segments per process. The extra context switching overhead would probably be acceptable if the TSS is only switched when necessary. Ordinary tasks could use the current TSS and X could use a separate TSS with a 64K bits (or whatever is necessary) bitmap. The performance penalty per i/o is less acceptable: cycles for outb %al,%dx for CPL <= IOPL (current case) / CPL > IOPL (bitmap case): 386 486 586 5 / 25 10 / 30 9 / 26 Thus even if the hardware is infinitely fast, in the bitmap case, outb on a 586 is up to 52 times as slow as most integer instructions. In the insecure case it is only up to 18 times slower :-]. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512311058.VAA27229>
