qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] main-loop.c: About Select handling
@ 2012-11-28  3:08 Furukawa, Eiji
  2012-11-29 14:17 ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: Furukawa, Eiji @ 2012-11-28  3:08 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

About a source of qemu-1.2.0/main-loop.c
The select handling of os_host_main_loop_wait function
I do not seem to do Exit by interrupts such as SIGUSR1
Will not it be necessary to make modifications?

Before
 LineNumber:308   ret = select(nfds + 1, &rfds, &wfds, &xfds, tvarg);

After(Example)
    do {
        ret = select(nfds + 1, &rfds, &wfds, &xfds, tvarg);
    } while(ret == -1 && (errno == EINTR || errno == EAGAIN))


--
E.Furukawa

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] main-loop.c: About Select handling
  2012-11-28  3:08 [Qemu-devel] main-loop.c: About Select handling Furukawa, Eiji
@ 2012-11-29 14:17 ` Stefan Hajnoczi
  2012-12-06  0:30   ` Furukawa, Eiji
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-11-29 14:17 UTC (permalink / raw)
  To: Furukawa, Eiji; +Cc: qemu-devel@nongnu.org

On Wed, Nov 28, 2012 at 03:08:24AM +0000, Furukawa, Eiji wrote:
> About a source of qemu-1.2.0/main-loop.c
> The select handling of os_host_main_loop_wait function
> I do not seem to do Exit by interrupts such as SIGUSR1
> Will not it be necessary to make modifications?
> 
> Before
>  LineNumber:308   ret = select(nfds + 1, &rfds, &wfds, &xfds, tvarg);
> 
> After(Example)
>     do {
>         ret = select(nfds + 1, &rfds, &wfds, &xfds, tvarg);
>     } while(ret == -1 && (errno == EINTR || errno == EAGAIN))

What is the specific bug or problem you're seeing?

QEMU uses several signals internally and sets up per-thread signal masks
appropriately.

Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] main-loop.c: About Select handling
  2012-11-29 14:17 ` Stefan Hajnoczi
@ 2012-12-06  0:30   ` Furukawa, Eiji
  2012-12-11 10:12     ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: Furukawa, Eiji @ 2012-12-06  0:30 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel@nongnu.org


The select() do not masked signal in os_host_main_loop_wait.

For example, qemu-timer.c gives SIGALRM regularly.
Even if a buffer of select is empty, 
I think that it is a problem that this select() does exit by this SIGALRM.

--
E.Furukawa

> -----Original Message-----
> From: Stefan Hajnoczi [mailto:stefanha@gmail.com]
> Sent: Thursday, November 29, 2012 11:18 PM
> To: Furukawa, Eiji/古川 英治
> Cc: qemu-devel@nongnu.org
> Subject: Re: [Qemu-devel] main-loop.c: About Select handling
> 
> On Wed, Nov 28, 2012 at 03:08:24AM +0000, Furukawa, Eiji wrote:
> > About a source of qemu-1.2.0/main-loop.c The select handling of
> > os_host_main_loop_wait function I do not seem to do Exit by interrupts
> > such as SIGUSR1 Will not it be necessary to make modifications?
> >
> > Before
> >  LineNumber:308   ret = select(nfds + 1, &rfds, &wfds, &xfds, tvarg);
> >
> > After(Example)
> >     do {
> >         ret = select(nfds + 1, &rfds, &wfds, &xfds, tvarg);
> >     } while(ret == -1 && (errno == EINTR || errno == EAGAIN))
> 
> What is the specific bug or problem you're seeing?
> 
> QEMU uses several signals internally and sets up per-thread signal masks
> appropriately.
> 
> Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] main-loop.c: About Select handling
  2012-12-06  0:30   ` Furukawa, Eiji
@ 2012-12-11 10:12     ` Stefan Hajnoczi
  2012-12-17  4:49       ` Furukawa, Eiji
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-12-11 10:12 UTC (permalink / raw)
  To: Furukawa, Eiji; +Cc: qemu-devel@nongnu.org

On Thu, Dec 06, 2012 at 12:30:19AM +0000, Furukawa, Eiji wrote:
> 
> The select() do not masked signal in os_host_main_loop_wait.
> 
> For example, qemu-timer.c gives SIGALRM regularly.
> Even if a buffer of select is empty, 

What does "a buffer of select is empty" mean?

> I think that it is a problem that this select() does exit by this SIGALRM.

The main loop will iterate again.  Why is it a problem if select()
returns?

Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] main-loop.c: About Select handling
  2012-12-11 10:12     ` Stefan Hajnoczi
@ 2012-12-17  4:49       ` Furukawa, Eiji
  0 siblings, 0 replies; 5+ messages in thread
From: Furukawa, Eiji @ 2012-12-17  4:49 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org


Sorry,I was misunderstanding it. 

If The main loop will iterate again, it is unquestionable.

--
E.Furukawa

> On Thu, Dec 06, 2012 at 12:30:19AM +0000, Furukawa, Eiji wrote:
> >
> > The select() do not masked signal in os_host_main_loop_wait.
> >
> > For example, qemu-timer.c gives SIGALRM regularly.
> > Even if a buffer of select is empty,
> 
> What does "a buffer of select is empty" mean?
> 
> > I think that it is a problem that this select() does exit by this SIGALRM.
> 
> The main loop will iterate again.  Why is it a problem if select() returns?
> 
> Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-17  4:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28  3:08 [Qemu-devel] main-loop.c: About Select handling Furukawa, Eiji
2012-11-29 14:17 ` Stefan Hajnoczi
2012-12-06  0:30   ` Furukawa, Eiji
2012-12-11 10:12     ` Stefan Hajnoczi
2012-12-17  4:49       ` Furukawa, Eiji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).