Re: Using LFSR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/19/2013 05:11 PM, Juan Casse wrote:
> Hi,
> 
> How is LFSR used?
> 
> When running the job file:
> 
> [global]
> readwrite=randwrite
> size=64k
> bs=8192
> random_generator=lfsr
> [test_job]
> 
> fio returns:
> 
> "fio: failed allocating random map. If running a large number of jobs,
> try the 'norandommap' option or set 'softrandommap'. Or give a larger
> --alloc-size to fio."
> 
> I tried the recommendations in the message above to no avail. I also
> tried other combinations of size, bs, and readwrite.

That's very odd. Is it a clean compile? The error isn't that great,
since it could trigger for LFSR init failure too. Can you try with the
attached patch?

-- 
Jens Axboe

diff --git a/lib/lfsr.c b/lib/lfsr.c
index b10ba7a..290829d 100644
--- a/lib/lfsr.c
+++ b/lib/lfsr.c
@@ -233,18 +233,24 @@ int lfsr_init(struct fio_lfsr *fl, uint64_t nums, unsigned long seed,
 	uint8_t *lfsr_taps;
 
 	lfsr_taps = find_lfsr(nums);
-	if (!lfsr_taps)
+	if (!lfsr_taps) {
+		printf("failed finding tap\n");
 		return 1;
+	}
 
 	fl->max_val = nums - 1;
 	fl->xormask = lfsr_create_xormask(lfsr_taps);
 	fl->cached_bit = 1UL << (lfsr_taps[0] - 1);
 
-	if (prepare_spin(fl, spin))
+	if (prepare_spin(fl, spin)) {
+		printf("prepare spin failed\n");
 		return 1;
+	}
 
-	if (lfsr_reset(fl, seed))
+	if (lfsr_reset(fl, seed)) {
+		printf("lfsr reset failed\n");
 		return 1;
+	}
 
 	return 0;
 }

[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux