From: <cutaway@bellsouth.net>
To: <linux-kernel@vger.kernel.org>
Subject: [RFC] Observations on x86 process.c
Date: Mon, 13 Jun 2005 09:02:20 -0400 [thread overview]
Message-ID: <002301c57018$266079b0$2800000a@pc365dualp2> (raw)
A) dump_thread() and dump_task_regs() are in the middle of the file, but
will be infrequently used. With default 16 byte alignment, this may cause
bits of them to wind up polluting the L1 on anything with L1 lines > 16
bytes. L2 lines could be similarly polluted too of course.
Moving these two routines to the bottom would probably be a better deal.
B) elf_core_copy_regs() macro (which resolves to ELF_CORE_COPY_REGS macro)
just copies largely similar (but not quite identical) structures with a bit
of difference in the middle for seg reg handling using a long sequence of "a
= b" type assignments. It would seem this could be tweaked a bit with a
couple of REP MOV's on either side of the seg reg dissimilarity. Fast crash
dump handling code isn't as desirable as compact crash dump handling code.
C) dump_task_regs() can be shortened up a tad by zeroing the high words of
the seg reg vars with a bit of inline that uses a word AND with imm8 zero.
Right now the compiler is generating 4 MOVZX's and 4 MOV's to clip off the
trash bits. Again, not being a high performance path, the better compactness
of (4) AND mem16,imm8 would be more desirable over the 8 MOVZX/MOV
instructions that get generated now.
next reply other threads:[~2005-06-13 12:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-13 13:02 cutaway [this message]
2005-06-13 12:37 ` Jan Engelhardt
2005-06-13 13:43 ` cutaway
2005-06-13 13:18 ` Denis Vlasenko
2005-06-13 15:01 ` cutaway
2005-06-13 14:26 ` Denis Vlasenko
2005-06-13 16:01 ` cutaway
2005-06-13 16:32 ` cutaway
2005-06-13 16:02 ` Ian Campbell
2005-06-13 19:37 ` cutaway
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='002301c57018$266079b0$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®