[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 06/19] xen: credit2: read NOW() with the proper runq lock held



>>> On 18.06.16 at 01:12, <dario.faggioli@xxxxxxxxxx> wrote:
> Yet another situation very similar to 779511f4bf5ae
> ("sched: avoid races on time values read from NOW()").
> 
> In fact, when more than one runqueue is involved, we need
> to make sure that the following does not happen:
>  1. take the lock of 1st runq
>  2. now = NOW()
>  3. take the lock of 2nd runq
>  4. use now
> 
> as, if we have to wait at step 3, the value in now may
> be stale when we get to use it at step 4.

Is this really meaningful here? We're talking of trylocks, which don't
incur any delay other than the latency of the LOCKed (on x86)
instruction to determine lock availability.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.