diff options
Diffstat (limited to 'Documentation/kernel-per-CPU-kthreads.txt')
-rw-r--r-- | Documentation/kernel-per-CPU-kthreads.txt | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt index cbf7ae412da4..32351bfabf20 100644 --- a/Documentation/kernel-per-CPU-kthreads.txt +++ b/Documentation/kernel-per-CPU-kthreads.txt | |||
@@ -157,6 +157,53 @@ RCU_SOFTIRQ: Do at least one of the following: | |||
157 | calls and by forcing both kernel threads and interrupts | 157 | calls and by forcing both kernel threads and interrupts |
158 | to execute elsewhere. | 158 | to execute elsewhere. |
159 | 159 | ||
160 | Name: kworker/%u:%d%s (cpu, id, priority) | ||
161 | Purpose: Execute workqueue requests | ||
162 | To reduce its OS jitter, do any of the following: | ||
163 | 1. Run your workload at a real-time priority, which will allow | ||
164 | preempting the kworker daemons. | ||
165 | 2. Do any of the following needed to avoid jitter that your | ||
166 | application cannot tolerate: | ||
167 | a. Build your kernel with CONFIG_SLUB=y rather than | ||
168 | CONFIG_SLAB=y, thus avoiding the slab allocator's periodic | ||
169 | use of each CPU's workqueues to run its cache_reap() | ||
170 | function. | ||
171 | b. Avoid using oprofile, thus avoiding OS jitter from | ||
172 | wq_sync_buffer(). | ||
173 | c. Limit your CPU frequency so that a CPU-frequency | ||
174 | governor is not required, possibly enlisting the aid of | ||
175 | special heatsinks or other cooling technologies. If done | ||
176 | correctly, and if you CPU architecture permits, you should | ||
177 | be able to build your kernel with CONFIG_CPU_FREQ=n to | ||
178 | avoid the CPU-frequency governor periodically running | ||
179 | on each CPU, including cs_dbs_timer() and od_dbs_timer(). | ||
180 | WARNING: Please check your CPU specifications to | ||
181 | make sure that this is safe on your particular system. | ||
182 | d. It is not possible to entirely get rid of OS jitter | ||
183 | from vmstat_update() on CONFIG_SMP=y systems, but you | ||
184 | can decrease its frequency by writing a large value to | ||
185 | /proc/sys/vm/stat_interval. The default value is HZ, | ||
186 | for an interval of one second. Of course, larger values | ||
187 | will make your virtual-memory statistics update more | ||
188 | slowly. Of course, you can also run your workload at | ||
189 | a real-time priority, thus preempting vmstat_update(). | ||
190 | e. If running on high-end powerpc servers, build with | ||
191 | CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS | ||
192 | daemon from running on each CPU every second or so. | ||
193 | (This will require editing Kconfig files and will defeat | ||
194 | this platform's RAS functionality.) This avoids jitter | ||
195 | due to the rtas_event_scan() function. | ||
196 | WARNING: Please check your CPU specifications to | ||
197 | make sure that this is safe on your particular system. | ||
198 | f. If running on Cell Processor, build your kernel with | ||
199 | CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from | ||
200 | spu_gov_work(). | ||
201 | WARNING: Please check your CPU specifications to | ||
202 | make sure that this is safe on your particular system. | ||
203 | g. If running on PowerMAC, build your kernel with | ||
204 | CONFIG_PMAC_RACKMETER=n to disable the CPU-meter, | ||
205 | avoiding OS jitter from rackmeter_do_timer(). | ||
206 | |||
160 | Name: rcuc/%u | 207 | Name: rcuc/%u |
161 | Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. | 208 | Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. |
162 | To reduce its OS jitter, do at least one of the following: | 209 | To reduce its OS jitter, do at least one of the following: |
@@ -185,7 +232,7 @@ Purpose: Offload RCU callbacks from the corresponding CPU. | |||
185 | To reduce its OS jitter, do at least one of the following: | 232 | To reduce its OS jitter, do at least one of the following: |
186 | 1. Use affinity, cgroups, or other mechanism to force these kthreads | 233 | 1. Use affinity, cgroups, or other mechanism to force these kthreads |
187 | to execute on some other CPU. | 234 | to execute on some other CPU. |
188 | 2. Build with CONFIG_RCU_NOCB_CPUS=n, which will prevent these | 235 | 2. Build with CONFIG_RCU_NOCB_CPU=n, which will prevent these |
189 | kthreads from being created in the first place. However, please | 236 | kthreads from being created in the first place. However, please |
190 | note that this will not eliminate OS jitter, but will instead | 237 | note that this will not eliminate OS jitter, but will instead |
191 | shift it to RCU_SOFTIRQ. | 238 | shift it to RCU_SOFTIRQ. |