[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 00/12] curl: fix curl read

From: Richard W.M. Jones
Subject: Re: [Qemu-devel] [PATCH v6 00/12] curl: fix curl read
Date: Wed, 29 May 2013 10:25:23 +0100
User-agent: Mutt/1.5.20 (2009-12-10)

On Wed, May 29, 2013 at 09:07:25AM +0800, Fam Zheng wrote:
> On Tue, 05/28 12:32, Richard W.M. Jones wrote:
> > 
> > This fixes the obvious bug.
> Thanks for figuring out this. Mainline had this 5s timeout so I kept it,
> but you don't experience this bug, right? Since master doesn't setup a
> timer to get curl notified about the timing, the option is just not
> effective.

Indeed, qemu master has:

    curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 5);

but I don't encounter the bug when using master, and I'm pretty
certain about that because I've tested it a lot.

It could be that qemu master manages to recover from / restart these
incomplete reads, and doesn't deliver EIO up to the guest.

> > I wonder if it should be even larger?  One use for curl is to install
> > guests using ISOs from websites without having to download the ISO,
> > and I imagine that even a 30 second timeout could be conservative for
> > that task.
> > 
> Long latency network is common in practice, as well as low bandwidth,
> the meaning of the timeout is to complete the request, in extreme cases
> if it is a 1Kbps link, downloading 256k takes minutes. Anyway, I think
> making it larger won't hurt.

I tried playing around with timeouts yesterday.

Inside the guest there is a SCSI timeout (30 seconds default, see
[1]).  This has to be made larger if we make the qemu timeout larger
than 30 seconds.

With upstream qemu I can increase this timeout to 180 seconds and so
read ISOs from slow public websites.  (Try changing the test script so
the 'disk' variable points to an ISO such as [2]).

With the v6 patch, adjusting the SCSI timeout in the guest doesn't
have any effect -- the SCSI disk "aborts" after ~40 seconds whatever I


[1] http://kb.vmware.com/kb/1009465

Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]