Message ID | 20140303172649.GU6732@suse.de (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Mel Gorman <mgorman@suse.de> writes: > On Wed, Feb 19, 2014 at 11:32:00PM +0530, Srikar Dronamraju wrote: >> >> On a powerpc machine with CONFIG_NUMA_BALANCING=y and CONFIG_SPARSEMEM_VMEMMAP >> not enabled, kernel panics. >> > > This? This one fixed that crash on ppc64 http://mid.gmane.org/1393578122-6500-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com -aneesh
On Tue, Mar 04, 2014 at 12:45:19AM +0530, Aneesh Kumar K.V wrote: > Mel Gorman <mgorman@suse.de> writes: > > > On Wed, Feb 19, 2014 at 11:32:00PM +0530, Srikar Dronamraju wrote: > >> > >> On a powerpc machine with CONFIG_NUMA_BALANCING=y and CONFIG_SPARSEMEM_VMEMMAP > >> not enabled, kernel panics. > >> > > > > This? > > This one fixed that crash on ppc64 > > http://mid.gmane.org/1393578122-6500-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com > Thanks.
diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h index da52366..6f661d9 100644 --- a/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h @@ -63,10 +63,10 @@ #ifdef CONFIG_NUMA_BALANCING #define LAST__PID_SHIFT 8 -#define LAST__PID_MASK ((1 << LAST__PID_SHIFT)-1) +#define LAST__PID_MASK ((1UL << LAST__PID_SHIFT)-1) #define LAST__CPU_SHIFT NR_CPUS_BITS -#define LAST__CPU_MASK ((1 << LAST__CPU_SHIFT)-1) +#define LAST__CPU_MASK ((1UL << LAST__CPU_SHIFT)-1) #define LAST_CPUPID_SHIFT (LAST__PID_SHIFT+LAST__CPU_SHIFT) #else diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7815709..b44a8b1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1463,6 +1463,9 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags, int cpu = cpupid_to_cpu(cpupid); int i; + if (unlikely(cpu == LAST__CPU_MASK && !cpu_online(cpu))) + return; + if (unlikely(!p->numa_group)) { unsigned int size = sizeof(struct numa_group) + 2*nr_node_ids*sizeof(unsigned long);