50
POWER7 and Optimization and Tuning Guide
DPFD_MEDIUM
4
DPFD_DEEP
5
DPFD_DEEPER
6
DPFD_DEEPEST
7
DSCR_SSE
8
Here is a description of the
dscr_properties
structure in
<sys/machine.h>
:
struct dscr_properties {
uintversion;
uintnumber_of_streams;/* Number of HW streams */
longlongplatform_default_pd;/* PFW default */
longlongos_default_pd;/* AIX default */
longlong dscr_res[5];/* Reservd for future use */
};
Here is an example of this structure:
#include <sys/machine.h>
int rc;
long long dscr = DSCR_SSE | DPFD_DEEPER;
rc = dscr_ctl(DSCR_WRITE, &dscr);
...
A new process inherits the DSCR from its parent during a
fork
. This value is reset to the
system default during exec.
When a thread is dispatched (starts running on a CPU), the value of the DSCR for the owning
process is written in the DCSR. You do not need to save the value of the register in the
process context when the thread is
undispatched
because the system call writes the new
value both in the process context and in the DSCR.
When a thread runs
dcsr_ctl
to change the prefetch depth for the process, the new value is
written into the AIX process context and the DSCR register of the thread that is running the
system call. If another thread in the process is concurrently running on another CPU, it starts
using the new DSCR value only after the new value is reloaded from the process context area
after either an interrupt or a redispatch. This action can take as much as 10 ms (a clock tick).
The dscrctl command
The system administrator can use this command to read the current settings for the hardware
streams mechanism and set a system wide value for the DSCR. The DSCR is privileged. It
can be read or written only by the operating system.
To query the characteristics of the hardware streams on the system, run the
following command:
dscrctl -q
Here is an example of this command:
# dscrctl -q
Current DSCR settings:
number_of_streams = 16
platform_default_pd = 0x5 (DPFD_DEEP)
os_default_pd = 0xd (DSCR_SSE | DPFD_DEEP)
Содержание Power System POWER7 Series
Страница 2: ......
Страница 36: ...20 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 70: ...54 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 112: ...96 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 140: ...124 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 162: ...146 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 170: ...154 POWER7 and POWER7 Optimization and Tuning Guide...
Страница 222: ...POWER7 and POWER7 Optimization and Tuning Guide POWER7 and POWER7 Optimization and Tuning Guide...
Страница 223: ......