mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* x86 descriptor base fetching performance opportunities
@ 2005-06-17 14:22 cutaway
  0 siblings, 0 replies; only message in thread
From: cutaway @ 2005-06-17 14:22 UTC (permalink / raw)
  To: linux-kernel

This is something I've just started investigating, but preliminary
benchmarks of trial instruction sequences look VERY favorable for
conditional compilation of different code for those CPU's that can do a
BSWAP instruction.

The Linux src appears not conditionalized in any way in its handling of
descriptor get/set operations at the moment.

The fetching of descriptor bases is a necessarily clumsy affair on 386
resulting in several shift/rotate/masking operations because the upper 16
bytes of the base are split in a rather un-handy way in the 2nd dword of a
descriptor.

However, for 486 and better CPU's this un-handy layout looks like it can be
mitigated by BSWAP.  ex(pseudo-asm)

movl 4(des_ptr),eax   // Take hi-dword of descriptor
rol  8,eax            // AL=des-hi8, AH=des-hi-mid8
bswap eax             // Now, EAX high 16 == high 16 of descriptor
movw 2(des_ptr),ax    // Fill in the low 16 bits




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-17 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-17 14:22 x86 descriptor base fetching performance opportunities cutaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®