| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 4/5] evtchn: convert domain event lock to an r/w one
 Hi Jan, On 23/11/2020 13:29, Jan Beulich wrote: 
 This change made me realized that I don't quite understand how the rwlock is meant to work for event_lock. I was actually expecting this to be a write_lock() given there are state changed in the d2 events. Could you outline how a developper can find out whether he/she should use read_lock or write_lock? [...] 
 As I pointed out when this implementation was first proposed (see [1]), there is a risk that the loop will never exit. I think the following implementation would be better (although it is ugly): write_lock(); /* do nothing */ write_unlock(); This will act as a barrier between lock held before and after the call.As an aside, I think the introduction of rw_barrier() deserve to be a in separate patch to help the review. Cheers, -- Julien Grall 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |