Re: [PATCH 4/5] rcuwait: Introduce rcuwait_active()

2020-05-18 Thread Wanpeng Li
On Mon, 18 May 2020 at 18:36, Paolo Bonzini wrote: > > On 24/04/20 07:48, Davidlohr Bueso wrote: > > +/* > > + * Note: this provides no serialization and, just as with waitqueues, > > + * requires care to estimate as to whether or not the wait is active. > > + */ > > +static inline int rcuwait_act

Re: [PATCH 4/5] rcuwait: Introduce rcuwait_active()

2020-05-18 Thread Davidlohr Bueso
On Mon, 18 May 2020, Paolo Bonzini wrote: On 24/04/20 07:48, Davidlohr Bueso wrote: +/* + * Note: this provides no serialization and, just as with waitqueues, + * requires care to estimate as to whether or not the wait is active. + */ +static inline int rcuwait_active(struct rcuwait *w) +{ +

Re: [PATCH 4/5] rcuwait: Introduce rcuwait_active()

2020-05-18 Thread Paolo Bonzini
On 24/04/20 07:48, Davidlohr Bueso wrote: > +/* > + * Note: this provides no serialization and, just as with waitqueues, > + * requires care to estimate as to whether or not the wait is active. > + */ > +static inline int rcuwait_active(struct rcuwait *w) > +{ > + return !!rcu_dereference(w->ta