From: Keir Fraser Subject: Re: [PATCH] adjust the way cpumasks get passed around Date: Wed, 20 May 2009 06:39:24 -0700 Message-ID: References: <4A141FAD0200007800001C92@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A141FAD0200007800001C92@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 20/05/2009 06:20, "Jan Beulich" 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