qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vl.c: make default main_loop_wait() timeout ind


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH] vl.c: make default main_loop_wait() timeout independed of slirp
Date: Tue, 5 Jun 2018 10:27:03 +0200

On Mon, 4 Jun 2018 22:04:13 -0300
Eduardo Habkost <address@hidden> wrote:

> On Mon, Jun 04, 2018 at 10:14:38PM +0200, Igor Mammedov wrote:
> > Since commit (047f7038f58 cli: add --preconfig option) QEMU is
> > stuck with indefinite timeout in os_host_main_loop_wait()
> > at RUN_STATE_PRECONFIG even if --preconfig option wasn't used
> > when it's started with -nodefaults CLI option like this:
> > 
> >   ./s390x-softmmu/qemu-system-s390x -nodefaults
> > 
> > It's caused by the fact that slirp_pollfds_fill() bails out early
> > and slirp_update_timeout() won't be called to update timeout
> > to a reasonable value (1 sec) so timeout would be left with
> > infinite value (0xFFFFFFFF).
> > 
> > Default infinite timeout though doen't make sense and reducing
> > it to 1 second as in slirp_update_timeout() won't affect host.  
> 
> I don't get this part.  Why default infinite timeout doesn't make
> sense?  Why would a 1 second timeout make sense?
I've meant that there is no reason for infinite timeuot,
and 1sec is good as any other finite one.
Hence we can unify timeout with/without -nodefaults, by moving 1sec
constant from slirp to main_loop_wait() and simplify code a bit.
 
> 
> > Fix issue by simplifying default timeout to the same 1sec as it
> > is in slirp_update_timeout() and cleanup the later. It makes
> > default timeout the same regardless of slirp_pollfds_fill()
> > exited early or not (i.e. -nodefaults won't have any effect on
> > main_loop_wait() anymore, which would provide more consistent
> > behavior between both variants of startup).
> > 
> > Reported-by: Lukáš Doktor <address@hidden>
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> > PS:
> > it doesn't fix issue reported by Max where
> >   "echo foo | $QEMU"
> > is also broken due to commit 047f7038f58, but there is antoher fix
> > on the list to fix that (either Michal's or Daniel's).  
> [...]
> 




reply via email to

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