|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 02/12] evtchn: avoid race in get_xen_consumer()
Hi Jan, On 28/09/2020 11:56, Jan Beulich wrote: I would be happy with an implementation of cmpxchgptr() in xen/lib.h. --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -57,7 +57,8 @@ * with a pointer, we stash them dynamically in a small lookup array which * can be indexed by a small integer. */ -static xen_event_channel_notification_t xen_consumers[NR_XEN_CONSUMERS]; +static xen_event_channel_notification_t __read_mostly + xen_consumers[NR_XEN_CONSUMERS]; This doesn't seem directly related to the changes below. Can you explain it in the commit message?
/* Default notification action: wake up from wait_on_xen_event_channel(). */
This wants an explanation in the code. Maybe:"As there is no global lock, the cmpxchg() will prevent race between two callers." Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |