* [Qemu-devel] QEMU/CPC project: an experience report
@ 2013-10-10 22:14 Gabriel Kerneis
2013-10-11 9:35 ` Stefan Hajnoczi
2013-11-12 21:25 ` [Qemu-devel] " Gabriel Kerneis
0 siblings, 2 replies; 7+ messages in thread
From: Gabriel Kerneis @ 2013-10-10 22:14 UTC (permalink / raw)
To: qemu-devel, google-summer-of-code-mentors-list
Cc: Stefan Hajnoczi, Charlie Shepherd
Dear all,
We were so excited about our QEMU/CPC GSoC project that we have decided
to write a 12-page article to share our experience:
QEMU/CPC: static analysis and CPS conversion
for safe, portable, and efficient coroutines
http://gabriel.kerneis.info/research/files/qemu-cpc.pdf
If you want to learn more about QEMU internals, how we fixed hundreds of
lines of code with a small checking tool, or discover a nice compilation
technique for coroutines, you will probably be interested in this
article.
We also hope that other mentors will find it useful as a resource for
prospective students looking for an example of past GSoC projects.
Thanks to Google, and everybody involved, for making this great project
possible.
--
Gabriel Kerneis
http://gabriel.kerneis.info/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] QEMU/CPC project: an experience report
2013-10-10 22:14 [Qemu-devel] QEMU/CPC project: an experience report Gabriel Kerneis
@ 2013-10-11 9:35 ` Stefan Hajnoczi
2013-10-11 11:34 ` [Qemu-devel] [GSoC Mentors] " Pierre Tardy
2013-11-12 21:25 ` [Qemu-devel] " Gabriel Kerneis
1 sibling, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2013-10-11 9:35 UTC (permalink / raw)
To: Gabriel Kerneis
Cc: Charlie Shepherd, google-summer-of-code-mentors-list, qemu-devel
On Thu, Oct 10, 2013 at 11:14:22PM +0100, Gabriel Kerneis wrote:
> We were so excited about our QEMU/CPC GSoC project that we have decided
> to write a 12-page article to share our experience:
>
> QEMU/CPC: static analysis and CPS conversion
> for safe, portable, and efficient coroutines
> http://gabriel.kerneis.info/research/files/qemu-cpc.pdf
>
> If you want to learn more about QEMU internals, how we fixed hundreds of
> lines of code with a small checking tool, or discover a nice compilation
> technique for coroutines, you will probably be interested in this
> article.
Summary & status:
Charlie showed it's possible to use the CPC tool to implement QEMU
coroutines. CPC is a source-to-source translator that outputs C code.
That means no stack switching or threads are necessary to implement
coroutines. In other words, high performance coroutines that are also
portable.
There are still some challenges so QEMU cannot switch to CPC yet. Not
all existing QEMU coroutine code is amenable to CPC translation, work is
needed to refactor the code to remove functions that change behavior
depending on if (qemu_in_coroutine()). Also, CPC is not yet widely
packaged and available on all QEMU host platforms so we cannot add it as
a build dependency at this time.
The paper offers details on how CPC works, tools that Gabriel and
Charlie developed and refined during the Google Summer of Code project,
and performance results.
The most immediate result is that a tool will soon be available to check
coroutine_fn annotations in the QEMU source tree. The tool can detect
code paths where a yielding function is invoked outside coroutine
context (which would result in an abort at runtime!).
Thanks to Charlie Shepherd and Gabriel Kerneis, it was a pleasure
working together!
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [GSoC Mentors] Re: QEMU/CPC project: an experience report
2013-10-11 9:35 ` Stefan Hajnoczi
@ 2013-10-11 11:34 ` Pierre Tardy
2013-10-11 11:47 ` [Qemu-devel] " Gabriel Kerneis
2013-10-11 14:34 ` [Qemu-devel] [GSoC Mentors] " Gabriel Kerneis
0 siblings, 2 replies; 7+ messages in thread
From: Pierre Tardy @ 2013-10-11 11:34 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Charlie Shepherd, Gabriel Kerneis,
Google Summer of Code Mentors List, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]
On Fri, Oct 11, 2013 at 11:35 AM, Stefan Hajnoczi <stefanha@gmail.com>wrote:
> On Thu, Oct 10, 2013 at 11:14:22PM +0100, Gabriel Kerneis wrote:
> > We were so excited about our QEMU/CPC GSoC project that we have decided
> > to write a 12-page article to share our experience:
> >
> > QEMU/CPC: static analysis and CPS conversion
> > for safe, portable, and efficient coroutines
> > http://gabriel.kerneis.info/research/files/qemu-cpc.pdf
> >
> > If you want to learn more about QEMU internals, how we fixed hundreds of
> > lines of code with a small checking tool, or discover a nice compilation
> > technique for coroutines, you will probably be interested in this
> > article.
>
> Summary & status:
>
> Charlie showed it's possible to use the CPC tool to implement QEMU
> coroutines. CPC is a source-to-source translator that outputs C code.
> That means no stack switching or threads are necessary to implement
> coroutines. In other words, high performance coroutines that are also
> portable.
>
> Do I summarized too much if I say that this is about automatically
translating thread based code to event driven code?
This indeed deserve some congrats, and looks interesting. Do you have an
epub version, so that one can study this confortably in an ebook reader?
Regards,
Pierre
[-- Attachment #2: Type: text/html, Size: 1890 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] QEMU/CPC project: an experience report
2013-10-11 11:34 ` [Qemu-devel] [GSoC Mentors] " Pierre Tardy
@ 2013-10-11 11:47 ` Gabriel Kerneis
2013-10-11 12:05 ` Pierre Tardy
2013-10-11 14:34 ` [Qemu-devel] [GSoC Mentors] " Gabriel Kerneis
1 sibling, 1 reply; 7+ messages in thread
From: Gabriel Kerneis @ 2013-10-11 11:47 UTC (permalink / raw)
To: Pierre Tardy
Cc: Stefan Hajnoczi, Juliusz Chroboczek,
Google Summer of Code Mentors List, qemu-devel, Charlie Shepherd
Hi Pierre,
On Fri, Oct 11, 2013 at 01:34:02PM +0200, Pierre Tardy wrote:
> Do I summarized too much if I say that this is about automatically
> translating thread based code to event driven code?
This is exactly what CPC is about. If you want more details on the
translation itself, you might be interested in my PhD thesis [1], or the
journal article Juliusz Chroboczek and I wrote about it [2]. Note that
those have been written before this GSoC project.
[1] http://gabriel.kerneis.info/research/files/kerneis-phd-thesis.pdf
[2] http://gabriel.kerneis.info/research/files/cpc-2012.pdf
> This indeed deserve some congrats, and looks interesting. Do you have an
> epub version, so that one can study this confortably in an ebook reader?
Unfortunately not, but I could easily recompile it if anyone knows a
simple way to turn a LaTeX file into an epub.
Best,
--
Gabriel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] QEMU/CPC project: an experience report
2013-10-11 11:47 ` [Qemu-devel] " Gabriel Kerneis
@ 2013-10-11 12:05 ` Pierre Tardy
0 siblings, 0 replies; 7+ messages in thread
From: Pierre Tardy @ 2013-10-11 12:05 UTC (permalink / raw)
To: Gabriel Kerneis
Cc: Stefan Hajnoczi, Juliusz Chroboczek,
Google Summer of Code Mentors List, qemu-devel, Charlie Shepherd
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
> [1] http://gabriel.kerneis.info/research/files/kerneis-phd-thesis.pdf
> [2] http://gabriel.kerneis.info/research/files/cpc-2012.pdf
>
> Looks like you ruined my evening!
> > This indeed deserve some congrats, and looks interesting. Do you have an
> > epub version, so that one can study this confortably in an ebook reader?
>
> Unfortunately not, but I could easily recompile it if anyone knows a
> simple way to turn a LaTeX file into an epub.
>
I would indeed though this obvious issue would have a simpler answer.
http://tex.stackexchange.com/questions/1551/use-latex-to-produce-epub
I'll probably try what calibre can do with the pdfs..
Pierre
[-- Attachment #2: Type: text/html, Size: 1606 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [GSoC Mentors] Re: QEMU/CPC project: an experience report
2013-10-11 11:34 ` [Qemu-devel] [GSoC Mentors] " Pierre Tardy
2013-10-11 11:47 ` [Qemu-devel] " Gabriel Kerneis
@ 2013-10-11 14:34 ` Gabriel Kerneis
1 sibling, 0 replies; 7+ messages in thread
From: Gabriel Kerneis @ 2013-10-11 14:34 UTC (permalink / raw)
To: Pierre Tardy
Cc: Stefan Hajnoczi, Google Summer of Code Mentors List, qemu-devel,
Charlie Shepherd
On Fri, Oct 11, 2013 at 01:34:02PM +0200, Pierre Tardy wrote:
> This indeed deserve some congrats, and looks interesting. Do you have an
> epub version, so that one can study this confortably in an ebook reader?
HTML: http://gabriel.kerneis.info/research/files/qemu-cpc/
(generated from latex source with htlatex)
EPUB: http://gabriel.kerneis.info/research/files/qemu-cpc.epub
(generated from the above html with calibre)
Thanks to John Nash for his help with this conversion.
--
Gabriel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] QEMU/CPC project: an experience report
2013-10-10 22:14 [Qemu-devel] QEMU/CPC project: an experience report Gabriel Kerneis
2013-10-11 9:35 ` Stefan Hajnoczi
@ 2013-11-12 21:25 ` Gabriel Kerneis
1 sibling, 0 replies; 7+ messages in thread
From: Gabriel Kerneis @ 2013-11-12 21:25 UTC (permalink / raw)
To: qemu-devel, google-summer-of-code-mentors-list
Cc: Stefan Hajnoczi, Charlie Shepherd
On Thu, Oct 10, 2013 at 11:14:22PM +0100, Gabriel Kerneis wrote:
> We were so excited about our QEMU/CPC GSoC project that we have decided
> to write a 12-page article to share our experience
Our "QEMU/CPC" paper has been accepted for publication at PEPM'14:
http://www.program-transformation.org/PEPM14/
We received a number of very useful comments from the reviewers that should help
improving the final paper. The version on my webpage will be updated once this
is done.
Best regards,
--
Gabriel Kerneis --- http://gabriel.kerneis.info/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-11-12 21:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10 22:14 [Qemu-devel] QEMU/CPC project: an experience report Gabriel Kerneis
2013-10-11 9:35 ` Stefan Hajnoczi
2013-10-11 11:34 ` [Qemu-devel] [GSoC Mentors] " Pierre Tardy
2013-10-11 11:47 ` [Qemu-devel] " Gabriel Kerneis
2013-10-11 12:05 ` Pierre Tardy
2013-10-11 14:34 ` [Qemu-devel] [GSoC Mentors] " Gabriel Kerneis
2013-11-12 21:25 ` [Qemu-devel] " Gabriel Kerneis
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).