From: Jens Axboe <axboe@kernel.dk>
To: Juan Casse <jcasse@chromium.org>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: Using LFSR
Date: Tue, 20 Aug 2013 08:26:33 -0600 [thread overview]
Message-ID: <52137C99.8070006@kernel.dk> (raw)
In-Reply-To: <CAPet_21dehFMKwU25L+ho1uRWOO6w_p7LqxxyJe5gQ5a9G0M5A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
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
[-- Attachment #2: lfsr-debug-fail.patch --]
[-- Type: text/x-patch, Size: 705 bytes --]
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;
}
prev parent reply other threads:[~2013-08-20 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 23:11 Using LFSR Juan Casse
2013-08-20 7:37 ` Alex Pyrgiotis
2013-08-21 0:21 ` Juan Casse
2013-08-20 14:26 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52137C99.8070006@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=jcasse@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox