Re: [PATCH] mtd: Add simple read disturb test

2015-10-20 Thread Ezequiel Garcia
On 12 October 2015 at 21:11, Brian Norris wrote: > Resurrecting this old thread, since it was mentioned at ELCE. > > On Sun, Apr 12, 2015 at 09:31:20PM +0200, Boris Brezillon wrote: >> On Thu, 02 Apr 2015 18:18:34 +0200 >> Richard Weinberger wrote: >> > Am 02.04.2015 um 18:04 schrieb Brian

Re: [PATCH] mtd: Add simple read disturb test

2015-10-20 Thread Ezequiel Garcia
On 12 October 2015 at 21:11, Brian Norris wrote: > Resurrecting this old thread, since it was mentioned at ELCE. > > On Sun, Apr 12, 2015 at 09:31:20PM +0200, Boris Brezillon wrote: >> On Thu, 02 Apr 2015 18:18:34 +0200 >> Richard Weinberger wrote: >>

Re: [PATCH] mtd: Add simple read disturb test

2015-10-19 Thread Richard Weinberger
Am 13.10.2015 um 02:11 schrieb Brian Norris: > Resurrecting this old thread, since it was mentioned at ELCE. > > On Sun, Apr 12, 2015 at 09:31:20PM +0200, Boris Brezillon wrote: >> On Thu, 02 Apr 2015 18:18:34 +0200 >> Richard Weinberger wrote: >>> Am 02.04.2015 um 18:04 schrieb Brian Norris:

Re: [PATCH] mtd: Add simple read disturb test

2015-10-19 Thread Richard Weinberger
Am 13.10.2015 um 02:11 schrieb Brian Norris: > Resurrecting this old thread, since it was mentioned at ELCE. > > On Sun, Apr 12, 2015 at 09:31:20PM +0200, Boris Brezillon wrote: >> On Thu, 02 Apr 2015 18:18:34 +0200 >> Richard Weinberger wrote: >>> Am 02.04.2015 um 18:04 schrieb

Re: [PATCH] mtd: Add simple read disturb test

2015-10-12 Thread Brian Norris
Resurrecting this old thread, since it was mentioned at ELCE. On Sun, Apr 12, 2015 at 09:31:20PM +0200, Boris Brezillon wrote: > On Thu, 02 Apr 2015 18:18:34 +0200 > Richard Weinberger wrote: > > Am 02.04.2015 um 18:04 schrieb Brian Norris: > > > On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard

Re: [PATCH] mtd: Add simple read disturb test

2015-10-12 Thread Brian Norris
Resurrecting this old thread, since it was mentioned at ELCE. On Sun, Apr 12, 2015 at 09:31:20PM +0200, Boris Brezillon wrote: > On Thu, 02 Apr 2015 18:18:34 +0200 > Richard Weinberger wrote: > > Am 02.04.2015 um 18:04 schrieb Brian Norris: > > > On Thu, Apr 02, 2015 at

Re: [PATCH] mtd: Add simple read disturb test

2015-04-12 Thread Boris Brezillon
Hi Richard, On Thu, 02 Apr 2015 18:18:34 +0200 Richard Weinberger wrote: > Am 02.04.2015 um 18:04 schrieb Brian Norris: > > On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: > >> This simple MTD tests allows the user to see when read disturb happens. > >> By reading blocks

Re: [PATCH] mtd: Add simple read disturb test

