Re: [PATCH 0/2] Better handling of slow remote transfers

Gary Benson
2015-08-12T13:44:28Z

Gary Benson wrote:
> Pedro Alves wrote:
> > On 08/12/2015 02:02 PM, Gary Benson wrote:
> > > I was looking in getpkt_or_notif_sane_1, but I think maybe I
> > > misread it. I'll get back to you on this...
> >
> > That's the very low level of RSP packets, which as you noted will
> > have a reasonable cap. It sounds to me there's a loop somewhere
> > in a higher layer that is missing a QUIT. E.g., we have quits in
> > dwarf2read.c which allow interrupting reading big binaries, even
> > if locally. So what is the higher level operation that gdb is
> > doing when you try to interrupt, but can't?
>
> remote_hostio_pread. I'm trying to make remote_hostio_pread
> interruptible. BFD is doing large remote_hostio_pread which
> are resulting in large vFile:pread: packet responses.

To elaborate:
remote_hostio_pread calls remote_hostio_send_command once
remote_hostio_send_command calls getpkt_sane once
getpkt_sane calls getpkt_or_notif_sane_1 once

I've already posted a patch that did QUIT once per vFile:pread:
but that wasn't good enough. For anything finer-grained the
QUIT needs to be in getpkt_or_notif_sane_1 but this doesn't seem
workable given how the protocol is.

The alternative is for remote_hostio_pread to make multiple
vFile:pread: packets, but that's going to introduce extra
traffic and latency.

Cheers,
Gary

--