
Volume 2, Part 2: Context Management
2:553
Automatic preservation offers performance benefits: the register stack may contain
only a handful of dirty registers, system call parameters can be passed on the register
stack, and, upon return to the interrupted context the
loadrs
instruction only needs to
restore registers that were actually spilled to memory. Since system call rates scale
with processor performance, the RSE offers a key method for reducing the kernel’s
execution time of a system call.
To ensure operating system integrity the RSE requires a valid backing store (i.e. one
with a valid page mapping). The validity of the current backing store depends on the
interrupted context. If the interrupted context is itself a kernel thread, then its backing
store is in a known state, and no backing store switch is required (assuming that kernel
interruptions are nested). If the interrupted context is a user process, then the backing
store could be pointing at an invalid region of memory, and software is required to
redirect the RSE at a kernel backing store.
Section 6.11.1, “Switch from Interrupted
describes the code sequence to switch the RSE backing store
without causing memory traffic.
If the kernel redirects the backing store to a kernel memory region, then the kernel
must restore the backing store of the interrupted context prior to resumption of the
interrupted context. The kernel must also restore the register stack to its interrupted
state by manually pulling the spilled registers from the backing store. The kernel uses
the
loadrs
instruction to restore stacked registers from the backing store. The
loadrs
instruction requires the backing store pointer to align with any registers spilled from the
interrupted context. Thus the kernel should have paired all function calls (
br.call
instructions) with function returns (
br.ret
instructions), or manually manipulated the
kernel backing store pointer, so that all kernel contents have been removed from the
kernel backing store prior to the
loadrs
. After loading the stacked registers, the kernel
can switch to the backing store of the interrupted frame. This code sequence is
described in
Section 6.11.1, “Switch from Interrupted Context” on page 2:148
.
The kernel may occasionally gather the complete interrupted user context, such as to
satisfy a debugger request or to provide extended information to a user signal handler.
To provide the preserved register stack contents, including NaT values, the kernel must
extract the user context values from its backing store.
4.2.2
Preservation of Floating-point State in the OS
A full preservation of Itanium floating-point register file requires approximately 2
KBytes of memory. To reduce the frequency of such large register spills and fills, the
Itanium architecture offers additional mechanisms for lazy floating-point state
management. These features allow the system programmer to eliminate many
unnecessary floating-point state spills and fills especially around voluntary and
involuntary entries into the kernel, e.g. around system calls, external interrupts and
exceptions. Lazy state preservation can provide a significant reduction of memory
traffic and hence faster interrupt handlers and system calls, especially since most
interrupt handlers and much system code rarely perform floating-point computations.
The 126 non-constant floating-point registers are architecturally divided into the lower
set (FR2-31) and the higher set (FR32-127). The Itanium architecture provides two
floating-point register set “modified” bits, PSR.mfl and PSR.mfh, which are set by
hardware upon a write to any register in the lower and higher sets, respectively. The
“modified” bits are accessible to a user process through the user mask. Additionally,
Содержание ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS VOLUME 3 REV 2.3
Страница 1: ......
Страница 11: ...x Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 12: ...1 1 Intel Itanium Architecture Software Developer s Manual Rev 2 3 Part I Application Architecture Guide ...
Страница 13: ...1 2 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 33: ...1 22 Volume 1 Part 1 Introduction to the Intel Itanium Architecture ...
Страница 57: ...1 46 Volume 1 Part 1 Execution Environment ...
Страница 147: ...1 136 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 149: ...1 138 Volume 1 Part 2 About the Optimization Guide ...
Страница 191: ...1 180 Volume 1 Part 2 Predication Control Flow and Instruction Stream ...
Страница 230: ......
Страница 248: ...236 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 249: ...2 1 Intel Itanium Architecture Software Developer s Manual Rev 2 3 Part I System Architecture Guide ...
Страница 250: ...2 2 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 264: ...2 16 Volume 2 Part 1 Intel Itanium System Environment ...
Страница 380: ...2 132 Volume 2 Part 1 Interruptions ...
Страница 398: ...2 150 Volume 2 Part 1 Register Stack Engine ...
Страница 486: ...2 238 Volume 2 Part 1 IA 32 Interruption Vector Descriptions ...
Страница 749: ...2 501 Intel Itanium Architecture Software Developer s Manual Rev 2 3 Part II System Programmer s Guide ...
Страница 750: ...2 502 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 754: ...2 506 Volume 2 Part 2 About the System Programmer s Guide ...
Страница 796: ...2 548 Volume 2 Part 2 Interruptions and Serialization ...
Страница 808: ...2 560 Volume 2 Part 2 Context Management ...
Страница 842: ...2 594 Volume 2 Part 2 Floating point System Software ...
Страница 850: ...2 602 Volume 2 Part 2 IA 32 Application Support ...
Страница 862: ...2 614 Volume 2 Part 2 External Interrupt Architecture ...
Страница 870: ...2 622 Volume 2 Part 2 Performance Monitoring Support ...
Страница 891: ......
Страница 941: ...3 42 Volume 3 Instruction Reference cmp illegal_operation_fault PR p1 0 PR p2 0 Interruptions Illegal Operation fault ...
Страница 1099: ...3 200 Volume 3 Instruction Reference padd Interruptions Illegal Operation fault ...
Страница 1191: ...3 292 Volume 3 Pseudo Code Functions Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 1295: ...3 396 Volume 3 Resource and Dependency Semantics ...
Страница 1296: ......
Страница 1302: ...402 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 1494: ...4 192 Volume 4 Base IA 32 Instruction Reference FWAIT Wait See entry for WAIT ...
Страница 1564: ...4 262 Volume 4 Base IA 32 Instruction Reference LES Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 1565: ...Volume 4 Base IA 32 Instruction Reference 4 263 LFS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 1568: ...4 266 Volume 4 Base IA 32 Instruction Reference LGS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 1583: ...Volume 4 Base IA 32 Instruction Reference 4 281 LSS Load Full Pointer See entry for LDS LES LFS LGS LSS ...
Страница 1647: ...Volume 4 Base IA 32 Instruction Reference 4 345 ROL ROR Rotate See entry for RCL RCR ROL ROR ...
Страница 1663: ...Volume 4 Base IA 32 Instruction Reference 4 361 SHL SHR Shift Instructions See entry for SAL SAR SHL SHR ...
Страница 1668: ...4 366 Volume 4 Base IA 32 Instruction Reference SIDT Store Interrupt Descriptor Table Register See entry for SGDT SIDT ...
Страница 1884: ...4 582 Volume 4 IA 32 SSE Instruction Reference ...
Страница 1885: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index ...
Страница 1886: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Страница 1898: ...INDEX Index 12 Index for Volumes 1 2 3 and 4 ...