qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed
@ 2008-10-06 17:43 Anthony Liguori
  2008-10-06 18:32 ` [Qemu-devel] " Blue Swirl
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anthony Liguori @ 2008-10-06 17:43 UTC (permalink / raw)
  To: qemu-devel@nongnu.org, Blue Swirl

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

Hi Blue Swirl,

Can you test the attached patch with sparc-softmmu?  Better yet, do you 
have an image, or a recipe for an image that I could use to try and 
reproduce the problem?  The sparc test code on the QEMU website just 
uses a ram disk so the regression isn't evident with it.

Regards,

Anthony Liguori

[-- Attachment #2: alarm.patch --]
[-- Type: text/x-patch, Size: 1578 bytes --]

diff --git a/block-raw-posix.c b/block-raw-posix.c
index c0404fa..9b136ee 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -591,6 +591,12 @@ static int posix_aio_init(void)
 
     fcntl(s->fd, F_SETFL, O_NONBLOCK);
 
+    {
+	extern void enable_sigio_timer(int fd);
+
+	enable_sigio_timer(s->fd);
+    }
+
     qemu_aio_set_fd_handler(s->fd, posix_aio_read, NULL, posix_aio_flush, s);
 
 #if defined(__linux__)
diff --git a/qemu-tool.c b/qemu-tool.c
index 63e2056..c37fdea 100644
--- a/qemu-tool.c
+++ b/qemu-tool.c
@@ -26,6 +26,10 @@ struct QEMUBH
     void *opaque;
 };
 
+void enable_sigio_timer(int fd)
+{
+}
+
 void term_printf(const char *fmt, ...)
 {
 }
diff --git a/vl.c b/vl.c
index c94fdc0..8f66a90 100644
--- a/vl.c
+++ b/vl.c
@@ -1307,7 +1307,7 @@ static void host_alarm_handler(int host_signum)
         last_clock = ti;
     }
 #endif
-    if (alarm_has_dynticks(alarm_timer) ||
+    if (1 || alarm_has_dynticks(alarm_timer) ||
         (!use_icount &&
             qemu_timer_expired(active_timers[QEMU_TIMER_VIRTUAL],
                                qemu_get_clock(vm_clock))) ||
@@ -1383,7 +1383,7 @@ static uint64_t qemu_next_deadline_dyntick(void)
 
 #define RTC_FREQ 1024
 
-static void enable_sigio_timer(int fd)
+void enable_sigio_timer(int fd)
 {
     struct sigaction act;
 
@@ -1393,7 +1393,7 @@ static void enable_sigio_timer(int fd)
     act.sa_handler = host_alarm_handler;
 
     sigaction(SIGIO, &act, NULL);
-    fcntl(fd, F_SETFL, O_ASYNC);
+    fcntl(fd, F_SETFL, O_ASYNC | fcntl(fd, F_GETFL));
     fcntl(fd, F_SETOWN, getpid());
 }
 

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

* [Qemu-devel] Re: [PATCH][RFC] Fire SIGIO when IO requests are completed
  2008-10-06 17:43 [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed Anthony Liguori
@ 2008-10-06 18:32 ` Blue Swirl
  2008-10-06 21:12   ` Andreas Färber
  2008-10-06 18:42 ` Blue Swirl
  2008-10-07  8:07 ` [Qemu-devel] " Aurelien Jarno
  2 siblings, 1 reply; 7+ messages in thread
From: Blue Swirl @ 2008-10-06 18:32 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel@nongnu.org

On 10/6/08, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Hi Blue Swirl,
>
>  Can you test the attached patch with sparc-softmmu?  Better yet, do you
> have an image, or a recipe for an image that I could use to try and
> reproduce the problem?  The sparc test code on the QEMU website just uses a
> ram disk so the regression isn't evident with it.

For quick testing, Splack 8 installer boots in a few seconds:
ftp://ftp.splack.org/pub/splack/splack-8.0-iso/splack-24oct2k3.iso

If you want to do a full installation, I'd suggest installing using
Debian 3.1 and then upgrade to 4.0.

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

* [Qemu-devel] Re: [PATCH][RFC] Fire SIGIO when IO requests are completed
  2008-10-06 17:43 [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed Anthony Liguori
  2008-10-06 18:32 ` [Qemu-devel] " Blue Swirl
