From: Anthony Liguori <anthony@codemonkey.ws>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Blue Swirl <blauwirbel@gmail.com>
Subject: [Qemu-devel] [PATCH][RFC] Fire SIGIO when IO requests are completed
Date: Mon, 06 Oct 2008 12:43:57 -0500 [thread overview]
Message-ID: <48EA4E5D.50708@codemonkey.ws> (raw)
[-- 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());
}
next reply other threads:[~2008-10-06 17:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 17:43 Anthony Liguori [this message]
2008-10-06 18:32 ` [Qemu-devel] Re: [PATCH][RFC] Fire SIGIO when IO requests are completed 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48EA4E5D.50708@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.