diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-06-16 09:39:34 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2012-08-17 10:31:08 -0400 |
commit | b952741c80790d2dc9f17fac6f15d87d58dea2a1 (patch) | |
tree | d6d1e9bae89ad117052228de7c0d3a741b9b415b | |
parent | c7660994ed6b44d17dad0aac0d156da1e0a2f003 (diff) |
cputime: Generalize CONFIG_VIRT_CPU_ACCOUNTING
S390, ia64 and powerpc all define their own version
of CONFIG_VIRT_CPU_ACCOUNTING. Generalize the config
and its description to a single place to avoid
duplication.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
-rw-r--r-- | arch/Kconfig | 3 | ||||
-rw-r--r-- | arch/ia64/Kconfig | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 16 | ||||
-rw-r--r-- | arch/s390/Kconfig | 5 | ||||
-rw-r--r-- | init/Kconfig | 13 |
5 files changed, 20 insertions, 29 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 72f2fa189cc5..f78de57487ae 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -281,4 +281,7 @@ config SECCOMP_FILTER | |||
281 | 281 | ||
282 | See Documentation/prctl/seccomp_filter.txt for details. | 282 | See Documentation/prctl/seccomp_filter.txt for details. |
283 | 283 | ||
284 | config HAVE_VIRT_CPU_ACCOUNTING | ||
285 | bool | ||
286 | |||
284 | source "kernel/gcov/Kconfig" | 287 | source "kernel/gcov/Kconfig" |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 310cf5781fad..3c720ef6c32d 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -25,6 +25,7 @@ config IA64 | |||
25 | select HAVE_GENERIC_HARDIRQS | 25 | select HAVE_GENERIC_HARDIRQS |
26 | select HAVE_MEMBLOCK | 26 | select HAVE_MEMBLOCK |
27 | select HAVE_MEMBLOCK_NODE_MAP | 27 | select HAVE_MEMBLOCK_NODE_MAP |
28 | select HAVE_VIRT_CPU_ACCOUNTING | ||
28 | select ARCH_DISCARD_MEMBLOCK | 29 | select ARCH_DISCARD_MEMBLOCK |
29 | select GENERIC_IRQ_PROBE | 30 | select GENERIC_IRQ_PROBE |
30 | select GENERIC_PENDING_IRQ if SMP | 31 | select GENERIC_PENDING_IRQ if SMP |
@@ -340,17 +341,6 @@ config FORCE_MAX_ZONEORDER | |||
340 | default "17" if HUGETLB_PAGE | 341 | default "17" if HUGETLB_PAGE |
341 | default "11" | 342 | default "11" |
342 | 343 | ||
343 | config VIRT_CPU_ACCOUNTING | ||
344 | bool "Deterministic task and CPU time accounting" | ||
345 | default n | ||
346 | help | ||
347 | Select this option to enable more accurate task and CPU time | ||
348 | accounting. This is done by reading a CPU counter on each | ||
349 | kernel entry and exit and on transitions within the kernel | ||
350 | between system, softirq and hardirq state, so there is a | ||
351 | small performance impact. | ||
352 | If in doubt, say N here. | ||
353 | |||
354 | config SMP | 344 | config SMP |
355 | bool "Symmetric multi-processing support" | 345 | bool "Symmetric multi-processing support" |
356 | select USE_GENERIC_SMP_HELPERS | 346 | select USE_GENERIC_SMP_HELPERS |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 30fd01de6bed..72afd2888cad 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -1,6 +1,7 @@ | |||
1 | config PPC64 | 1 | config PPC64 |
2 | bool "64-bit kernel" | 2 | bool "64-bit kernel" |
3 | default n | 3 | default n |
4 | select HAVE_VIRT_CPU_ACCOUNTING | ||
4 | help | 5 | help |
5 | This option selects whether a 32-bit or a 64-bit kernel | 6 | This option selects whether a 32-bit or a 64-bit kernel |
6 | will be built. | 7 | will be built. |
@@ -337,21 +338,6 @@ config PPC_MM_SLICES | |||
337 | default y if (!PPC_FSL_BOOK3E && PPC64 && HUGETLB_PAGE) || (PPC_STD_MMU_64 && PPC_64K_PAGES) | 338 | default y if (!PPC_FSL_BOOK3E && PPC64 && HUGETLB_PAGE) || (PPC_STD_MMU_64 && PPC_64K_PAGES) |
338 | default n | 339 | default n |
339 | 340 | ||
340 | config VIRT_CPU_ACCOUNTING | ||
341 | bool "Deterministic task and CPU time accounting" | ||
342 | depends on PPC64 | ||
343 | default y | ||
344 | help | ||
345 | Select this option to enable more accurate task and CPU time | ||
346 | accounting. This is done by reading a CPU counter on each | ||
347 | kernel entry and exit and on transitions within the kernel | ||
348 | between system, softirq and hardirq state, so there is a | ||
349 | small performance impact. This also enables accounting of | ||
350 | stolen time on logically-partitioned systems running on | ||
351 | IBM POWER5-based machines. | ||
352 | |||
353 | If in doubt, say Y here. | ||
354 | |||
355 | config PPC_HAVE_PMU_SUPPORT | 341 | config PPC_HAVE_PMU_SUPPORT |
356 | bool | 342 | bool |
357 | 343 | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 76de6b68487c..49ebfb62c86a 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -49,9 +49,6 @@ config GENERIC_LOCKBREAK | |||
49 | config PGSTE | 49 | config PGSTE |
50 | def_bool y if KVM | 50 | def_bool y if KVM |
51 | 51 | ||
52 | config VIRT_CPU_ACCOUNTING | ||
53 | def_bool y | ||
54 | |||
55 | config ARCH_SUPPORTS_DEBUG_PAGEALLOC | 52 | config ARCH_SUPPORTS_DEBUG_PAGEALLOC |
56 | def_bool y | 53 | def_bool y |
57 | 54 | ||
@@ -89,6 +86,8 @@ config S390 | |||
89 | select HAVE_MEMBLOCK | 86 | select HAVE_MEMBLOCK |
90 | select HAVE_MEMBLOCK_NODE_MAP | 87 | select HAVE_MEMBLOCK_NODE_MAP |
91 | select HAVE_CMPXCHG_LOCAL | 88 | select HAVE_CMPXCHG_LOCAL |
89 | select HAVE_VIRT_CPU_ACCOUNTING | ||
90 | select VIRT_CPU_ACCOUNTING | ||
92 | select ARCH_DISCARD_MEMBLOCK | 91 | select ARCH_DISCARD_MEMBLOCK |
93 | select BUILDTIME_EXTABLE_SORT | 92 | select BUILDTIME_EXTABLE_SORT |
94 | select ARCH_INLINE_SPIN_TRYLOCK | 93 | select ARCH_INLINE_SPIN_TRYLOCK |
diff --git a/init/Kconfig b/init/Kconfig index af6c7f8ba019..c40d0fb044ef 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -267,6 +267,19 @@ config POSIX_MQUEUE_SYSCTL | |||
267 | depends on SYSCTL | 267 | depends on SYSCTL |
268 | default y | 268 | default y |
269 | 269 | ||
270 | config VIRT_CPU_ACCOUNTING | ||
271 | bool "Deterministic task and CPU time accounting" | ||
272 | depends on HAVE_VIRT_CPU_ACCOUNTING | ||
273 | default y if PPC64 | ||
274 | help | ||
275 | Select this option to enable more accurate task and CPU time | ||
276 | accounting. This is done by reading a CPU counter on each | ||
277 | kernel entry and exit and on transitions within the kernel | ||
278 | between system, softirq and hardirq state, so there is a | ||
279 | small performance impact. In the case of s390 or IBM POWER > 5, | ||
280 | this also enables accounting of stolen time on logically-partitioned | ||
281 | systems. | ||
282 | |||
270 | config BSD_PROCESS_ACCT | 283 | config BSD_PROCESS_ACCT |
271 | bool "BSD Process Accounting" | 284 | bool "BSD Process Accounting" |
272 | help | 285 | help |