lkml.org 
[lkml]   [2019]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] numa: make node_to_cpumask_map() NUMA_NO_NODE aware
From
Date
On 2019/9/16 20:23, Michal Hocko wrote:
> On Mon 16-09-19 20:07:22, Yunsheng Lin wrote:
> [...]
>>>> @@ -861,9 +861,12 @@ void numa_remove_cpu(int cpu)
>>>> */
>>>> const struct cpumask *cpumask_of_node(int node)
>>>> {
>>>> - if (node >= nr_node_ids) {
>>>> + if (node == NUMA_NO_NODE)
>>>> + return cpu_online_mask;
>>>> +
>>>> + if ((unsigned int)node >= nr_node_ids) {
>>>> printk(KERN_WARNING
>>>> - "cpumask_of_node(%d): node > nr_node_ids(%u)\n",
>>>> + "cpumask_of_node(%d): node >= nr_node_ids(%u)\n",
>>>> node, nr_node_ids);
>>>> dump_stack();
>>>> return cpu_none_mask;
>>>
>>> Why do we need this?
>>
>> As the commit log says, the above cpumask_of_node() is for debugging,
>> it should catch other "node < 0" cases except NUMA_NO_NODE.
>
> OK, I would just make it a separate patch.

Ok, thanks.

>

\
 
 \ /
  Last update: 2019-09-16 14:56    [W:0.053 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site