From b77755d0f73caa31b6d3d74d71bd9e370363788a Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Tue, 28 Jul 2015 20:14:33 +0900 Subject: [PATCH] obtain_clone_cpuid(): always start from CPU 0 and fill in cores linearily --- arch/x86/kernel/syscall.c | 3 +++ kernel/process.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/syscall.c b/arch/x86/kernel/syscall.c index 0c1f7313..a1264368 100644 --- a/arch/x86/kernel/syscall.c +++ b/arch/x86/kernel/syscall.c @@ -87,6 +87,9 @@ int obtain_clone_cpuid() { struct ihk_mc_cpu_info *cpu_info = ihk_mc_get_cpu_info(); int cpuid, nretry = 0; ihk_mc_spinlock_lock_noirq(&cpuid_head_lock); + + /* Always start from 0 to fill in LWK cores linearily */ + cpuid_head = 0; retry: /* Try to obtain next physical core */ cpuid = cpuid_head; diff --git a/kernel/process.c b/kernel/process.c index b1a19b78..d55ca300 100644 --- a/kernel/process.c +++ b/kernel/process.c @@ -2325,7 +2325,7 @@ redo: struct cpu_local_var *v; struct cpu_local_var *cur_v; struct process *proc_to_move = NULL; - int irqstate2; + unsigned long irqstate2; irqstate = cpu_disable_interrupt_save();