2017-07-26 02:16:51

by Franklin S Cooper Jr

[permalink] [raw]
Subject: [PATCH 0/3] ARM: dts: am335x-evm: am437xx: dra7xx: Enable NAND DMA prefetch by default

Enable NAND DMA prefetch by default for AM335x, AM437x and DRA7x evms that
include NAND.

The below commit went into additional details regarding performance numbers
seen between the two modes.

commit aa7abd312c11 ("mtd: nand: omap2: Support parsing dma channel information from DT")

Franklin S Cooper Jr (3):
ARM: dts: am335x-evm: Enable NAND dma prefetch by default
ARM: dts: am437xx: Enable NAND dma prefetch by default
ARM: dts: dra7xx: Enable NAND dma prefetch by default

arch/arm/boot/dts/am335x-evm.dts | 1 +
arch/arm/boot/dts/am437x-gp-evm.dts | 1 +
arch/arm/boot/dts/am43x-epos-evm.dts | 1 +
arch/arm/boot/dts/dra7-evm.dts | 1 +
arch/arm/boot/dts/dra72-evm-common.dtsi | 1 +
5 files changed, 5 insertions(+)

--
2.10.0


2017-07-26 02:16:49

by Franklin S Cooper Jr

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: dra7xx: Enable NAND dma prefetch by default

Currently the default method of prefetch polled shows the highest
possible read and write speed when minimal non NAND background
activity is being done. But it is also very CPU intensive to reach
these high speeds (CPU load of 99% via mtd performance tests). While
DMA prefetch only uses 50% of the CPU to achieve around 23% less in
top read and write performance.

However, as the non NAND CPU load increases the read and write
performance takes a large hit when using polled prefetch. Therefore,
prefetch dma mode ends up outperforming prefetch polled in general
"system level" test. So switch to using dma prefetch by default since
it is likely what most users would prefer.

Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
arch/arm/boot/dts/dra7-evm.dts | 1 +
arch/arm/boot/dts/dra72-evm-common.dtsi | 1 +
2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index f47fc4d..7d55af9 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -556,6 +556,7 @@
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 pin */
+ ti,nand-xfer-type = "prefetch-dma";
ti,nand-ecc-opt = "bch8";
ti,elm-id = <&elm>;
nand-bus-width = <16>;
diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi
index 8578054..1830483 100644
--- a/arch/arm/boot/dts/dra72-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra72-evm-common.dtsi
@@ -311,6 +311,7 @@
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 pin */
+ ti,nand-xfer-type = "prefetch-dma";
ti,nand-ecc-opt = "bch8";
ti,elm-id = <&elm>;
nand-bus-width = <16>;
--
2.10.0

2017-07-26 02:17:06

by Franklin S Cooper Jr

[permalink] [raw]
Subject: [PATCH 2/3] ARM: dts: am437xx: Enable NAND dma prefetch by default

Currently the default method of prefetch polled shows the highest
possible read and write speed when minimal non NAND background
activity is being done. But it is also very CPU intensive to reach
these high speeds (CPU load of 99% via mtd performance tests). While
DMA prefetch only uses 50% of the CPU to achieve around 23% less in
top read and write performance.

However, as the non NAND CPU load increases the read and write
performance takes a large hit when using polled prefetch. Therefore,
prefetch dma mode ends up outperforming prefetch polled in general
"system level" test. So switch to using dma prefetch by default since
it is likely what most users would prefer.

Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
arch/arm/boot/dts/am437x-gp-evm.dts | 1 +
arch/arm/boot/dts/am43x-epos-evm.dts | 1 +
2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 29a538e..a0a4ed0 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -842,6 +842,7 @@
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
+ ti,nand-xfer-type = "prefetch-dma";
ti,nand-ecc-opt = "bch16";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 54f40f3..9d276af 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -564,6 +564,7 @@
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
+ ti,nand-xfer-type = "prefetch-dma";
ti,nand-ecc-opt = "bch16";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
--
2.10.0

2017-07-26 02:17:27

by Franklin S Cooper Jr

[permalink] [raw]
Subject: [PATCH 1/3] ARM: dts: am335x-evm: Enable NAND dma prefetch by default

Currently the default method of prefetch polled shows the highest
possible read and write speed when minimal non NAND background
activity is being done. But it is also very CPU intensive to reach
these high speeds (CPU load of 99% via mtd performance tests). While
DMA prefetch only uses 50% of the CPU to achieve around 23% less in
top read and write performance.

However, as the non NAND CPU load increases the read and write
performance takes a large hit when using polled prefetch. Therefore,
prefetch dma mode ends up outperforming prefetch polled in general
"system level" test. So switch to using dma prefetch by default since
it is likely what most users would prefer.

Signed-off-by: Franklin S Cooper Jr <[email protected]>
---
arch/arm/boot/dts/am335x-evm.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 1c37a7c..ddd8975 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -531,6 +531,7 @@
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
+ ti,nand-xfer-type = "prefetch-dma";
ti,nand-ecc-opt = "bch8";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
--
2.10.0

2017-08-08 10:03:54

by Roger Quadros

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: dts: am335x-evm: am437xx: dra7xx: Enable NAND DMA prefetch by default

On 26/07/17 05:15, Franklin S Cooper Jr wrote:
> Enable NAND DMA prefetch by default for AM335x, AM437x and DRA7x evms that
> include NAND.
>
> The below commit went into additional details regarding performance numbers
> seen between the two modes.
>
> commit aa7abd312c11 ("mtd: nand: omap2: Support parsing dma channel information from DT")
>
> Franklin S Cooper Jr (3):
> ARM: dts: am335x-evm: Enable NAND dma prefetch by default
> ARM: dts: am437xx: Enable NAND dma prefetch by default
> ARM: dts: dra7xx: Enable NAND dma prefetch by default

For all patches,

Acked-by: Roger Quadros <[email protected]>

>
> arch/arm/boot/dts/am335x-evm.dts | 1 +
> arch/arm/boot/dts/am437x-gp-evm.dts | 1 +
> arch/arm/boot/dts/am43x-epos-evm.dts | 1 +
> arch/arm/boot/dts/dra7-evm.dts | 1 +
> arch/arm/boot/dts/dra72-evm-common.dtsi | 1 +
> 5 files changed, 5 insertions(+)
>

--
cheers,
-roger

2017-08-10 16:57:20

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 0/3] ARM: dts: am335x-evm: am437xx: dra7xx: Enable NAND DMA prefetch by default

* Roger Quadros <[email protected]> [170808 03:04]:
> On 26/07/17 05:15, Franklin S Cooper Jr wrote:
> > Enable NAND DMA prefetch by default for AM335x, AM437x and DRA7x evms that
> > include NAND.
> >
> > The below commit went into additional details regarding performance numbers
> > seen between the two modes.
> >
> > commit aa7abd312c11 ("mtd: nand: omap2: Support parsing dma channel information from DT")
> >
> > Franklin S Cooper Jr (3):
> > ARM: dts: am335x-evm: Enable NAND dma prefetch by default
> > ARM: dts: am437xx: Enable NAND dma prefetch by default
> > ARM: dts: dra7xx: Enable NAND dma prefetch by default
>
> For all patches,
>
> Acked-by: Roger Quadros <[email protected]>

Applying all three into omap-for-v4.14/dt thanks.

Tony