[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 1/4] VT-d PI: track the number of vcpus on pi blocking list
>>> On 01.09.17 at 03:39, <chao.gao@xxxxxxxxx> wrote: > After thinking it again, I want to define the counter as > a unsigned int variable for the following reasion: > 1. It is definite that the counter is closely related with > list_add() and list_del(). If the list is protected by the > lock, it is straightforward that the counter is also protected > by the lock. > 2. In patch 3, althought there are some lock-less readers, we > will check the counter still meets our requirement with the lock > held. Thus, I don't think there is a racing issue. I think that's fine, but then you still don't need LOCKed accesses to the counter for updating it; write_atomic() will suffice afaict. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |