[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] events/fifo: don't spin indefinitely when setting LINK
>>> On 11.11.13 at 17:03, David Vrabel <david.vrabel@xxxxxxxxxx> wrote: > +static bool_t evtchn_fifo_set_link(struct domain *d, event_word_t *word, All you need d for is to get its domain_id, hence it could easily be a pointer to const. > + w = read_atomic(word); > + > + for ( try = 0; try < 4; try++ ) > + { > + ret = try_set_link(word, &w, link); > + if ( ret >= 0 ) > + { > + clear_bit(EVTCHN_FIFO_BUSY, word); Considering that this is another atomic operation, wouldn't it make sense to have the cmpxchg() at once clear the flag, and hence you'd need to clear it here only when ret == 0 (which I understand isn't the common case)? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |