* [Qemu-devel] How to understand the coroutine context?
@ 2014-03-17 23:56 Le Tan
2014-03-18 4:04 ` Kashyap Chamarthy
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Le Tan @ 2014-03-17 23:56 UTC (permalink / raw)
To: qemu-devel
Hi, I am diving into the source code of qemu. I see the word
"coroutine" appears in so many places. I can't figure out what it
means. So, please, can anyone help me, telling me the mechanism or
semantic of "coroutine"? Thanks!
--Le Tan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-17 23:56 [Qemu-devel] How to understand the coroutine context? Le Tan
@ 2014-03-18 4:04 ` Kashyap Chamarthy
2014-03-18 5:45 ` Le Tan
2014-03-18 22:28 ` Thomas Huth
2014-03-18 12:28 ` Juan Quintela
2014-03-18 13:57 ` Leandro Dorileo
2 siblings, 2 replies; 12+ messages in thread
From: Kashyap Chamarthy @ 2014-03-18 4:04 UTC (permalink / raw)
To: Le Tan; +Cc: qemu-devel
On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
> Hi, I am diving into the source code of qemu. I see the word
> "coroutine" appears in so many places. I can't figure out what it
> means. So, please, can anyone help me, telling me the mechanism or
> semantic of "coroutine"? Thanks!
This might be of help --
http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html
--
/kashyap
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-18 4:04 ` Kashyap Chamarthy
@ 2014-03-18 5:45 ` Le Tan
2014-03-18 22:28 ` Thomas Huth
1 sibling, 0 replies; 12+ messages in thread
From: Le Tan @ 2014-03-18 5:45 UTC (permalink / raw)
To: Kashyap Chamarthy; +Cc: qemu-devel
Thanks, that is an excellent blog!
2014-03-18 12:04 GMT+08:00 Kashyap Chamarthy <kchamart@redhat.com>:
> On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
>> Hi, I am diving into the source code of qemu. I see the word
>> "coroutine" appears in so many places. I can't figure out what it
>> means. So, please, can anyone help me, telling me the mechanism or
>> semantic of "coroutine"? Thanks!
>
> This might be of help --
> http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html
>
>
> --
> /kashyap
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-17 23:56 [Qemu-devel] How to understand the coroutine context? Le Tan
2014-03-18 4:04 ` Kashyap Chamarthy
@ 2014-03-18 12:28 ` Juan Quintela
2014-03-18 12:54 ` Markus Armbruster
2014-03-18 13:57 ` Leandro Dorileo
2 siblings, 1 reply; 12+ messages in thread
From: Juan Quintela @ 2014-03-18 12:28 UTC (permalink / raw)
To: Le Tan; +Cc: qemu-devel
Le Tan <tamlokveer@gmail.com> wrote:
> Hi, I am diving into the source code of qemu. I see the word
> "coroutine" appears in so many places. I can't figure out what it
> means. So, please, can anyone help me, telling me the mechanism or
> semantic of "coroutine"? Thanks!
google, 1st hit, wikipedia:
https://en.wikipedia.org/wiki/Coroutine
A bit short resume:
Getting "user"-threads when you don't have threads.
Later, Juan.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-18 12:28 ` Juan Quintela
@ 2014-03-18 12:54 ` Markus Armbruster
2014-03-18 13:13 ` Juan Quintela
0 siblings, 1 reply; 12+ messages in thread
From: Markus Armbruster @ 2014-03-18 12:54 UTC (permalink / raw)
To: quintela; +Cc: Le Tan, qemu-devel
Juan Quintela <quintela@redhat.com> writes:
> Le Tan <tamlokveer@gmail.com> wrote:
>> Hi, I am diving into the source code of qemu. I see the word
>> "coroutine" appears in so many places. I can't figure out what it
>> means. So, please, can anyone help me, telling me the mechanism or
>> semantic of "coroutine"? Thanks!
>
> google, 1st hit, wikipedia:
>
> https://en.wikipedia.org/wiki/Coroutine
>
> A bit short resume:
>
> Getting "user"-threads when you don't have threads.
More like getting multiple flows of control even though you don't want
threads.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-18 12:54 ` Markus Armbruster
@ 2014-03-18 13:13 ` Juan Quintela
2014-03-18 13:48 ` Markus Armbruster
0 siblings, 1 reply; 12+ messages in thread
From: Juan Quintela @ 2014-03-18 13:13 UTC (permalink / raw)
To: Markus Armbruster; +Cc: Le Tan, qemu-devel
Markus Armbruster <armbru@redhat.com> wrote:
> Juan Quintela <quintela@redhat.com> writes:
>
>> Le Tan <tamlokveer@gmail.com> wrote:
>>> Hi, I am diving into the source code of qemu. I see the word
>>> "coroutine" appears in so many places. I can't figure out what it
>>> means. So, please, can anyone help me, telling me the mechanism or
>>> semantic of "coroutine"? Thanks!
>>
>> google, 1st hit, wikipedia:
>>
>> https://en.wikipedia.org/wiki/Coroutine
>>
>> A bit short resume:
>>
>> Getting "user"-threads when you don't have threads.
>
> More like getting multiple flows of control even though you don't want
> threads.
If he don't understand coroutine, you think that flows of control has
any chance? O:-)
Later, Juan.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-18 13:13 ` Juan Quintela
@ 2014-03-18 13:48 ` Markus Armbruster
0 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2014-03-18 13:48 UTC (permalink / raw)
To: quintela; +Cc: Le Tan, qemu-devel
Juan Quintela <quintela@redhat.com> writes:
> Markus Armbruster <armbru@redhat.com> wrote:
>> Juan Quintela <quintela@redhat.com> writes:
>>
>>> Le Tan <tamlokveer@gmail.com> wrote:
>>>> Hi, I am diving into the source code of qemu. I see the word
>>>> "coroutine" appears in so many places. I can't figure out what it
>>>> means. So, please, can anyone help me, telling me the mechanism or
>>>> semantic of "coroutine"? Thanks!
>>>
>>> google, 1st hit, wikipedia:
>>>
>>> https://en.wikipedia.org/wiki/Coroutine
>>>
>>> A bit short resume:
>>>
>>> Getting "user"-threads when you don't have threads.
>>
>> More like getting multiple flows of control even though you don't want
>> threads.
>
> If he don't understand coroutine, you think that flows of control has
> any chance? O:-)
Point taken & LOL
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-17 23:56 [Qemu-devel] How to understand the coroutine context? Le Tan
2014-03-18 4:04 ` Kashyap Chamarthy
2014-03-18 12:28 ` Juan Quintela
@ 2014-03-18 13:57 ` Leandro Dorileo
2 siblings, 0 replies; 12+ messages in thread
From: Leandro Dorileo @ 2014-03-18 13:57 UTC (permalink / raw)
To: Le Tan; +Cc: qemu-devel
Hi,
On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
> Hi, I am diving into the source code of qemu. I see the word
> "coroutine" appears in so many places. I can't figure out what it
> means. So, please, can anyone help me, telling me the mechanism or
> semantic of "coroutine"? Thanks!
If you want to understand the coroutine technique itself take a look
at this page[1], the're two references that may be helpfull.
A friend of mine has described[2] his view on implementing coroutine,
this may be helpfull as well.
[1] - http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
[2] - http://tia.mat.br/blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html
Regards...
--
Leandro Dorileo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-18 4:04 ` Kashyap Chamarthy
2014-03-18 5:45 ` Le Tan
@ 2014-03-18 22:28 ` Thomas Huth
2014-03-19 10:05 ` Stefan Hajnoczi
1 sibling, 1 reply; 12+ messages in thread
From: Thomas Huth @ 2014-03-18 22:28 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Le Tan, Kashyap Chamarthy
On Tue, 18 Mar 2014 09:34:56 +0530
Kashyap Chamarthy <kchamart@redhat.com> wrote:
> On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
> > Hi, I am diving into the source code of qemu. I see the word
> > "coroutine" appears in so many places. I can't figure out what it
> > means. So, please, can anyone help me, telling me the mechanism or
> > semantic of "coroutine"? Thanks!
>
> This might be of help --
> http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html
That's a very nice introduction ... Stefan, maybe you could also add
that to the docs directory of the QEMU repository? There does not seem
to be a description of the QEMU coroutines there yet...
Regards,
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-18 22:28 ` Thomas Huth
@ 2014-03-19 10:05 ` Stefan Hajnoczi
2014-03-19 10:13 ` Thomas Huth
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-03-19 10:05 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Le Tan, Kashyap Chamarthy
On Tue, Mar 18, 2014 at 11:28:47PM +0100, Thomas Huth wrote:
> On Tue, 18 Mar 2014 09:34:56 +0530
> Kashyap Chamarthy <kchamart@redhat.com> wrote:
>
> > On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
> > > Hi, I am diving into the source code of qemu. I see the word
> > > "coroutine" appears in so many places. I can't figure out what it
> > > means. So, please, can anyone help me, telling me the mechanism or
> > > semantic of "coroutine"? Thanks!
> >
> > This might be of help --
> > http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html
>
> That's a very nice introduction ... Stefan, maybe you could also add
> that to the docs directory of the QEMU repository? There does not seem
> to be a description of the QEMU coroutines there yet...
Have you seen the documentation in include/block/coroutine.h?
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-19 10:05 ` Stefan Hajnoczi
@ 2014-03-19 10:13 ` Thomas Huth
2014-03-19 11:15 ` Stefan Hajnoczi
0 siblings, 1 reply; 12+ messages in thread
From: Thomas Huth @ 2014-03-19 10:13 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Le Tan, Kashyap Chamarthy
On Wed, 19 Mar 2014 11:05:02 +0100
Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Tue, Mar 18, 2014 at 11:28:47PM +0100, Thomas Huth wrote:
> > On Tue, 18 Mar 2014 09:34:56 +0530
> > Kashyap Chamarthy <kchamart@redhat.com> wrote:
> >
> > > On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
> > > > Hi, I am diving into the source code of qemu. I see the word
> > > > "coroutine" appears in so many places. I can't figure out what it
> > > > means. So, please, can anyone help me, telling me the mechanism or
> > > > semantic of "coroutine"? Thanks!
> > >
> > > This might be of help --
> > > http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html
> >
> > That's a very nice introduction ... Stefan, maybe you could also add
> > that to the docs directory of the QEMU repository? There does not seem
> > to be a description of the QEMU coroutines there yet...
>
> Have you seen the documentation in include/block/coroutine.h?
Yes, but that does not have the nice introduction that you've given in
your blog - that's why I though it might be useful to have that
information in a file in the docs directory, too. Well, it was just an
idea ... if you think the API description in coroutine.h is sufficient,
I am certainly fine with that.
Regards,
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] How to understand the coroutine context?
2014-03-19 10:13 ` Thomas Huth
@ 2014-03-19 11:15 ` Stefan Hajnoczi
0 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-03-19 11:15 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Le Tan, Kashyap Chamarthy
On Wed, Mar 19, 2014 at 11:13:56AM +0100, Thomas Huth wrote:
> On Wed, 19 Mar 2014 11:05:02 +0100
> Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> > On Tue, Mar 18, 2014 at 11:28:47PM +0100, Thomas Huth wrote:
> > > On Tue, 18 Mar 2014 09:34:56 +0530
> > > Kashyap Chamarthy <kchamart@redhat.com> wrote:
> > >
> > > > On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote:
> > > > > Hi, I am diving into the source code of qemu. I see the word
> > > > > "coroutine" appears in so many places. I can't figure out what it
> > > > > means. So, please, can anyone help me, telling me the mechanism or
> > > > > semantic of "coroutine"? Thanks!
> > > >
> > > > This might be of help --
> > > > http://blog.vmsplice.net/2014/01/coroutines-in-qemu-basics.html
> > >
> > > That's a very nice introduction ... Stefan, maybe you could also add
> > > that to the docs directory of the QEMU repository? There does not seem
> > > to be a description of the QEMU coroutines there yet...
> >
> > Have you seen the documentation in include/block/coroutine.h?
>
> Yes, but that does not have the nice introduction that you've given in
> your blog - that's why I though it might be useful to have that
> information in a file in the docs directory, too. Well, it was just an
> idea ... if you think the API description in coroutine.h is sufficient,
> I am certainly fine with that.
I will expand the documentation in include/block/coroutine.h.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-03-19 11:15 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 23:56 [Qemu-devel] How to understand the coroutine context? Le Tan
2014-03-18 4:04 ` Kashyap Chamarthy
2014-03-18 5:45 ` Le Tan
2014-03-18 22:28 ` Thomas Huth
2014-03-19 10:05 ` Stefan Hajnoczi
2014-03-19 10:13 ` Thomas Huth
2014-03-19 11:15 ` Stefan Hajnoczi
2014-03-18 12:28 ` Juan Quintela
2014-03-18 12:54 ` Markus Armbruster
2014-03-18 13:13 ` Juan Quintela
2014-03-18 13:48 ` Markus Armbruster
2014-03-18 13:57 ` Leandro Dorileo
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).