cputime: Generalize CONFIG_VIRT_CPU_ACCOUNTING
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 16 Jun 2012 13:39:34 +0000 (15:39 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Fri, 17 Aug 2012 14:31:08 +0000 (16:31 +0200)
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>
arch/Kconfig
arch/ia64/Kconfig
arch/powerpc/platforms/Kconfig.cputype
arch/s390/Kconfig
init/Kconfig

index 72f2fa189cc5200bb98143c6b35de8ffc9e0aaee..f78de57487ae93f5594c4aafdfa136ff566f0d12 100644 (file)
@@ -281,4 +281,7 @@ config SECCOMP_FILTER
 
          See Documentation/prctl/seccomp_filter.txt for details.
 
+config HAVE_VIRT_CPU_ACCOUNTING
+       bool
+
 source "kernel/gcov/Kconfig"
index 310cf5781fad2438a6ab24845724364bed31c7e4..3c720ef6c32de0f8d57b2439ae5f76a2346cc02e 100644 (file)
@@ -25,6 +25,7 @@ config IA64
        select HAVE_GENERIC_HARDIRQS
        select HAVE_MEMBLOCK
        select HAVE_MEMBLOCK_NODE_MAP
+       select HAVE_VIRT_CPU_ACCOUNTING
        select ARCH_DISCARD_MEMBLOCK
        select GENERIC_IRQ_PROBE
        select GENERIC_PENDING_IRQ if SMP
@@ -340,17 +341,6 @@ config FORCE_MAX_ZONEORDER
        default "17" if HUGETLB_PAGE
        default "11"
 
-config VIRT_CPU_ACCOUNTING
-       bool "Deterministic task and CPU time accounting"
-       default n
-       help
-         Select this option to enable more accurate task and CPU time
-         accounting.  This is done by reading a CPU counter on each
-         kernel entry and exit and on transitions within the kernel
-         between system, softirq and hardirq state, so there is a
-         small performance impact.
-         If in doubt, say N here.
-
 config SMP
        bool "Symmetric multi-processing support"
        select USE_GENERIC_SMP_HELPERS
index 30fd01de6bed5d93cb83fb380787c2a3586ccdd6..72afd2888cad7c462d2d9a8a3ac2fb30ee6fd7bf 100644 (file)
@@ -1,6 +1,7 @@
 config PPC64
        bool "64-bit kernel"
        default n
+       select HAVE_VIRT_CPU_ACCOUNTING
        help
          This option selects whether a 32-bit or a 64-bit kernel
          will be built.
@@ -337,21 +338,6 @@ config PPC_MM_SLICES
        default y if (!PPC_FSL_BOOK3E && PPC64 && HUGETLB_PAGE) || (PPC_STD_MMU_64 && PPC_64K_PAGES)
        default n
 
-config VIRT_CPU_ACCOUNTING
-       bool "Deterministic task and CPU time accounting"
-       depends on PPC64
-       default y
-       help
-         Select this option to enable more accurate task and CPU time
-         accounting.  This is done by reading a CPU counter on each
-         kernel entry and exit and on transitions within the kernel
-         between system, softirq and hardirq state, so there is a
-         small performance impact.  This also enables accounting of
-         stolen time on logically-partitioned systems running on
-         IBM POWER5-based machines.
-
-         If in doubt, say Y here.
-
 config PPC_HAVE_PMU_SUPPORT
        bool
 
index 76de6b68487c8a44aa4eabecc1dddc7d916546e2..49ebfb62c86a4e5a41f9a8ddf85e3a4c7352aaf4 100644 (file)
@@ -49,9 +49,6 @@ config GENERIC_LOCKBREAK
 config PGSTE
        def_bool y if KVM
 
-config VIRT_CPU_ACCOUNTING
-       def_bool y
-
 config ARCH_SUPPORTS_DEBUG_PAGEALLOC
        def_bool y
 
@@ -89,6 +86,8 @@ config S390
        select HAVE_MEMBLOCK
        select HAVE_MEMBLOCK_NODE_MAP
        select HAVE_CMPXCHG_LOCAL
+       select HAVE_VIRT_CPU_ACCOUNTING
+       select VIRT_CPU_ACCOUNTING
        select ARCH_DISCARD_MEMBLOCK
        select BUILDTIME_EXTABLE_SORT
        select ARCH_INLINE_SPIN_TRYLOCK
index af6c7f8ba019ae25519f858850b2637b1fc76c8e..c40d0fb044ef373518fc244b6cb6d0c975e64262 100644 (file)
@@ -267,6 +267,19 @@ config POSIX_MQUEUE_SYSCTL
        depends on SYSCTL
        default y
 
+config VIRT_CPU_ACCOUNTING
+       bool "Deterministic task and CPU time accounting"
+       depends on HAVE_VIRT_CPU_ACCOUNTING
+       default y if PPC64
+       help
+         Select this option to enable more accurate task and CPU time
+         accounting.  This is done by reading a CPU counter on each
+         kernel entry and exit and on transitions within the kernel
+         between system, softirq and hardirq state, so there is a
+         small performance impact.  In the case of s390 or IBM POWER > 5,
+         this also enables accounting of stolen time on logically-partitioned
+         systems.
+
 config BSD_PROCESS_ACCT
        bool "BSD Process Accounting"
        help
This page took 0.038765 seconds and 5 git commands to generate.