diff options
author | Cliff Wickman <cpw@sgi.com> | 2010-06-02 17:22:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-06-08 15:13:44 -0400 |
commit | e8e5e8a8048006a12d7777a93baebd6e39496101 (patch) | |
tree | c3da45e649920e77b14907fa3b33dde1b8d9328d /arch/x86/include | |
parent | 12a6611fa16e9c6d2f844fe2175d219c6e9bd95d (diff) |
x86, UV: BAU tunables into a debugfs file
Make the Broadcast Assist Unit driver's nine tuning values variable by
making them accessible through a read/write debugfs file.
The file will normally be mounted as
/sys/kernel/debug/sgi_uv/bau_tunables. The tunables are kept in each
cpu's per-cpu BAU structure.
The patch also does a little name improvement, and corrects the reset of
two destination timeout counters.
Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: gregkh@suse.de
LKML-Reference: <E1OJvNx-0004Zx-Uo@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/uv/uv_bau.h | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h index 458e04c626a2..e5543c1a80ca 100644 --- a/arch/x86/include/asm/uv/uv_bau.h +++ b/arch/x86/include/asm/uv/uv_bau.h | |||
@@ -45,10 +45,14 @@ | |||
45 | #define UV_DESC_BASE_PNODE_SHIFT 49 | 45 | #define UV_DESC_BASE_PNODE_SHIFT 49 |
46 | #define UV_PAYLOADQ_PNODE_SHIFT 49 | 46 | #define UV_PAYLOADQ_PNODE_SHIFT 49 |
47 | #define UV_PTC_BASENAME "sgi_uv/ptc_statistics" | 47 | #define UV_PTC_BASENAME "sgi_uv/ptc_statistics" |
48 | #define UV_BAU_BASENAME "sgi_uv/bau_tunables" | ||
49 | #define UV_BAU_TUNABLES_DIR "sgi_uv" | ||
50 | #define UV_BAU_TUNABLES_FILE "bau_tunables" | ||
51 | #define WHITESPACE " \t\n" | ||
48 | #define uv_physnodeaddr(x) ((__pa((unsigned long)(x)) & uv_mmask)) | 52 | #define uv_physnodeaddr(x) ((__pa((unsigned long)(x)) & uv_mmask)) |
49 | #define UV_ENABLE_INTD_SOFT_ACK_MODE_SHIFT 15 | 53 | #define UV_ENABLE_INTD_SOFT_ACK_MODE_SHIFT 15 |
50 | #define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD_SHIFT 16 | 54 | #define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD_SHIFT 16 |
51 | #define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD 0x000000000bUL | 55 | #define UV_INTD_SOFT_ACK_TIMEOUT_PERIOD 0x0000000009UL |
52 | /* [19:16] SOFT_ACK timeout period 19: 1 is urgency 7 17:16 1 is multiplier */ | 56 | /* [19:16] SOFT_ACK timeout period 19: 1 is urgency 7 17:16 1 is multiplier */ |
53 | #define BAU_MISC_CONTROL_MULT_MASK 3 | 57 | #define BAU_MISC_CONTROL_MULT_MASK 3 |
54 | 58 | ||
@@ -70,25 +74,23 @@ | |||
70 | #define DESC_STATUS_DESTINATION_TIMEOUT 2 | 74 | #define DESC_STATUS_DESTINATION_TIMEOUT 2 |
71 | #define DESC_STATUS_SOURCE_TIMEOUT 3 | 75 | #define DESC_STATUS_SOURCE_TIMEOUT 3 |
72 | 76 | ||
77 | #define TIMEOUT_DELAY 10 | ||
73 | /* | 78 | /* |
74 | * source side threshholds at which message retries print a warning | 79 | * delay for 'plugged' timeout retries, in microseconds |
75 | */ | ||
76 | #define SOURCE_TIMEOUT_LIMIT 20 | ||
77 | #define DESTINATION_TIMEOUT_LIMIT 20 | ||
78 | |||
79 | /* | ||
80 | * misc. delays, in microseconds | ||
81 | */ | 80 | */ |
82 | #define THROTTLE_DELAY 10 | 81 | #define PLUGGED_DELAY 10 |
83 | #define TIMEOUT_DELAY 10 | ||
84 | #define BIOS_TO 1000 | ||
85 | /* BIOS is assumed to set the destination timeout to 1003520 nanoseconds */ | ||
86 | 82 | ||
87 | /* | 83 | /* |
88 | * threshholds at which to use IPI to free resources | 84 | * threshholds at which to use IPI to free resources |
89 | */ | 85 | */ |
86 | /* after this # consecutive 'plugged' timeouts, use IPI to release resources */ | ||
90 | #define PLUGSB4RESET 100 | 87 | #define PLUGSB4RESET 100 |
91 | #define TIMEOUTSB4RESET 100 | 88 | /* after this many consecutive timeouts, use IPI to release resources */ |
89 | #define TIMEOUTSB4RESET 1 | ||
90 | /* at this number uses of IPI to release resources, giveup the request */ | ||
91 | #define IPI_RESET_LIMIT 1 | ||
92 | /* after this # consecutive successes, bump up the throttle if it was lowered */ | ||
93 | #define COMPLETE_THRESHOLD 5 | ||
92 | 94 | ||
93 | /* | 95 | /* |
94 | * number of entries in the destination side payload queue | 96 | * number of entries in the destination side payload queue |
@@ -108,6 +110,13 @@ | |||
108 | #define FLUSH_COMPLETE 4 | 110 | #define FLUSH_COMPLETE 4 |
109 | 111 | ||
110 | /* | 112 | /* |
113 | * tuning the action when the numalink network is extremely delayed | ||
114 | */ | ||
115 | #define CONGESTED_RESPONSE_US 1000 /* 'long' response time, in microseconds */ | ||
116 | #define CONGESTED_REPS 10 /* long delays averaged over this many broadcasts */ | ||
117 | #define CONGESTED_PERIOD 30 /* time for the bau to be disabled, in seconds */ | ||
118 | |||
119 | /* | ||
111 | * Distribution: 32 bytes (256 bits) (bytes 0-0x1f of descriptor) | 120 | * Distribution: 32 bytes (256 bits) (bytes 0-0x1f of descriptor) |
112 | * If the 'multilevel' flag in the header portion of the descriptor | 121 | * If the 'multilevel' flag in the header portion of the descriptor |
113 | * has been set to 0, then endpoint multi-unicast mode is selected. | 122 | * has been set to 0, then endpoint multi-unicast mode is selected. |
@@ -323,14 +332,13 @@ struct bau_control { | |||
323 | struct bau_control *uvhub_master; | 332 | struct bau_control *uvhub_master; |
324 | struct bau_control *socket_master; | 333 | struct bau_control *socket_master; |
325 | unsigned long timeout_interval; | 334 | unsigned long timeout_interval; |
335 | unsigned long set_bau_on_time; | ||
326 | atomic_t active_descriptor_count; | 336 | atomic_t active_descriptor_count; |
327 | int max_concurrent; | ||
328 | int max_concurrent_constant; | ||
329 | int retry_message_scans; | ||
330 | int plugged_tries; | 337 | int plugged_tries; |
331 | int timeout_tries; | 338 | int timeout_tries; |
332 | int ipi_attempts; | 339 | int ipi_attempts; |
333 | int conseccompletes; | 340 | int conseccompletes; |
341 | int set_bau_off; | ||
334 | short cpu; | 342 | short cpu; |
335 | short uvhub_cpu; | 343 | short uvhub_cpu; |
336 | short uvhub; | 344 | short uvhub; |
@@ -343,6 +351,19 @@ struct bau_control { | |||
343 | spinlock_t masks_lock; | 351 | spinlock_t masks_lock; |
344 | spinlock_t uvhub_lock; | 352 | spinlock_t uvhub_lock; |
345 | spinlock_t queue_lock; | 353 | spinlock_t queue_lock; |
354 | /* tunables */ | ||
355 | int max_bau_concurrent; | ||
356 | int max_bau_concurrent_constant; | ||
357 | int plugged_delay; | ||
358 | int plugsb4reset; | ||
359 | int timeoutsb4reset; | ||
360 | int ipi_reset_limit; | ||
361 | int complete_threshold; | ||
362 | int congested_response_us; | ||
363 | int congested_reps; | ||
364 | int congested_period; | ||
365 | cycles_t period_time; | ||
366 | long period_requests; | ||
346 | }; | 367 | }; |
347 | 368 | ||
348 | /* | 369 | /* |