From 2a268f3846eafb9aa80f512991a57f275333d7c6 Mon Sep 17 00:00:00 2001 From: Jim Kukunas Date: Tue, 22 May 2012 13:54:04 +1000 Subject: [PATCH] --- yaml --- r: 305924 b: refs/heads/master c: 56a519913eeba2bdae4d7ee39e80fab442c3836c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/crypto/xor.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a7ddb4fb6b10..86ba1229fd08 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6a328475cccacb99a13b06978091da936dd51d89 +refs/heads/master: 56a519913eeba2bdae4d7ee39e80fab442c3836c diff --git a/trunk/crypto/xor.c b/trunk/crypto/xor.c index 87884435bddb..84daa1111dad 100644 --- a/trunk/crypto/xor.c +++ b/trunk/crypto/xor.c @@ -21,6 +21,7 @@ #include #include #include +#include #include /* The xor routines to use. */ @@ -69,6 +70,8 @@ do_xor_speed(struct xor_block_template *tmpl, void *b1, void *b2) tmpl->next = template_list; template_list = tmpl; + preempt_disable(); + /* * Count the number of XORs done during a whole jiffy, and use * this to calculate the speed of checksumming. We use a 2-page @@ -91,6 +94,8 @@ do_xor_speed(struct xor_block_template *tmpl, void *b1, void *b2) max = count; } + preempt_enable(); + speed = max * (HZ * BENCH_SIZE / 1024); tmpl->speed = speed;