spi_master->rt member, what changes when you change the priority of spi workers?

Daniel. danielhilst at gmail.com
Mon Jan 25 08:17:03 EST 2016

Hi all, I was testing some driver that I have for nRF24L01+.
ATM the driver sends a frame a changes from TX to RX the fastest
possible. The switching from TX to RX is maded at hard IRQ, the
rf_hard_irq() sends one message, two spi_transfers to program the
nRF24L01+ to RX. The messages are sended asynchronous and I have two
trace_puts() calls to measure the times using FTRACE feature. The
kernel version is 3.10.53 running on arm (i.MX6)

I've noted that spi_master struct has an rt boolean member which
should increace the priority of spi tasks to higher possible. I did
that and measure the times, they were about 100us then I removed this
and measue again, they were about 75us. Summarazing, increasing the
spi workers priority had increased the time that takes to change from
TX to RX, remembering that this change is done by sending two spi
transfers to the nRF24L01+. I want to understand why I higher priority
is decreasing the performance instead of boosting it?

Best regards,

The code can be viewed here:

"Do or do not. There is no try"
  Yoda Master

More information about the Kernelnewbies mailing list