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

Re: [Xen-devel] [PATCH 03/12] xen/events: remove unnecessary init_evtchn_cpu_bindings()



On 20/03/13 11:09, Jan Beulich wrote:
>>>> On 19.03.13 at 22:04, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
>> From: David Vrabel <david.vrabel@xxxxxxxxxx>
>>
>> Event channels are always explicitly bound to a specific VCPU before
>> they are first enabled.  There is no need to initialize all possible
>> events as bound to VCPU 0 at start of day or after a resume.
> 
> That part may indeed be safe to do, but ...
> 
>> --- a/drivers/xen/events.c
>> +++ b/drivers/xen/events.c
>> @@ -333,24 +333,6 @@ static void bind_evtchn_to_cpu(unsigned int chn, 
>> unsigned int cpu)
>>      info_for_irq(irq)->cpu = cpu;
>>  }
>>  
>> -static void init_evtchn_cpu_bindings(void)
>> -{
>> -    int i;
>> -#ifdef CONFIG_SMP
>> -    struct irq_info *info;
>> -
>> -    /* By default all event channels notify CPU#0. */
>> -    list_for_each_entry(info, &xen_irq_list_head, list) {
>> -            struct irq_desc *desc = irq_to_desc(info->irq);
>> -            cpumask_copy(desc->irq_data.affinity, cpumask_of(0));
>> -    }
>> -#endif
>> -
>> -    for_each_possible_cpu(i)
>> -            memset(per_cpu(cpu_evtchn_mask, i),
>> -                   (i == 0) ? ~0 : 0, sizeof(*per_cpu(cpu_evtchn_mask, i)));
> 
> ... you also remove the initialization of the mask bits here. If
> that was intended, a sentence about the safety of this would
> certainly be good to add to the description.

These are similarly initialized when an event is bound to a VCPU.  Note
that cpu_evtchn_mask is poorly named as it's really the inverse of a mask.

I'll extend the commit message to mention this.

David

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.