Why would i.MX53 context switch be slow?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why would i.MX53 context switch be slow?

1,822 Views
RobertDaniels
Contributor II

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

Labels (2)
0 Kudos
7 Replies

1,660 Views
RobertDaniels
Contributor II

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

0 Kudos

1,660 Views
fabio_estevam
NXP Employee
NXP Employee

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

0 Kudos

1,660 Views
RobertDaniels
Contributor II

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

0 Kudos

1,660 Views
fabio_estevam
NXP Employee
NXP Employee

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

0 Kudos

1,656 Views
RobertDaniels
Contributor II

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

0 Kudos

1,657 Views
fabio_estevam
NXP Employee
NXP Employee

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

0 Kudos

1,657 Views
b36401
NXP Employee
NXP Employee

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!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos