Please sign in to comment.
I've found that V8's own preemption is not really effective. When we wanted to terminate mapreduce task we needed to grab isolate lock. Thus we depended not only on v8's preemption (which I've confirmed via source code) periodically unlocks isolate and does sched_yield, but also on somewhat fair mutex locking. What I've observed in practice is that sched_yield was apparently not enough to give terminateTask thread chance to grab isolate lock in time. Luckily for us, V8 has terminate API that doesn't require locking isolate and using it doesn't depend on preemption at all. Because we don't need taskId anymore I've removed this field. And because we don't need preemption anymore (which is costly to setup (i.e. spawns thread)), I've removed it too. Change-Id: I1e194211c477c5fa1ef78d07e1a3cc05b06fa24e Reviewed-on: http://review.couchbase.org/23580 Reviewed-by: Filipe David Borba Manana <firstname.lastname@example.org> Tested-by: Filipe David Borba Manana <email@example.com> Reviewed-by: Volker Mische <firstname.lastname@example.org> Reviewed-on: http://review.couchbase.org/24951
- Loading branch information...
Showing with 1 addition and 13 deletions.