As of v3.10, the core ARM arch support is in mainline for NO_HZ_FULL.
The only remaining part is the removal of the hard-coded Kconfig
requirement on 64-bit platforms, which I believe can now be removed
after the nsec granularity cputime was made to work on non 64_BIT
(c.f. commit 8c23b80e, cputime_nsecs: use math64.h for nsec resolution
conversion helpers.)
This series makes the final Kconfig changes to bring NO_HZ_FULL
support to ARM.
I will queue up the arch/arm patch for Russell separately once the
generic changes are accepted.
Applies on today's linus master (commit bdbdfdef57)
Kevin
Kevin Hilman (4):
nohz_full: Kconfig: VIRT_CPU_ACCOUNTING_GEN: drop 64-bit requirement
nohz_full: Kconfig: drop requrement on 64-bit
full_nohz: Kconfig: add HAVE_VIRT_CPU_ACCOUNTING_GEN
ARM: Kconfig: allow full nohz CPU accounting
arch/Kconfig | 11 +++++++++++
arch/arm/Kconfig | 1 +
init/Kconfig | 3 ++-
kernel/time/Kconfig | 2 --
4 files changed, 14 insertions(+), 3 deletions(-)
--
1.8.3
Now that VIRT_CPU_ACCOUNTING_GEN no longer has a 64-bit requirement,
it can be dropped here as well.
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
---
kernel/time/Kconfig | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index 2b62fe8..a54e3e9 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -99,8 +99,6 @@ config NO_HZ_FULL
depends on SMP
# RCU_USER_QS dependency
depends on HAVE_CONTEXT_TRACKING
- # VIRT_CPU_ACCOUNTING_GEN dependency
- depends on 64BIT
select NO_HZ_COMMON
select RCU_USER_QS
select RCU_NOCB_CPU
--
1.8.3
The 64-bit requirement can be removed since the conversion of the nsec
granularity cputime to work on !64_BIT
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
---
init/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/Kconfig b/init/Kconfig
index 18bd9e3..e9cd23b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -354,7 +354,7 @@ config VIRT_CPU_ACCOUNTING_NATIVE
config VIRT_CPU_ACCOUNTING_GEN
bool "Full dynticks CPU time accounting"
- depends on HAVE_CONTEXT_TRACKING && 64BIT
+ depends on HAVE_CONTEXT_TRACKING
select VIRT_CPU_ACCOUNTING
select CONTEXT_TRACKING
help
--
1.8.3
With the 64-bit requirement removed from VIRT_CPU_ACCOUNTING_GEN,
allow ARM platforms to enable it. Since VIRT_CPU_ACCOUNTING_GEN is a
dependency for full NO_HZ, this allows ARM platforms to enable full
NO_HZ as well.
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3f7714d..b5e5712 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -54,6 +54,7 @@ config ARM
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_UID16
+ select HAVE_VIRT_CPU_ACCOUNTING_GEN
select IRQ_FORCED_THREADING
select KTIME_SCALAR
select MODULES_USE_ELF_REL
--
1.8.3
With HAVE_VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. In order
to use that feature, arch code should be audited ensure there are no
races in concurrent read/write of cputime_t. For example,
reading/writing 64-bit cputime_t on some 32-bit arches may require
multiple accesses, so proper locking is needed to protect against
concurrent accesses.
Therefore, add CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN which arches can
enabled after they've been audited for potential races.
This option is automatically enabled on 64-bit platforms.
Feature requested by Frederic Weisbecker.
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
---
arch/Kconfig | 11 +++++++++++
init/Kconfig | 1 +
2 files changed, 12 insertions(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index 1feb169..3c94a2d 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -356,6 +356,17 @@ config HAVE_CONTEXT_TRACKING
config HAVE_VIRT_CPU_ACCOUNTING
bool
+config HAVE_VIRT_CPU_ACCOUNTING_GEN
+ bool
+ default y if 64BIT
+ help
+ With HAVE_VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
+ Before enabling this option, arch code must be audited
+ ensure there are no races in concurrent read/write of
+ cputime_t. For example, reading/writing 64-bit cputime_t on
+ some 32-bit arches may require multiple accesses, so proper
+ locking is needed to protect against concurrent accesses.
+
config HAVE_IRQ_TIME_ACCOUNTING
bool
help
diff --git a/init/Kconfig b/init/Kconfig
index e9cd23b..7c283a5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -355,6 +355,7 @@ config VIRT_CPU_ACCOUNTING_NATIVE
config VIRT_CPU_ACCOUNTING_GEN
bool "Full dynticks CPU time accounting"
depends on HAVE_CONTEXT_TRACKING
+ depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
select VIRT_CPU_ACCOUNTING
select CONTEXT_TRACKING
help
--
1.8.3
Hi Kevin,
FWIW typo in the title: 'requirement'.
Regards,
Jean
On Tue, Sep 17, 2013 at 12:28 AM, Kevin Hilman <[email protected]> wrote:
> Now that VIRT_CPU_ACCOUNTING_GEN no longer has a 64-bit requirement,
> it can be dropped here as well.
>
> Cc: Frederic Weisbecker <[email protected]>
> Signed-off-by: Kevin Hilman <[email protected]>
> ---
> kernel/time/Kconfig | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
> index 2b62fe8..a54e3e9 100644
> --- a/kernel/time/Kconfig
> +++ b/kernel/time/Kconfig
> @@ -99,8 +99,6 @@ config NO_HZ_FULL
> depends on SMP
> # RCU_USER_QS dependency
> depends on HAVE_CONTEXT_TRACKING
> - # VIRT_CPU_ACCOUNTING_GEN dependency
> - depends on 64BIT
> select NO_HZ_COMMON
> select RCU_USER_QS
> select RCU_NOCB_CPU
> --
> 1.8.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel