Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1182297 > unrolled thread

Re: [PATCH 3/7] locking/pvqspinlock: Implement wait-early for overcommitted guest

Started byPeter Zijlstra <peterz@infradead.org>
First post2015-07-12 10:30 +0200
Last post2015-07-12 10:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/7] locking/pvqspinlock: Implement wait-early for  overcommitted guest Peter Zijlstra <peterz@infradead.org> - 2015-07-12 10:30 +0200

#1182297 — Re: [PATCH 3/7] locking/pvqspinlock: Implement wait-early for overcommitted guest

FromPeter Zijlstra <peterz@infradead.org>
Date2015-07-12 10:30 +0200
SubjectRe: [PATCH 3/7] locking/pvqspinlock: Implement wait-early for overcommitted guest
Message-ID<pLkO6-5ZO-7@gated-at.bofh.it>
On Sat, Jul 11, 2015 at 04:36:54PM -0400, Waiman Long wrote:
> In an overcommitted guest where some vCPUs have to be halted to make
> forward progress in other areas, it is highly likely that a vCPU
> later in the spinlock queue will be spinning while the ones earlier in
> the queue would have been halted already. The spinning in the later
> vCPUs is then just a waste of precious CPU cycles because they are
> not going to get the lock soon as the earlier ones have to be woken
> up and take their turn to get the lock.
> 
> This patch implements a wait-early mechanism where the vCPU will
> call pv_wait() earlier if the previous vCPU is in the halted state
> already. In this case, it will spin less before calling pv_wait(). On
> the other hand, if the previous vCPU was running and then becomes
> halted, the current vCPU will call pv_wait() immmediately in this case.
> 
> This patch also separates the spin threshold for queue head and
> queue nodes.  It favors the queue head by allowing it to spin longer
> before calling pv_wait().

-ENONUMBERS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web