Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-06-07 Thread Julien Grall
Hi Jan, On 01/06/2021 12:54, Jan Beulich wrote: On 27.05.2021 20:48, Julien Grall wrote: On 27/05/2021 12:28, Jan Beulich wrote: port_is_valid() and evtchn_from_port() are fine to use without holding any locks. Accordingly acquire the per-domain lock slightly later in evtchn_close() and evtchn

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-06-01 Thread Jan Beulich
On 27.05.2021 20:48, Julien Grall wrote: > On 27/05/2021 12:28, Jan Beulich wrote: >> port_is_valid() and evtchn_from_port() are fine to use without holding >> any locks. Accordingly acquire the per-domain lock slightly later in >> evtchn_close() and evtchn_bind_vcpu(). > > So I agree that port_is

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-28 Thread Julien Grall
Hi Roger, On 28/05/2021 14:31, Roger Pau Monné wrote: On Fri, May 28, 2021 at 11:48:51AM +0100, Julien Grall wrote: Hi Jan, On 28/05/2021 11:23, Jan Beulich wrote: On 28.05.2021 10:30, Roger Pau Monné wrote: On Thu, May 27, 2021 at 07:48:41PM +0100, Julien Grall wrote: On 27/05/2021 12:28,

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-28 Thread Jan Beulich
On 28.05.2021 15:31, Roger Pau Monné wrote: > I think I'm being extremely dull here, sorry. From your text I > understand that the value returned by is_port_valid could be stale by > the time the user reads it? > > I think there's some condition that makes this value stale, and it's > not the comm

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-28 Thread Roger Pau Monné
On Fri, May 28, 2021 at 11:48:51AM +0100, Julien Grall wrote: > Hi Jan, > > On 28/05/2021 11:23, Jan Beulich wrote: > > On 28.05.2021 10:30, Roger Pau Monné wrote: > > > On Thu, May 27, 2021 at 07:48:41PM +0100, Julien Grall wrote: > > > > On 27/05/2021 12:28, Jan Beulich wrote: > > > > > port_is_

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-28 Thread Julien Grall
Hi Jan, On 28/05/2021 11:23, Jan Beulich wrote: On 28.05.2021 10:30, Roger Pau Monné wrote: On Thu, May 27, 2021 at 07:48:41PM +0100, Julien Grall wrote: On 27/05/2021 12:28, Jan Beulich wrote: port_is_valid() and evtchn_from_port() are fine to use without holding any locks. Accordingly acqui

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-28 Thread Jan Beulich
On 28.05.2021 10:30, Roger Pau Monné wrote: > On Thu, May 27, 2021 at 07:48:41PM +0100, Julien Grall wrote: >> On 27/05/2021 12:28, Jan Beulich wrote: >>> port_is_valid() and evtchn_from_port() are fine to use without holding >>> any locks. Accordingly acquire the per-domain lock slightly later in

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-28 Thread Roger Pau Monné
On Thu, May 27, 2021 at 07:48:41PM +0100, Julien Grall wrote: > Hi Jan, > > On 27/05/2021 12:28, Jan Beulich wrote: > > port_is_valid() and evtchn_from_port() are fine to use without holding > > any locks. Accordingly acquire the per-domain lock slightly later in > > evtchn_close() and evtchn_bind

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-27 Thread Julien Grall
Hi Jan, On 27/05/2021 12:28, Jan Beulich wrote: port_is_valid() and evtchn_from_port() are fine to use without holding any locks. Accordingly acquire the per-domain lock slightly later in evtchn_close() and evtchn_bind_vcpu(). So I agree that port_is_valid() and evtchn_from_port() are fine to

Re: [PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-27 Thread Roger Pau Monné
On Thu, May 27, 2021 at 01:28:07PM +0200, Jan Beulich wrote: > port_is_valid() and evtchn_from_port() are fine to use without holding > any locks. Accordingly acquire the per-domain lock slightly later in > evtchn_close() and evtchn_bind_vcpu(). > > Signed-off-by: Jan Beulich Acked-by: Roger Pau

[PATCH v6 1/3] evtchn: slightly defer lock acquire where possible

2021-05-27 Thread Jan Beulich
port_is_valid() and evtchn_from_port() are fine to use without holding any locks. Accordingly acquire the per-domain lock slightly later in evtchn_close() and evtchn_bind_vcpu(). Signed-off-by: Jan Beulich --- v6: Re-base for re-ordering / shrinking of series. v4: New. --- a/xen/common/event_cha