Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305924
b: refs/heads/master
c: 56a5199
h: refs/heads/master
v: v3
  • Loading branch information
Jim Kukunas authored and NeilBrown committed May 22, 2012
1 parent 13f754b commit 2a268f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a328475cccacb99a13b06978091da936dd51d89
refs/heads/master: 56a519913eeba2bdae4d7ee39e80fab442c3836c
5 changes: 5 additions & 0 deletions trunk/crypto/xor.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/gfp.h>
#include <linux/raid/xor.h>
#include <linux/jiffies.h>
#include <linux/preempt.h>
#include <asm/xor.h>

/* The xor routines to use. */
Expand Down Expand Up @@ -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
Expand All @@ -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;

Expand Down

0 comments on commit 2a268f3

Please sign in to comment.