mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Observations on x86 process.c
@ 2005-06-13 13:02 cutaway
  2005-06-13 12:37 ` Jan Engelhardt
  2005-06-13 13:18 ` Denis Vlasenko
  0 siblings, 2 replies; 10+ messages in thread
From: cutaway @ 2005-06-13 13:02 UTC (permalink / raw)
  To: linux-kernel

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-06-13 18:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-13 13:02 [RFC] Observations on x86 process.c cutaway
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

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®