Skip to content

Commit

Permalink
lib/cpumask: cpumask_set_cpu_local_first to use all cores when numa n…
Browse files Browse the repository at this point in the history
…ode is not defined

When device is non numa aware (numa_node == -1), use all online cpu's.

Signed-off-by: Amir Vadai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
amirv authored and davem330 committed Jul 3, 2014
1 parent 35f6f45 commit 143b5ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cpumask.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)

i %= num_online_cpus();

if (!cpumask_of_node(numa_node)) {
if (numa_node == -1 || !cpumask_of_node(numa_node)) {
/* Use all online cpu's for non numa aware system */
cpumask_copy(mask, cpu_online_mask);
} else {
Expand Down

0 comments on commit 143b5ba

Please sign in to comment.