Katalix
Back to work

I2C performance optimisation for an STB product

I2C Performance

Background

As a result of establishing a good reputation with our client, we were asked to investigate why some core features of the product software were operating more slowly than desired. This involved identifying performance bottlenecks and working with the client's development team to resolve them.

Analyse, report

The project began with a detailed analysis of the system during typical use case tests. We instrumented the system software and Linux kernel to capture a timeline of events. The Linux Trace Toolkit (LTT) was ported to the platform and additional instrumentation added where required. We identified the main cause to be the I2C drivers which were those supplied by the MIPS SoC vendor. These were found to be of very poor quality and we recommended that they be replaced with the standard Linux I2C subsystem and a userspace access library to which the existing userspace applications would interface.

Implement, test

A new I2C chip driver was implemented for the MIPS SoC and was tested using standard Linux I2C tools. In parallel, we worked with our client's engineering team to define and implement a C API in order that the migration path to the new I2C driver would be as painless as possible, while also allowing us to do meaningful performance tests of the drivers in isolation.

Results

The new I2C driver resulted in a 100% performance improvement in I2C transaction times and the system software performance was noticably improved. Switching the system over to the new driver happened by flicking a compile option switch.