2015-04-12 Thread Boris Brezillon
Hi Richard, On Thu, 02 Apr 2015 18:18:34 +0200 Richard Weinberger rich...@nod.at wrote: Am 02.04.2015 um 18:04 schrieb Brian Norris: On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: This simple MTD tests allows the user to see when read disturb happens. By reading

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Andrea Scian
Hi all, Il 02/04/2015 18:18, Richard Weinberger ha scritto: > Am 02.04.2015 um 18:04 schrieb Brian Norris: >> On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: >> [1] Although there are some latent issues in these tests that are still >> getting get worked out (e.g., bad

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 18:04 schrieb Brian Norris: > On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: >> This simple MTD tests allows the user to see when read disturb happens. >> By reading blocks over and over it reports flipped bits. >> Currently it reports only flipped bits of the

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Brian Norris
On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: > This simple MTD tests allows the user to see when read disturb happens. > By reading blocks over and over it reports flipped bits. > Currently it reports only flipped bits of the worst page of a block. > If within block X page

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 16:32 schrieb Fabio Estevam: >> + >> + ret = read_eraseblock_by_page(i, iteration); >> + >> + ret = mtdtest_relax(); >> + if (ret) >> + goto out; BTW: While all the nitpicking you

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 17:03 schrieb Fabio Estevam: > On Thu, Apr 2, 2015 at 11:56 AM, Richard Weinberger wrote: > >> It is not *much* better. It is just a matter of taste. > > ... and instructions cycles as well ;-) You do understand that this is an error path? Thanks, //richard -- To unsubscribe

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 17:02 schrieb Fabio Estevam: > On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger wrote: > >> + ret = mtdtest_erase_eraseblock(mtd, i); >> + if (ret) { >> + err = ret; >> + goto out; >> + } >

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:56 AM, Richard Weinberger wrote: > It is not *much* better. It is just a matter of taste. ... and instructions cycles as well ;-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger wrote: > + ret = mtdtest_erase_eraseblock(mtd, i); > + if (ret) { > + err = ret; > + goto out; > + } Why not just do like this instead? err =

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 16:45 schrieb Fabio Estevam: > On Thu, Apr 2, 2015 at 11:33 AM, Richard Weinberger wrote: > >> Why? Free()ing a NULL pointer is perfectly fine. >> What did I miss? :) > > If the first 'iobuf = kmalloc(mtd->erasesize, GFP_KERNEL);' fails then > you jump to the out label where

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:33 AM, Richard Weinberger wrote: > Why? Free()ing a NULL pointer is perfectly fine. > What did I miss? :) If the first 'iobuf = kmalloc(mtd->erasesize, GFP_KERNEL);' fails then you jump to the out label where you call 5 kfree() and then return the error. It would be

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 16:32 schrieb Fabio Estevam: > On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger wrote: > >> + err = -ENOMEM; >> + iobuf = kmalloc(mtd->erasesize, GFP_KERNEL); >> + if (!iobuf) >> + goto out; > > The error handling here does not look right. >

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger wrote: > + err = -ENOMEM; > + iobuf = kmalloc(mtd->erasesize, GFP_KERNEL); > + if (!iobuf) > + goto out; The error handling here does not look right. > + > + iobuf_orig = kmalloc(mtd->erasesize,

[PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
This simple MTD tests allows the user to see when read disturb happens. By reading blocks over and over it reports flipped bits. Currently it reports only flipped bits of the worst page of a block. If within block X page P1 has 3 bit flips and P6 4, it will report 4. By default every 50th block is

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Andrea Scian
Hi all, Il 02/04/2015 18:18, Richard Weinberger ha scritto: Am 02.04.2015 um 18:04 schrieb Brian Norris: On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: [1] Although there are some latent issues in these tests that are still getting get worked out (e.g., bad handling of

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 16:32 schrieb Fabio Estevam: + + ret = read_eraseblock_by_page(i, iteration); + + ret = mtdtest_relax(); + if (ret) + goto out; BTW: While all the nitpicking you oversaw the real

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 16:45 schrieb Fabio Estevam: On Thu, Apr 2, 2015 at 11:33 AM, Richard Weinberger rich...@nod.at wrote: Why? Free()ing a NULL pointer is perfectly fine. What did I miss? :) If the first 'iobuf = kmalloc(mtd-erasesize, GFP_KERNEL);' fails then you jump to the out label

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 17:02 schrieb Fabio Estevam: On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger rich...@nod.at wrote: + ret = mtdtest_erase_eraseblock(mtd, i); + if (ret) { + err = ret; + goto out; + }

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 17:03 schrieb Fabio Estevam: On Thu, Apr 2, 2015 at 11:56 AM, Richard Weinberger rich...@nod.at wrote: It is not *much* better. It is just a matter of taste. ... and instructions cycles as well ;-) You do understand that this is an error path? Thanks, //richard -- To

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger rich...@nod.at wrote: + ret = mtdtest_erase_eraseblock(mtd, i); + if (ret) { + err = ret; + goto out; + } Why not just do like this instead?

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:56 AM, Richard Weinberger rich...@nod.at wrote: It is not *much* better. It is just a matter of taste. ... and instructions cycles as well ;-) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Brian Norris
On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: This simple MTD tests allows the user to see when read disturb happens. By reading blocks over and over it reports flipped bits. Currently it reports only flipped bits of the worst page of a block. If within block X page P1

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:33 AM, Richard Weinberger rich...@nod.at wrote: Why? Free()ing a NULL pointer is perfectly fine. What did I miss? :) If the first 'iobuf = kmalloc(mtd-erasesize, GFP_KERNEL);' fails then you jump to the out label where you call 5 kfree() and then return the error. It

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Fabio Estevam
On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger rich...@nod.at wrote: + err = -ENOMEM; + iobuf = kmalloc(mtd-erasesize, GFP_KERNEL); + if (!iobuf) + goto out; The error handling here does not look right. + + iobuf_orig = kmalloc(mtd-erasesize,

[PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
This simple MTD tests allows the user to see when read disturb happens. By reading blocks over and over it reports flipped bits. Currently it reports only flipped bits of the worst page of a block. If within block X page P1 has 3 bit flips and P6 4, it will report 4. By default every 50th block is

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 16:32 schrieb Fabio Estevam: On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger rich...@nod.at wrote: + err = -ENOMEM; + iobuf = kmalloc(mtd-erasesize, GFP_KERNEL); + if (!iobuf) + goto out; The error handling here does not look right.

Re: [PATCH] mtd: Add simple read disturb test

2015-04-02 Thread Richard Weinberger
Am 02.04.2015 um 18:04 schrieb Brian Norris: On Thu, Apr 02, 2015 at 04:13:46PM +0200, Richard Weinberger wrote: This simple MTD tests allows the user to see when read disturb happens. By reading blocks over and over it reports flipped bits. Currently it reports only flipped bits of the worst