lkml.org 
[lkml]   [2017]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Xen-devel] [PATCH] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU
From
Date
On 05/06/17 16:32, Boris Ostrovsky wrote:
> I believe we do need to take affinity into consideration even if the
> chance that it is non-default is small.

Agreed.

> I am not opposed to having bind_last_selected_cpu percpu, I just wanted
> to understand the reason better. Additional locking would be a downside
> with a global so if you feel that percpu is worth it then I won't object.

If affinity == cpu_online_mask, then percpu will give a better spread.
atomic set/get can be used, if we want to use a global variable, but I
think it will be more random than percpu.

>
>> Yes, you are correct. .irq_set_affinity pretty much does the same thing.
>>
>> The code will now looks like this.
>> raw_spin_lock_irqsave(lock, flags);
>> percpu read
>> select_cpu
>> percpu write
>> xen_rebind_evtchn_to_cpu(evtchn, selected_cpu)
>> raw_spin_unlock_irqsave(lock, flags);
> (BTW, I just noticed --- you don't need to initialize desc)

Sorry, I didn't get it. Which desc doesn't need init ?

-Anoob

\
 
 \ /
  Last update: 2017-06-12 00:24    [W:0.046 / U:2.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site