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


Groups > linux.kernel > #1224193

Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning
Date 2015-09-14 16:20 +0200
Message-ID <q8CLU-b7-19@gated-at.bofh.it> (permalink)
References <q7BoS-1rn-5@gated-at.bofh.it> <q7BoS-1rn-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 11, 2015 at 02:37:38PM -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. 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 an adaptive spinning mechanism where the vCPU
> will call pv_wait() if the following conditions are true:
> 
>  1) the vCPU has not been halted before;
>  2) the previous vCPU is not running.

Why 1? For the mutex adaptive stuff we only care about the lock holder
running, right?
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning Waiman Long <Waiman.Long@hpe.com> - 2015-09-11 20:40 +0200
  Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning Peter Zijlstra <peterz@infradead.org> - 2015-09-14 16:20 +0200
    Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning Waiman Long <waiman.long@hpe.com> - 2015-09-14 21:40 +0200
      Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning Peter Zijlstra <peterz@infradead.org> - 2015-09-15 10:40 +0200
        Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning Waiman Long <waiman.long@hpe.com> - 2015-09-15 17:40 +0200
          Re: [PATCH v6 6/6] locking/pvqspinlock: Queue node adaptive spinning Peter Zijlstra <peterz@infradead.org> - 2015-09-16 17:10 +0200

csiph-web