[remote protocol] support for disabling packet acknowledgement

Sandra Loosemore sandra@codesourcery.com
Thu Jul 10 19:59:00 GMT 2008

Paul Koning wrote:
>>>>>> "Sandra" == Sandra Loosemore <sandra@codesourcery.com> writes:
>  Sandra> You'll note the documentation says turning off acks may be
>  Sandra> desirable to reduce communication overhead *or* "for other
>  Sandra> reasons".  In fact, it is the "other reasons" that motivated
>  Sandra> this patch.  We are working on designing the extensions to
>  Sandra> the remote protocol to support nonstop mode, and we realized
>  Sandra> that we simply cannot do it in combination with using +/-
>  Sandra> acks on the asynchronous responses.  If we need a reliable
>  Sandra> transport layer to support nonstop mode, we might as well
>  Sandra> turn the acks off completely instead of dealing with the
>  Sandra> extra complexity of trying to design the nonstop protocol
>  Sandra> around them.
> Ok, so does that mean the nonstop mode features won't work unless the
> remote protocol is layered on TCP?  Given that a lot of the time the
> remote link is simply a UART serial link, is there an issue here?  

Probably so, but the +/- acks are not the way to solve it.  :-(

Our internal discussion on that issue was getting more and more complicated, to 
the point where I could not even follow what the exact problem was.  My 
imperfect understanding is this:  In nonstop mode, stop replies are sent 
asynchronously, which breaks the back-and-forth, GDB-talks-stub-responds model. 
  The stub may send a stop reply when GDB is not expecting to read a regular 
packet response.  With some care, we could interleave the protocol acks of these 
responses with the acks of the regular synchronous responses....  except if a 
response or its ACK got lost entirely in transmission.  We got to the point of 
considering whether we needed to add some out-of-band protocol to support the 
asynchronous responses from the stub, mirroring the asynchronous ^C that GDB can 
send to the stub, for instance, before deciding we didn't want to go there right 

There's current practice (the existing Apple implementation) to support 
disabling +/- acks and it seems useful as a performance hack for TCP connections 
independently of the nonstop extensions, so why not formalize it?


More information about the Gdb mailing list