Message ID | 3cc7a0df0904260309g4486ad02u9bc8ebe886fc9d8@mail.gmail.com |
---|---|
State | New, archived |
Headers | show |
Hi, > I think that the interrupt mode will help when there is high load on > the CPU. Will run tests in interrupt and polling mode in two > scenarios. 1. Copy of a large file to ONENAND with no CPU load. 2. > Copy of a Large file to ONENAND with an infinite loop running in the > background - this generates CPU load. Little bit busy today but will > run it and mail the results by tomorrow. In my opinion Scenario 2 > should give better results in interrupt mode. Interrupt mode is giving better results than the normal polling mode. In terms of time taken to copy both the modes are taking the same time for both scenarios. But in the case of interrupt mode the CPU usage is coming out to be less as indicated by top. Average CPU usage in Scenario 2 is 40% for interrupt mode whereas it is 57% for polling mode. diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 0e168d8..9b2f9aa 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -2728,6 +2728,13 @@ void onenand_release(struct mtd_info *mtd) /* Deregister partitions */ del_mtd_partitions (mtd); #endif + /* Reset the IOBE bit in SYS_CFG Register */ + if ( this->wait == onenand_interrupt_wait ) { + int syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); + syscfg &= ~ONENAND_SYS_CFG1_IOBE; + this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); + } /* Deregister the device */ del_mtd_device (mtd); Regards Gaurav Singh
On Tue, Apr 28, 2009 at 12:54 PM, Gaurav Singh <gausinghnsit@gmail.com> wrote: > Hi, > >> I think that the interrupt mode will help when there is high load on >> the CPU. Will run tests in interrupt and polling mode in two >> scenarios. 1. Copy of a large file to ONENAND with no CPU load. 2. >> Copy of a Large file to ONENAND with an infinite loop running in the >> background - this generates CPU load. Little bit busy today but will >> run it and mail the results by tomorrow. In my opinion Scenario 2 >> should give better results in interrupt mode. > > Interrupt mode is giving better results than the normal polling mode. > In terms of time taken to copy both the modes are taking the same time > for both scenarios. But in the case of interrupt mode the CPU usage is > coming out to be less as indicated by top. Average CPU usage in > Scenario 2 is 40% for interrupt mode whereas it is 57% for polling > mode. > Thank you for info. Right, in view of CPU interrupt mode is better, but not much performance gain. overall read/write performance. Thank you, Kyungmin Park
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 0e168d8..9b2f9aa 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -2728,6 +2728,13 @@ void onenand_release(struct mtd_info *mtd) /* Deregister partitions */ del_mtd_partitions (mtd); #endif + /* Reset the IOBE bit in SYS_CFG Register */ + if ( this->wait == onenand_interrupt_wait ) { + int syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); + syscfg &= ~ONENAND_SYS_CFG1_IOBE; + this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); + } /* Deregister the device */ del_mtd_device (mtd);