diff mbox series

cpu_idle_job: relax a bit

Message ID 20180309021607.2240-1-stewart@linux.vnet.ibm.com
State Accepted
Headers show
Series cpu_idle_job: relax a bit | expand

Commit Message

Stewart Smith March 9, 2018, 2:16 a.m. UTC
This *dramatically* improves kernel boot time with GCOV builds

from ~3minutes between loading kernel and switching the HILE
bit down to around 10 seconds.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 core/cpu.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stewart Smith March 13, 2018, 4:36 a.m. UTC | #1
Stewart Smith <stewart@linux.vnet.ibm.com> writes:
> This *dramatically* improves kernel boot time with GCOV builds
>
> from ~3minutes between loading kernel and switching the HILE
> bit down to around 10 seconds.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
> ---
>  core/cpu.c | 1 +
>  1 file changed, 1 insertion(+)

Merged to master as of f88ffa66d1b4af17dca3e7c17955c096317c75e1.
diff mbox series

Patch

diff --git a/core/cpu.c b/core/cpu.c
index 4914d3024cfe..e243344aace6 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -450,6 +450,7 @@  void cpu_idle_job(void)
 		while (!cpu_check_jobs(cpu)) {
 			if (pm_enabled)
 				break;
+			cpu_relax();
 			barrier();
 		}
 		smt_medium();