Re: [PATCH v8 5/5] locking/qspinlock: Introduce the shuffle reduction optimization into CNA
From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-01-22 09:56:47
Also in:
linux-arch, lkml
From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-01-22 09:56:47
Also in:
linux-arch, lkml
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 <redacted>
Seriously, in what universe is that actually readable code? Steve quick, say what it does. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel