Good, it lets us optimize for 1/32/64/lots of cpus. NR_CPUS > 8 *
sizeof(unsigned long) is the interesting case, it needs arrays.
>This suggests a "cpumask strategy". Care to share more, like your take
>on such things as
> p = req->task;
> cpu_dest = __ffs(p->cpus_allowed & cpu_online_map);
> rq_dest = cpu_rq(cpu_dest);
>in kernel/sched.c?
That definitely needs encapsulation to handle cpus_allowed etc. being
arrays. A function to generate the logical and of p->cpus_allowed and
cpu_online_map and return cpumask_t * is easy. Doing ffs on that
result will not work, it assumes NR_CPUS fits in a word. Add
ffs_cpumask(cpumask_t *).
-
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/