lkml.org 
[lkml]   [2013]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v3 1/3] sched: schedule balance map foundation
On 02/20/2013 09:21 PM, Peter Zijlstra wrote:
> On Tue, 2013-01-29 at 17:09 +0800, Michael Wang wrote:
>> + for_each_possible_cpu(cpu) {
>> + sbm = &per_cpu(sbm_array, cpu);
>> + node = cpu_to_node(cpu);
>> + size = sizeof(struct sched_domain *) * sbm_max_level;
>> +
>> + for (type = 0; type < SBM_MAX_TYPE; type++) {
>> + sbm->sd[type] = kmalloc_node(size, GFP_KERNEL,
>> node);
>> + WARN_ON(!sbm->sd[type]);
>> + if (!sbm->sd[type])
>> + goto failed;
>> + }
>> + }
>
> You can't readily use kmalloc_node() here, cpu_to_node() might return an
> invalid node for offline cpus here.
>
> Also see: 2ea45800d8e1c3c51c45a233d6bd6289a297a386

Hi, Peter

Thanks for your reply, I've not noticed this point, Mike had suggested
to do allocation in notifier when cpu is online, I will try to use that
idea in the formal patch set.

Regards,
Michael Wang

>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>



\
 
 \ /
  Last update: 2013-02-21 06:01    [W:0.384 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site