This patch is correct. LLDB expects 1sec for reply, GDB by default 2. Debuggers use this option to disable Nagle algorithm in order to quickly transfer messages between gdb-server and gdb-client. It's also fairy portable across systems.
On 04.01.2018 18:56, Andreas Gustafsson wrote: > slirp: disable Nagle in outgoing connections > > When setting up an outgoing user mode networking TCP connection, > disable the Nagle algorithm in the host-side connection. Either the > guest is already doing Nagle, in which case there is no point in doing > it twice, or it has chosen to disable it, in which case we should > respect that choice. > > This change speeds up GDB remote debugging over TCP over user mode > networking (with GDB runing on the guest) by multiple orders of > magnitude, and has been part of the local patches applied by pkgsrc > since 2012 with no reported ill effects. > > Signed-off-by: Andreas Gustafsson <g...@gson.org> Signed-off-by: Kamil Rytarowski <n...@gmx.com> > --- > slirp/tcp_subr.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c > index da0d53743f..8d0f94b75f 100644 > --- a/slirp/tcp_subr.c > +++ b/slirp/tcp_subr.c > @@ -416,6 +416,8 @@ int tcp_fconnect(struct socket *so, unsigned short af) > socket_set_fast_reuse(s); > opt = 1; > qemu_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &opt, sizeof(opt)); > + opt = 1; > + qemu_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)); > > addr = so->fhost.ss; > DEBUG_CALL(" connect()ing") >
Description: OpenPGP digital signature