diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-04-30 13:48:35 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-06-10 16:42:38 -0400 |
commit | f7bac9b85a333ebdfa5f500cf6acf753edffc05f (patch) | |
tree | 05eda794c74ad606de17833354852b9986c209d7 | |
parent | ce5f4fc861e84739289c187f147040e6af6599b2 (diff) |
kthread: Add kworker kthreads to OS-jitter documentation
The kworker workqueue kthreads can also contribute to OS jitter.
The amount of jitter depends on their use, so this commit adds
documentation on avoiding OS jitter due to workqueue use.
Reported-by: Jonathan Clairembault <jonathan.clairembault@novasparks.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r-- | Documentation/kernel-per-CPU-kthreads.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt index cbf7ae412da4..5f39ef55c6f6 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: |