Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755620AbbBPSNt (ORCPT ); Mon, 16 Feb 2015 13:13:49 -0500 Received: from www.linutronix.de ([62.245.132.108]:39085 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753594AbbBPSNs (ORCPT ); Mon, 16 Feb 2015 13:13:48 -0500 Date: Mon, 16 Feb 2015 19:13:36 +0100 From: Sebastian Andrzej Siewior To: linux-rt-users Cc: LKML , Thomas Gleixner , rostedt@goodmis.org, John Kacur , "'NeilBrown" , '@linutronix.de, "'Herbert Xu" , linux-crypto@vger.kernel.org, "David S. Miller" Subject: Re: [ANNOUNCE] 3.18.7-rt1 Message-ID: <20150216181336.GJ21649@linutronix.de> References: <20150216111822.GA21649@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150216111822.GA21649@linutronix.de> X-Key-Id: 97C4700B X-Key-Fingerprint: 09E2 D1F3 9A3A FF13 C3D3 961C 0688 1C1E 97C4 700B User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2196 Lines: 71 * Sebastian Andrzej Siewior | 2015-02-16 12:18:22 [+0100]: >Known issues: > > - xor / raid_pq > I had max latency jumping up to 67563us on one CPU while the next > lower max was 58us. I tracked it down to module's init code of > xor and raid_pq. Both disable preemption while measuring the > measuring the performance of the individual implementation. The patch at the bottom gets rid of it. How important is this preempt_disable() and how likely is that we could use precomputed priority lists of function instead this of this runtime check? XOR already prefers AVX based-xor if available and numbers/test at runtime could be removed. Is there a case where SSE worse on CPU X better than MMX and this is why we do it? diff --git a/crypto/xor.c b/crypto/xor.c index 35d6b3a..19e20f5 100644 --- a/crypto/xor.c +++ b/crypto/xor.c @@ -70,7 +70,7 @@ do_xor_speed(struct xor_block_template *tmpl, void *b1, void *b2) tmpl->next = template_list; template_list = tmpl; - preempt_disable(); + preempt_disable_nort(); /* * Count the number of XORs done during a whole jiffy, and use @@ -94,7 +94,7 @@ do_xor_speed(struct xor_block_template *tmpl, void *b1, void *b2) max = count; } - preempt_enable(); + preempt_enable_nort(); speed = max * (HZ * BENCH_SIZE / 1024); tmpl->speed = speed; diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 7d0e5cd..e9920d4 100644 --- a/lib/raid6/algos.c +++ b/lib/raid6/algos.c @@ -142,7 +142,7 @@ static inline const struct raid6_calls *raid6_choose_gen( perf = 0; - preempt_disable(); + preempt_disable_nort(); j0 = jiffies; while ((j1 = jiffies) == j0) cpu_relax(); @@ -151,7 +151,7 @@ static inline const struct raid6_calls *raid6_choose_gen( (*algo)->gen_syndrome(disks, PAGE_SIZE, *dptrs); perf++; } - preempt_enable(); + preempt_enable_nort(); if (perf > bestperf) { bestperf = perf; Sebastian -- 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/