I've recently noticed that there is a large difference between the context switch times on the i.MX53 QSB and our own device based on the i.MX53. Our device is 4-5 times slower as measured with lat_ctx described in this post: http://www.pengutronix.de/development/kernel/arm-benchmarks-20100729_en.html
Because I see better performance on the QSB, I am wondering if I have something misconfigured somewhere on my board but I do not really know where to look. What kernel configuration options could affect context switch performance? Where should I look to track this issue down?
Thanks!
Robert Daniels
I've finally tracked down the cause of our slowdown. We used a mainline version of Das U-Boot which did not have the L2 cache enable patch. Once I included this patch our context switch times dropped by a factor of 3.
As a follow-up question, does anyone know if the L2 cache can be enabled in the linux kernel or must it be enabled in u-boot?
Thanks,
Robert Daniels
Hi Robert,
I enabled L2 cache for mx5 in U-boot in this commit:
commit 4867b634b7c0e5ede258b4998fa4b2710e7daacf
Author: Fabio Estevam <fabio.estevam@freescale.com>
Date: Mon Sep 30 13:16:52 2013 -0300
ARM: mx5: Enable L2 cache
Enable L2 cache for improving the system performance.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Regards,
Fabio Estevam
Yes, I was just wondering if it's OK to enable the L2 cache in the kernel instead of u-boot. Is there any reason why I can't do that?
Thanks,
Robert
Hi Robert,
I see no reason for not doing that in the kernel.
If you get it working, please send a patch to linux-arm-kernel list.
One advantage of doing it from the bootloader is that bootloader will run faster as well.
Regards,
Fabio Estevam
Any recommendations on where would be the best place?
I'm considering adding it to the decompressing loader, but I'm not sure if there's a better place.
Thanks,
Robert Daniels
Not sure what would be the suitable place.
Which kernel version do you use?
Can you ask for a recommendation at linux-arm-kernel list?
Regards,
Fabio Estevam
I heard that there is a bad thread wake up performance issue in recent kernels.
Please try to add idle=poll into boot options as a workaround.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------