lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Jul 2022 15:34:03 -0400
From:   Waiman Long <longman@...hat.com>
To:     Nicholas Piggin <npiggin@...il.com>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/13] locking/qspinlock: move pv lock word helpers into
 qspinlock.c

On 7/4/22 10:38, Nicholas Piggin wrote:
> There is no real reason not to keep all the bit manipulation together.
>
> Signed-off-by: Nicholas Piggin <npiggin@...il.com>
> ---
>   kernel/locking/qspinlock.c          | 107 ++++++++++++++++------------
>   kernel/locking/qspinlock_paravirt.h |  51 -------------
>   2 files changed, 63 insertions(+), 95 deletions(-)
>
> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index 7360d643de29..8f2173e22479 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -141,7 +141,24 @@ struct qnode *grab_qnode(struct qnode *base, int idx)
>   
>   #define _Q_LOCKED_PENDING_MASK (_Q_LOCKED_MASK | _Q_PENDING_MASK)
>   
> +/**
> + * set_pending - set the pending bit.
> + * @lock: Pointer to queued spinlock structure
> + *
> + * *,0,* -> *,1,*
> + *
> + * The pending bit is used by the queue head vCPU to indicate that it
> + * is actively spinning on the lock and no lock stealing is allowed.

The pending bit has different usage in pv and non-pv cases. The 
description here refers to the pv case. For non-pv, it is used to avoid 
loading the the extra node cacheline in likely contended case.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