From patchwork Mon Feb 16 18:13:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 5834231 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EEC6A9F36A for ; Mon, 16 Feb 2015 18:13:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 303632020F for ; Mon, 16 Feb 2015 18:13:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46F86201FB for ; Mon, 16 Feb 2015 18:13:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753863AbbBPSNt (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 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1YNQAq-0001v4-KR; Mon, 16 Feb 2015 19:13:36 +0100 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-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-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * 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? Sebastian --- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;