mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <cutaway@bellsouth.net>
To: <linux-kernel@vger.kernel.org>
Subject: x86 descriptor base fetching performance opportunities
Date: Fri, 17 Jun 2005 10:22:52 -0400	[thread overview]
Message-ID: <000901c57348$14c5e400$2800000a@pc365dualp2> (raw)

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




                 reply	other threads:[~2005-06-17 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000901c57348$14c5e400$2800000a@pc365dualp2' \
    --to=cutaway@bellsouth.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®