Re: [PATCH] Implement missing x86_64 function smp_call_function_mask()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andi Kleen wrote:
> On Thursday 23 August 2007 09:36:05 Laurent Vivier wrote:
>> This patch defines the missing function smp_call_function_mask() for x86_64,
>> this is more or less a cut&paste of i386 function.
> 
> What do you need it for?

Hi Andi,

it is for KVM:

drivers/kvm/kvm_main.c:

 203 void kvm_flush_remote_tlbs(struct kvm *kvm)
 204 {
...
 227         /*
 228          * We really want smp_call_function_mask() here.  But that's not
 229          * available, so ipi all cpus in parallel and wait for them
 230          * to complete.
 231          */
 232         for (cpu = first_cpu(cpus); cpu != NR_CPUS; cpu = next_cpu(cpu, cpus))
 233                 smp_call_function_single(cpu, ack_flush, &completed, 1, 0);
 234         while (atomic_read(&completed) != needed) {
 235                 cpu_relax();
 236                 barrier();
 237         }
 238 }

Regards,
Laurent
-- 
------------- [email protected]  --------------
          "Software is hard" - Donald Knuth

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux