I/O issues with writing to mtdblock devices on kirkwood

Andrew Lunn
2016-01-12T01:19:04Z

> Oh, right. This sounds like everything is working fine with SPI - that
> commit was supposed to improve throughput with single threaded workloads
> by avoiding pointless context switches and it seems it is in fact doing
> that. Most likely you are using a bitbanging SPI controller driver and
> that's causing lots of I/O wait states which is upsetting the scheduler
> but it's hard to be sure.

drivers/spi/spi-orion.c

Not bitbanging, but it is polled IO, not DMA.

> Possibly whatever SPI driver this system uses is doing something really
> rude (perhaps limited by the hardware), possibly it isn't using DMA when
> it should be, or possibly the scheduler just isn't doing a good job with
> the workload you're giving it.

When i played with this, i added a reschedule point at the end of the
drivers transfer_one_message() function, to see if that would help. It
did not, which is why i made a guess it has something to do with a
lock.

Andrew