* [PATCH] fix "Error flushing ioemu cache" message in xenpaging
@ 2010-12-15 4:04 Han-Lin Li
2011-01-06 17:43 ` Ian Jackson
0 siblings, 1 reply; 4+ messages in thread
From: Han-Lin Li @ 2010-12-15 4:04 UTC (permalink / raw)
To: xen-devel
While using xenpaging, "Error flushing ioemu cache" message will be shown
on screen even if the "flush-cache" command is sent to xenstore correctly.
That is because xenpaging assume xc_mem_paging_flush_ioemu_cache()
return non-zero value when operation fail. But
xc_mem_paging_flush_ioemu_cache() return the return value from xs_write()
which is zero when operation fail. So, we should invert the return value from
xs_write() before use it as return value to prevent printing those
incorrect error messages.
---
Another problem is that the "flush-cache" command isn't supported by
xenstore until you apply the patch below
http://thread.gmane.org/gmane.comp.emulators.xen.devel/91768/focus=91770
This patch isn't merged to unstable version yet.
Users need to merge this patch manually to make this function work correctly.
Anyone knows why this patch isn't merged to the unstable version?
---
Signed-off-by: Han-Lin Li <Han-Lin.Li@itri.org.tw>
diff -r 89116f28083f tools/xenpaging/xc.c
--- a/tools/xenpaging/xc.c Wed Dec 08 10:46:31 2010 +0000
+++ b/tools/xenpaging/xc.c Wed Dec 15 19:23:53 2010 +0800
@@ -62,7 +62,7 @@
xs_daemon_close(xsh);
- return rc;
+ return !rc;
}
int xc_wait_for_event_or_timeout(xc_interface *xch, int xce_handle,
unsigned long ms)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix "Error flushing ioemu cache" message in xenpaging
2010-12-15 4:04 [PATCH] fix "Error flushing ioemu cache" message in xenpaging Han-Lin Li
@ 2011-01-06 17:43 ` Ian Jackson
2011-01-10 10:29 ` Olaf Hering
0 siblings, 1 reply; 4+ messages in thread
From: Ian Jackson @ 2011-01-06 17:43 UTC (permalink / raw)
To: Han-Lin Li; +Cc: Olaf Hering, xen-devel
Han-Lin Li writes ("[Xen-devel] [PATCH] fix "Error flushing ioemu cache" message in xenpaging"):
> While using xenpaging, "Error flushing ioemu cache" message will be shown
> on screen even if the "flush-cache" command is sent to xenstore correctly.
> That is because xenpaging assume xc_mem_paging_flush_ioemu_cache()
> return non-zero value when operation fail. But
> xc_mem_paging_flush_ioemu_cache() return the return value from xs_write()
> which is zero when operation fail. So, we should invert the return value from
> xs_write() before use it as return value to prevent printing those
> incorrect error messages.
I'd like to give Olaf Hering a chance to respond, though, as it seems
he hasn't already.
Perhaps xc_mem_paging_flush_ioemu_cache ought to return -1 on error
and 0 on success, like most other xc functions ?
Thanks,
Ian.
>
> ---
> Signed-off-by: Han-Lin Li <Han-Lin.Li@itri.org.tw>
>
> diff -r 89116f28083f tools/xenpaging/xc.c
> --- a/tools/xenpaging/xc.c Wed Dec 08 10:46:31 2010 +0000
> +++ b/tools/xenpaging/xc.c Wed Dec 15 19:23:53 2010 +0800
> @@ -62,7 +62,7 @@
> xs_daemon_close(xsh);
> - return rc;
> + return !rc;
> }
> int xc_wait_for_event_or_timeout(xc_interface *xch, int xce_handle,
> unsigned long ms)
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix "Error flushing ioemu cache" message in xenpaging
2011-01-06 17:43 ` Ian Jackson
@ 2011-01-10 10:29 ` Olaf Hering
2011-01-11 16:48 ` Ian Jackson
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2011-01-10 10:29 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel, Han-Lin Li
On Thu, Jan 06, Ian Jackson wrote:
> Han-Lin Li writes ("[Xen-devel] [PATCH] fix "Error flushing ioemu cache" message in xenpaging"):
> > While using xenpaging, "Error flushing ioemu cache" message will be shown
> > on screen even if the "flush-cache" command is sent to xenstore correctly.
> > That is because xenpaging assume xc_mem_paging_flush_ioemu_cache()
> > return non-zero value when operation fail. But
> > xc_mem_paging_flush_ioemu_cache() return the return value from xs_write()
> > which is zero when operation fail. So, we should invert the return value from
> > xs_write() before use it as return value to prevent printing those
> > incorrect error messages.
>
> I'd like to give Olaf Hering a chance to respond, though, as it seems
> he hasn't already.
I see these harmless error messages as well, but havent looked at the
root cause yet.
> Perhaps xc_mem_paging_flush_ioemu_cache ought to return -1 on error
> and 0 on success, like most other xc functions ?
Like 'return rc ? 0 : -1;'?
Either way is fine with me.
Olaf
> > ---
> > Signed-off-by: Han-Lin Li <Han-Lin.Li@itri.org.tw>
> >
> > diff -r 89116f28083f tools/xenpaging/xc.c
> > --- a/tools/xenpaging/xc.c Wed Dec 08 10:46:31 2010 +0000
> > +++ b/tools/xenpaging/xc.c Wed Dec 15 19:23:53 2010 +0800
> > @@ -62,7 +62,7 @@
> > xs_daemon_close(xsh);
> > - return rc;
> > + return !rc;
> > }
> > int xc_wait_for_event_or_timeout(xc_interface *xch, int xce_handle,
> > unsigned long ms)
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix "Error flushing ioemu cache" message in xenpaging
2011-01-10 10:29 ` Olaf Hering
@ 2011-01-11 16:48 ` Ian Jackson
0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2011-01-11 16:48 UTC (permalink / raw)
To: Olaf Hering; +Cc: xen-devel, Han-Lin Li
Olaf Hering writes ("Re: [Xen-devel] [PATCH] fix "Error flushing ioemu cache" message in xenpaging"):
> Like 'return rc ? 0 : -1;'?
> Either way is fine with me.
Right, that's what I meant. Thanks. I have applied rc ? 0 : -1.
Ian.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-11 16:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-15 4:04 [PATCH] fix "Error flushing ioemu cache" message in xenpaging Han-Lin Li
2011-01-06 17:43 ` Ian Jackson
2011-01-10 10:29 ` Olaf Hering
2011-01-11 16:48 ` Ian Jackson
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).