Re: [PATCH v8 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock
From: Peter Zijlstra
Date: Tue Jan 21 2020 - 09:42:47 EST
On Mon, Dec 30, 2019 at 02:40:40PM -0500, Alex Kogan wrote:
> +#define pv_wait_head_or_lock cna_pre_scan
Also inconsitent naming.
> +__always_inline u32 cna_pre_scan(struct qspinlock *lock,
> + struct mcs_spinlock *node)
> +{
> + struct cna_node *cn = (struct cna_node *)node;
> +
> + cn->pre_scan_result = cna_scan_main_queue(node, node);
> +
> + return 0;
> +}
The thinking here is that we're trying to make use of the time otherwise
spend spinning on atomic_cond_read_acquire(), to search for a potential
unlock candidate?
Surely that deserves a comment.