|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] adjust the way cpumasks get passed around
On 20/05/2009 06:20, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
> Rather than passing cpumasks by value in all cases (which is problematic
> for large NR_CPUS configurations), pass them by value only if they are
> not wider than a pointer; in all other cases, pass them 'by reference'
> (i.e. through a pointer to a const cpumask).
>
> On x86 this changes send_IPI_mask() to always only send IPIs to remote
> CPUs (meaning any caller needing to handle the current CPU as well has
> to do so on its own).
>
> Since the patch touches on_selected_cpus() parameters anyway, it at
> once removes that function's (and then for consistency also
> on_each_cpu()'s as well as smp_call_function()'s similar) dead "retry"
> parameter.
Removing the unused retry parameters belongs in a separate patch.
I don't like the conditional pass-by-ref/value approach. We end up with yet
another layer of macro abstraction and names in cpumask.h, and it means
different builds may yield different bugs (pass-by-ref is riskier since the
cpumask can change under the callee's feet, and this would be the rarer case
for testing since requires a wide cpumask at build time).
So, I can agree with using pass-by-ref, but then please just make a patch to
do that always. And put the unrelated cleanups in a separate patch please.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|