lkml.org 
[lkml]   [2020]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 5/5] locking/qspinlock: Introduce the shuffle reduction optimization into CNA
On Mon, Dec 30, 2019 at 02:40:42PM -0500, Alex Kogan wrote:
> @@ -251,8 +281,11 @@ __always_inline u32 cna_pre_scan(struct qspinlock *lock,
> struct cna_node *cn = (struct cna_node *)node;
>
> cn->pre_scan_result =
> - cn->intra_count == intra_node_handoff_threshold ?
> - FLUSH_SECONDARY_QUEUE : cna_scan_main_queue(node, node);
> + (node->locked <= 1 && probably(SHUFFLE_REDUCTION_PROB_ARG)) ?
> + PASS_LOCK_IMMEDIATELY :
> + cn->intra_count == intra_node_handoff_threshold ?
> + FLUSH_SECONDARY_QUEUE :
> + cna_scan_main_queue(node, node);
>
> return 0;
> }

Let me just, once again, remind people that the Linux Kernel is not part
of the Obfuscated C code contest.

> Reviewed-by: Steve Sistare <steven.sistare@oracle.com>

Seriously, in what universe is that actually readable code? Steve quick,
say what it does.

\
 
 \ /
  Last update: 2020-01-22 10:57    [W:0.193 / U:15.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site