Re: [PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-18 Thread Jürgen Groß
On 15.02.21 22:35, Boris Ostrovsky wrote: On 2/11/21 5:16 AM, Juergen Gross wrote: @@ -622,6 +623,7 @@ static void xen_irq_lateeoi_locked(struct irq_info *info, bool spurious) } info->eoi_time = 0; + smp_store_release(>is_active, 0); Can this be done in

Re: [PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-15 Thread Boris Ostrovsky
On 2/11/21 5:16 AM, Juergen Gross wrote: > @@ -622,6 +623,7 @@ static void xen_irq_lateeoi_locked(struct irq_info *info, > bool spurious) > } > > info->eoi_time = 0; > + smp_store_release(>is_active, 0); Can this be done in lateeoi_ack_dynirq()/lateeoi_mask_ack_dynirq(),

Re: [PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-14 Thread Jürgen Groß
On 14.02.21 22:34, Julien Grall wrote: Hi Juergen, On 11/02/2021 10:16, Juergen Gross wrote: When changing the cpu affinity of an event it can happen today that (with some unlucky timing) the same event will be handled on the old and the new cpu at the same time. Avoid that by adding an

Re: [PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-14 Thread Julien Grall
Hi Juergen, On 11/02/2021 10:16, Juergen Gross wrote: When changing the cpu affinity of an event it can happen today that (with some unlucky timing) the same event will be handled on the old and the new cpu at the same time. Avoid that by adding an "event active" flag to the per-event data and

[PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-11 Thread Juergen Gross
When changing the cpu affinity of an event it can happen today that (with some unlucky timing) the same event will be handled on the old and the new cpu at the same time. Avoid that by adding an "event active" flag to the per-event data and call the handler only if this flag isn't set.