Updated switch/glue patch?
Adrian Chadd
adrian at freebsd.org
Sun Dec 18 10:11:56 UTC 2011
On 18 December 2011 01:54, Adrian Chadd <adrian at freebsd.org> wrote:
> Just as a side note - reducing the udelay value from 10 to 1 in my git
> tree doesn't stop the huge CPU use. I'm going to next try removing the
> locking, as I note that each GPIO access involves a mutex lock and I
> bet the witness code is taking a freaking beating here.
.. yup. Not compiling in witness helps hugely. I wish I had PMC
working at this point - I bet lots of lock overhead would creep up.
Basically, a lock is acquired for each GPIO pin set, clear and
reconfigure. The gpiobus code itself doesn't do this - that's what
gpiobus_lock_bus and gpiobus_unlock_bus is for - but the ar71xx gpio
code however does. And so does the gpioiic code - it's locking and
unlocking the bus for each scl/sda line operation.
Erm, surely that's a bit ridiculous.. surely the locking doesn't need
to be that fine grained _and_ multi-levelled. There has to be a better
way to do this. :)
Adrian
More information about the freebsd-embedded
mailing list