[Tinyos-devel] thoughts on buffer management....

Philip Levis pal at cs.stanford.edu
Sun Oct 6 18:37:08 PDT 2013


I don't think the cost of a single buffer is significant enough to warrant a different software architecture. The upper layer can always tell it to discard packets by passing it back. The 'extra work' here is pretty minimal, unless you're thinking there are power implications. Not to mention that a given driver might not be able to make this judgement, instead having to get it from network layers. 

Can you be more precise what you mean by 'better tuning'?

Phil

-------
Philip Levis
Associate Professor
Computer Science and Electrical Engineering
Stanford University
http://csl.stanford.edu/~pal

On Oct 6, 2013, at 6:19 PM, Eric Decker <cire831 at gmail.com> wrote:

> 
> I've been rewriting the CC2520 driver and have been looking at how we receive packets and the interactions with upper layers.   In particular buffer management.
> 
> By default, a low level driver has a buffer (usually defined in the driver itself) that is "parked" and available for use by the low level driver (LLD).   When the packet is filled in RadioReceive.receive is signaled.  On return the LLD is handed the next buffer to use for the next receive.
> 
> Now if we are in buffer starvation, the upper layer is forced to hand back the buffer that it has just been handed.  There are no other provisions for upper layer and/or buffer management code to inform a LLD that the system is in buffer starvation and it should just discard incoming packets.
> 
> Is first any LLD in the systems will each be holding onto buffers (one per LLD) and 2nd the LLD will be doing work copying packets into its only buffer and handing it off to the upper layer where it is thrown away.   Not doing the extra work would be better.
> 
> Clearly, this is how the current system works.   And it is clear that it does work and is stable enough.
> 
> However, buffer starvation and mechanisms for flow control push back as well as buffer management mechanisms would allow for better tuning in system behaviour.   And they don't have to be complex.
> 
> Do we want LLD to continue to behave this way or is it desireable to add slightly more capability to better deal  with buffer starvation issues?
> 
> 
> thoughts?
> 
> eric
> 
> 
> 
> -- 
> Eric B. Decker
> Senior (over 50 :-) Researcher
> 




More information about the Tinyos-devel mailing list