* [PATCH 0/4] nohz/full: drop 64-bit requirement, enable ARM support
@ 2013-09-16 22:28 Kevin Hilman
2013-09-16 22:28 ` [PATCH 1/4] nohz_full: Kconfig: VIRT_CPU_ACCOUNTING_GEN: drop 64-bit requirement Kevin Hilman
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Kevin Hilman @ 2013-09-16 22:28 UTC (permalink / raw)
To: Frederic Weisbecker, Russell King
Cc: linux-arm-kernel, Paul McKenney, linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] nohz_full: Kconfig: VIRT_CPU_ACCOUNTING_GEN: drop 64-bit requirement
2013-09-16 22:28 [PATCH 0/4] nohz/full: drop 64-bit requirement, enable ARM support Kevin Hilman
@ 2013-09-16 22:28 ` Kevin Hilman
2013-09-16 22:28 ` [PATCH 2/4] nohz_full: Kconfig: drop requrement on 64-bit Kevin Hilman
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2013-09-16 22:28 UTC (permalink / raw)
To: Frederic Weisbecker, Russell King
Cc: linux-arm-kernel, Paul McKenney, linux-kernel
The 64-bit requirement can be removed since the conversion of the nsec
granularity cputime to work on !64_BIT
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] nohz_full: Kconfig: drop requrement on 64-bit
2013-09-16 22:28 [PATCH 0/4] nohz/full: drop 64-bit requirement, enable ARM support Kevin Hilman
2013-09-16 22:28 ` [PATCH 1/4] nohz_full: Kconfig: VIRT_CPU_ACCOUNTING_GEN: drop 64-bit requirement Kevin Hilman
@ 2013-09-16 22:28 ` Kevin Hilman
2013-09-17 7:00 ` Jean Pihet
2013-09-16 22:28 ` [PATCH 3/4] full_nohz: Kconfig: add HAVE_VIRT_CPU_ACCOUNTING_GEN Kevin Hilman
2013-09-16 22:28 ` [PATCH 4/4] ARM: Kconfig: allow full nohz CPU accounting Kevin Hilman
3 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2013-09-16 22:28 UTC (permalink / raw)
To: Frederic Weisbecker, Russell King
Cc: linux-arm-kernel, Paul McKenney, linux-kernel
Now that VIRT_CPU_ACCOUNTING_GEN no longer has a 64-bit requirement,
it can be dropped here as well.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] full_nohz: Kconfig: add HAVE_VIRT_CPU_ACCOUNTING_GEN
2013-09-16 22:28 [PATCH 0/4] nohz/full: drop 64-bit requirement, enable ARM support Kevin Hilman
2013-09-16 22:28 ` [PATCH 1/4] nohz_full: Kconfig: VIRT_CPU_ACCOUNTING_GEN: drop 64-bit requirement Kevin Hilman
2013-09-16 22:28 ` [PATCH 2/4] nohz_full: Kconfig: drop requrement on 64-bit Kevin Hilman
@ 2013-09-16 22:28 ` Kevin Hilman
2013-09-16 22:28 ` [PATCH 4/4] ARM: Kconfig: allow full nohz CPU accounting Kevin Hilman
3 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2013-09-16 22:28 UTC (permalink / raw)
To: Frederic Weisbecker, Russell King
Cc: linux-arm-kernel, Paul McKenney, linux-kernel
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 <fweisbec@gmail.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] ARM: Kconfig: allow full nohz CPU accounting
2013-09-16 22:28 [PATCH 0/4] nohz/full: drop 64-bit requirement, enable ARM support Kevin Hilman
` (2 preceding siblings ...)
2013-09-16 22:28 ` [PATCH 3/4] full_nohz: Kconfig: add HAVE_VIRT_CPU_ACCOUNTING_GEN Kevin Hilman
@ 2013-09-16 22:28 ` Kevin Hilman
3 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2013-09-16 22:28 UTC (permalink / raw)
To: Frederic Weisbecker, Russell King
Cc: linux-arm-kernel, Paul McKenney, linux-kernel
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 <fweisbec@gmail.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/4] nohz_full: Kconfig: drop requrement on 64-bit
2013-09-16 22:28 ` [PATCH 2/4] nohz_full: Kconfig: drop requrement on 64-bit Kevin Hilman
@ 2013-09-17 7:00 ` Jean Pihet
0 siblings, 0 replies; 6+ messages in thread
From: Jean Pihet @ 2013-09-17 7:00 UTC (permalink / raw)
To: Kevin Hilman
Cc: Frederic Weisbecker, Russell King, Paul McKenney, LKML, linux-arm
Hi Kevin,
FWIW typo in the title: 'requirement'.
Regards,
Jean
On Tue, Sep 17, 2013 at 12:28 AM, Kevin Hilman <khilman@linaro.org> wrote:
> Now that VIRT_CPU_ACCOUNTING_GEN no longer has a 64-bit requirement,
> it can be dropped here as well.
>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Signed-off-by: Kevin Hilman <khilman@linaro.org>
> ---
> 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
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-17 7:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-16 22:28 [PATCH 0/4] nohz/full: drop 64-bit requirement, enable ARM support Kevin Hilman
2013-09-16 22:28 ` [PATCH 1/4] nohz_full: Kconfig: VIRT_CPU_ACCOUNTING_GEN: drop 64-bit requirement Kevin Hilman
2013-09-16 22:28 ` [PATCH 2/4] nohz_full: Kconfig: drop requrement on 64-bit Kevin Hilman
2013-09-17 7:00 ` Jean Pihet
2013-09-16 22:28 ` [PATCH 3/4] full_nohz: Kconfig: add HAVE_VIRT_CPU_ACCOUNTING_GEN Kevin Hilman
2013-09-16 22:28 ` [PATCH 4/4] ARM: Kconfig: allow full nohz CPU accounting Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).