[etherlab-users] Recursion limits number of slaves

babbittner at aol.com babbittner at aol.com
Fri Feb 15 21:28:39 CET 2013


Due to the use of recursion, via ec_master_calc_topology_rec(), to scan the
bus, there is a limit to the number of slaves on the bus.  Actually, the limit
is on the depth of the tree.  This is due to the limited size of the kernel
stack (8K on ARM Cortex-A8).  If the limit is exceeded, the kernel will likely
crash due to stack overflow.  The call overhead associated with
ec_master_calc_topology_rec() is 48 bytes (on ARM Cortex-A8).  This allows for
no more than 170 recursive calls deep before stack overflow.

I did a quick hack to eliminate the recursion and support only a linear
topology.  I was able to see 1000 slaves on the bus.

This was discovered using Raz Ben Yehuda's excellent virtual slave tool and
hacks I applied thereto.

Thanks,
Bruno

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130215/d0c62530/attachment-0002.htm>


More information about the Etherlab-users mailing list