@ 2008-10-06 18:42 ` Blue Swirl
  2008-10-06 20:04   ` Anthony Liguori
  2008-10-07  8:07 ` [Qemu-devel] " Aurelien Jarno
  2 siblings, 1 reply; 7+ messages in thread
From: Blue Swirl @ 2008-10-06 18:42 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel@nongnu.org

On 10/6/08, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Hi Blue Swirl,
>
>  Can you test the attached patch with sparc-softmmu?  Better yet, do you
> have an image, or a recipe for an image that I could use to try and
> reproduce the problem?  The sparc test code on the QEMU website just uses a
> ram disk so the regression isn't evident with it.

Your patch fixes the slowness, great!

Please put the prototype of enable_sigio_timer to a .h file somewhere,
I get a warning with -Wmissing-prototypes.

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

* [Qemu-devel] Re: [PATCH][RFC] Fire SIGIO when IO requests are completed
  2008-10-06 18:42 ` Blue Swirl
@ 2008-10-06 20:04   ` Anthony Liguori
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2008-10-06 20:04 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel@nongnu.org

Blue Swirl wrote:
> On 10/6/08, Anthony Liguori <anthony@codemonkey.ws> wrote:
>   
>> Hi Blue Swirl,
>>
>>  Can you test the attached patch with sparc-softmmu?  Better yet, do you
>> have an image, or a recipe for an image that I could use to try and
>> reproduce the problem?  The sparc test code on the QEMU website just uses a
>> ram disk so the regression isn't evident with it.
>>     
>
> Your patch fixes the slowness, great!
>   

Okay, I'll code up a proper fix then.  That patch was just to confirm 
the problem.

Thanks,

Anthony Liguori

> Please put the prototype of enable_sigio_timer to a .h file somewhere,
> I get a warning with -Wmissing-prototypes.
>   

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

* Re: [Qemu-devel] Re: [PATCH][RFC] Fire SIGIO when IO requests are completed
  2008-10-06 18:32 ` [Qemu-devel] " Blue Swirl
@ 2008-10-06 21:12   ` Andreas Färber
  2008-10-07 17:54     ` Blue Swirl
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Färber @ 2008-10-06 21:12 UTC (permalink / raw)
  To: qemu-devel


Am 06.10.2008 um 20:32 schrieb Blue Swirl:

> If you want to do a full installation, I'd suggest installing using
> Debian 3.1 and then upgrade to 4.0.

Installing 4.0r0 used to work fine, is there a regression?

Andreas

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

* Re: [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed
  2008-10-06 17:43 [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed Anthony Liguori
  2008-10-06 18:32 ` [Qemu-devel] " Blue Swirl
  2008-10-06 18:42 ` Blue Swirl
@ 2008-10-07  8:07 ` Aurelien Jarno
  2 siblings, 0 replies; 7+ messages in thread
From: Aurelien Jarno @ 2008-10-07  8:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

On Mon, Oct 06, 2008 at 12:43:57PM -0500, Anthony Liguori wrote:
> Hi Blue Swirl,
> 
> Can you test the attached patch with sparc-softmmu?  Better yet, do you 
> have an image, or a recipe for an image that I could use to try and 
> reproduce the problem?  The sparc test code on the QEMU website just 
> uses a ram disk so the regression isn't evident with it.

Your patch works perfectly with -clock unix, but the problem is still
present here with -clock dynticks.

If you want to test the problem, you can download an image file from
http://people.debian.org/~aurel32/qemu

BTW I wonder if we should also fire SIGIO on the network device.

Aurelien

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

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

* Re: [Qemu-devel] Re: [PATCH][RFC] Fire SIGIO when IO requests are completed
  2008-10-06 21:12   ` Andreas Färber
@ 2008-10-07 17:54     ` Blue Swirl
  0 siblings, 0 replies; 7+ messages in thread
From: Blue Swirl @ 2008-10-07 17:54 UTC (permalink / raw)
  To: qemu-devel

On 10/7/08, Andreas Färber <andreas.faerber@web.de> wrote:
>
>  Am 06.10.2008 um 20:32 schrieb Blue Swirl:
>
>
> > If you want to do a full installation, I'd suggest installing using
> > Debian 3.1 and then upgrade to 4.0.
> >
>
>  Installing 4.0r0 used to work fine, is there a regression?

I get a crash at 7% of install (or package verification or whatever),
it hasn't ever worked.

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

end of thread, other threads:[~2008-10-07 17:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 17:43 [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed Anthony Liguori
2008-10-06 18:32 ` [Qemu-devel] " Blue Swirl
2008-10-06 21:12   ` Andreas Färber
2008-10-07 17:54     ` Blue Swirl
2008-10-06 18:42 ` Blue Swirl
2008-10-06 20:04   ` Anthony Liguori
2008-10-07  8:07 ` [Qemu-devel] " Aurelien Jarno

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).