bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] Rewrite gsync so that it works with remote tasks v2


From: Samuel Thibault
Subject: Re: [PATCH 2/2] Rewrite gsync so that it works with remote tasks v2
Date: Sat, 4 Mar 2017 22:45:08 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Hello,

While reviewing the patch, I was thinking (this is actually unrelated,
just a TODO for later):

Agustina Arzille, on mer. 01 févr. 2017 12:32:53 -0300, wrote:
> /* Look for a key that matches. We take advantage of the fact
>  * that the entries are sorted to break out of the loop as
>  * early as possible. */

Do we really want to keep that list sorted?  That makes waking up two
times less expensive, but it makes waiting much more expensive, so
overall it's just the same.

And I'd think that in practice, there is more probability that the
thread to be woken up was queued last, for temporal locality reasons,
and so keeping the list sorted is actually more expensive than just
queueing at the head and looking up starting from the head :)

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]