From: Richard Weinberger <richard@nod.at>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: david oberhollenzer <david.oberhollenzer@sigma-star.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH mtd-utils] mtd-tests: Read and write pages during speed tests
Date: Wed, 13 Oct 2021 13:12:43 +0200 (CEST) [thread overview]
Message-ID: <308700286.68659.1634123563780.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20211013100807.306920-1-miquel.raynal@bootlin.com>
----- Ursprüngliche Mail -----
> Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> An: "david oberhollenzer" <david.oberhollenzer@sigma-star.at>
> CC: "richard" <richard@nod.at>, "Vignesh Raghavendra" <vigneshr@ti.com>, "Tudor Ambarus" <Tudor.Ambarus@microchip.com>,
> "linux-mtd" <linux-mtd@lists.infradead.org>, "Miquel Raynal" <miquel.raynal@bootlin.com>
> Gesendet: Mittwoch, 13. Oktober 2021 12:08:07
> Betreff: [PATCH mtd-utils] mtd-tests: Read and write pages during speed tests
> The speed test does reads and writes of different sizes:
> - eraseblock
> - page
> - two pages
>
> At least this is the theory because, as opposed to the legacy kernel
> module doing the same measurement, the userspace tool uses the subpage
> size (hence accessing the same page 4, 8 or 16 times depending on the
> subpage setting). Of course if the controller does not support subpages,
> this issue is not visible.
>
> Use mtd.min_io_size instead for non-NOR devices in order to get the
> right bandwidth (at least one that fits the logs).
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> tests/mtd-tests/flash_speed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/mtd-tests/flash_speed.c b/tests/mtd-tests/flash_speed.c
> index 0058269..2fc70a1 100644
> --- a/tests/mtd-tests/flash_speed.c
> +++ b/tests/mtd-tests/flash_speed.c
> @@ -343,7 +343,7 @@ int main(int argc, char **argv)
> puts("not NAND flash, assume page size is 512 bytes.");
> pgsize = 512;
> } else {
> - pgsize = mtd.subpage_size;
> + pgsize = mtd.min_io_size;
Now the userspace does the same as the kernel test.
On the kernel side it uses mtd->writesize.
Reviewed-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-10-13 12:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 10:08 [PATCH mtd-utils] mtd-tests: Read and write pages during speed tests Miquel Raynal
2021-10-13 11:12 ` Richard Weinberger [this message]
2021-10-13 11:20 ` David Oberhollenzer
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=308700286.68659.1634123563780.JavaMail.zimbra@nod.at \
--to=richard@nod.at \
--cc=Tudor.Ambarus@microchip.com \
--cc=david.oberhollenzer@sigma-star.at \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=vigneshr@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.