MXC nand controller performance
Subsystems (3)
Sascha Hauer
maintainerHi,
Hi recently found out that on my i.MX27 board the mxc nand controller performance nearly doubles when I disable interrupts. Can anybody confirm this behaviour, possibly on other i.MXs?
I'm trying to figure out what to do. We could disable interrupts completely in which case the driver would become simpler. Maybe using polling mode has other impacts on other workloads, so maybe we want to add a flag to platform_data instead of disabling interrupts completely.
You can use the following patch to disable interrupts. It is not meant for inclusion in this form of course.
Sascha
Quoted 1 line
From
ae3909b90667a13f7bbd6a042b6b65ea7c74ee48Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Thu, 20 Aug 2009 14:52:32 +0200
Subject: [PATCH] mxc_nand: disable interrupts
--- drivers/mtd/nand/mxc_nand.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nand/mxc_nand.c +2 -0
@@ -175,6 +175,8 @@ static void wait_op_done(struct mxc_nand_host *host, int max_retries, {uint32_t tmp; + useirq =0 ; +if (useirq) {if ((readw (host->regs +NFC_CONFIG2 ) &NFC_INT ) ==0 ) {
Signature · 7 lines
1.6.3.3 -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hi Sascha,
2009/8/20 Sascha Hauer <[email protected]>:
Quoted 9 lines
Hi,
Hi recently found out that on my i.MX27 board the mxc nand controller performance nearly doubles when I disable interrupts. Can anybody confirm this behaviour, possibly on other i.MXs?
I'm trying to figure out what to do. We could disable interrupts completely in which case the driver would become simpler. Maybe using polling mode has other impacts on other workloads, so maybe we want to add a flag toplatform_datainstead of disabling interrupts completely.
A flag sounds like a good idea.
Quoted 2 lines
You can use the following patch to disable interrupts. It is not meant for inclusion in this form of course.
I can give it a try on i.MX31, how do you measure the performance?
/Magnus
Sascha Hauer
maintainerQuoted 13 lines · Magnus Lilja
Hi Sascha,
2009/8/20 Sascha Hauer <[email protected]>:
Quoted 9 lines
Hi,
Hi recently found out that on my i.MX27 board the mxc nand controller performance nearly doubles when I disable interrupts. Can anybody confirm this behaviour, possibly on other i.MXs?
I'm trying to figure out what to do. We could disable interrupts completely in which case the driver would become simpler. Maybe using polling mode has other impacts on other workloads, so maybe we want to add a flag toplatform_datainstead of disabling interrupts completely.
Quoted 6 lines
A flag sounds like a good idea.
Quoted 2 lines
You can use the following patch to disable interrupts. It is not meant for inclusion in this form of course.
I can give it a try on i.MX31, how do you measure the performance?
I did a 'time cat /dev/mtdblockx > /dev/null' and looked at the time needed to mount an ubifs. I haven't done any write tests though.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hi
2009/8/21 Sascha Hauer <[email protected]>:
Quoted 16 lines · Magnus Lilja
Quoted 15 lines
Hi Sascha,
2009/8/20 Sascha Hauer <[email protected]>:
Quoted 9 lines
Hi,
Hi recently found out that on my i.MX27 board the mxc nand controller performance nearly doubles when I disable interrupts. Can anybody confirm this behaviour, possibly on other i.MXs?
I'm trying to figure out what to do. We could disable interrupts completely in which case the driver would become simpler. Maybe using polling mode has other impacts on other workloads, so maybe we want to add a flag toplatform_datainstead of disabling interrupts completely.A flag sounds like a good idea.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
You can use the following patch to disable interrupts. It is not meant for inclusion in this form of course.
I can give it a try on i.MX31, how do you measure the performance?
I did a 'time cat
/dev/mtdblockx>/dev/null' and looked at the time needed to mount an ubifs. I haven't done any write tests though.
I did some tests on a i.MX31 Litekit board using a kernel from Linus' tree a couple of days ago ('time cat /dev/mtdblockx > /dev/null'):
with interrupts: 18s
without interrupts: 13s
No write tests or mounting filesystems were done.
/Magnus