diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-27 16:25:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-02 06:07:48 -0500 |
commit | db949bba3c7cf2e664ac12e237c6d4c914f0c69d (patch) | |
tree | 4de65831dd1de95f642bed15bc9788edd74c48da /arch/x86/include/asm/processor.h | |
parent | 645af4e9e0e32481e3336dda813688732c7e5f0f (diff) |
x86-32: use non-lazy io bitmap context switching
Impact: remove 32-bit optimization to prepare unification
x86-32 and -64 differ in the way they context-switch tasks
with io permission bitmaps. x86-64 simply copies the next
tasks io bitmap into place (if any) on context switch. x86-32
invalidates the bitmap on context switch, so that the next
IO instruction will fault; at that point it installs the
appropriate IO bitmap.
This makes context switching IO-bitmap-using tasks a bit more
less expensive, at the cost of making the next IO instruction
slower due to the extra fault. This tradeoff only makes sense
if IO-bitmap-using processes are relatively common, but they
don't actually use IO instructions very often.
However, in a typical desktop system, the only process likely
to be using IO bitmaps is the X server, and nothing at all on
a server. Therefore the lazy context switch doesn't really win
all that much, and its just a gratuitious difference from
64-bit code.
This patch removes the lazy context switch, with a view to
unifying this code in a later change.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index c7a98f738210..76139506c3e4 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -248,7 +248,6 @@ struct x86_hw_tss { | |||
248 | #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long)) | 248 | #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long)) |
249 | #define IO_BITMAP_OFFSET offsetof(struct tss_struct, io_bitmap) | 249 | #define IO_BITMAP_OFFSET offsetof(struct tss_struct, io_bitmap) |
250 | #define INVALID_IO_BITMAP_OFFSET 0x8000 | 250 | #define INVALID_IO_BITMAP_OFFSET 0x8000 |
251 | #define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000 | ||
252 | 251 | ||
253 | struct tss_struct { | 252 | struct tss_struct { |
254 | /* | 253 | /* |
@@ -263,11 +262,6 @@ struct tss_struct { | |||
263 | * be within the limit. | 262 | * be within the limit. |
264 | */ | 263 | */ |
265 | unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; | 264 | unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; |
266 | /* | ||
267 | * Cache the current maximum and the last task that used the bitmap: | ||
268 | */ | ||
269 | unsigned long io_bitmap_max; | ||
270 | struct thread_struct *io_bitmap_owner; | ||
271 | 265 | ||
272 | /* | 266 | /* |
273 | * .. and then another 0x100 bytes for the emergency kernel stack: | 267 | * .. and then another 0x100 bytes for the emergency kernel stack: |