qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
To: Avi Kivity <avi@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	"Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] Introduce threadlets
Date: Mon, 18 Oct 2010 16:17:42 +0530	[thread overview]
Message-ID: <20101018104742.GA3266@linux.vnet.ibm.com> (raw)
In-Reply-To: <4CBABA73.6010805@redhat.com>

* Avi Kivity <avi@redhat.com> [2010-10-17 10:57:23]:

>  On 10/14/2010 11:32 PM, Venkateswararao Jujjuri (JV) wrote:
> >>
> >>  Blocking is somewhat against the spirit of the thing, no?  While I agree that
> >>  the current cancel API is hard to use correctly, blocking defeats the purpose of
> >>  the API.
> >>
> >Are you proposing to add additional state in the return
> >(canceled/running/not-canceled)
> >and leave the synchronization part to the user?
> >i.e not to provide any additional interface for the user to wait
> >for the scheduled work to finish? Just trying to understand.
> 
> I wasn't proposing anything since I don't have a good proposal.
> Adding a callback makes the whole thing an asynchronous design which
> threads are trying to avoid.  Blocking is bad.  Leaving it to the
> caller is hard to use correctly.
> 
> Perhaps we can have a threadlet with barrier semantics.  You queue a
> piece of work which is guaranteed to execute after all previously
> submitted work (against the same queue) and before any consequently
> submitted work.
> 
> -- 
> error compiling committee.c: too many arguments to function
> 
> 

I would suggest that we have 2 APIs - cancel_threadletwork (current
cancel implementation) and cancel_threadletwork_sync (waits for work
to complete). As of now there is no known user for
cancel_threadletwork_sync. So we can keep this as a TODO for later. I
can provide the APIs for both these so that when we have a user for
cancel_threadletwork_sync, we can go ahead and implement it.

-arun 

  reply	other threads:[~2010-10-18 10:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 15:30 [Qemu-devel] v5 [PATCH 0/3] qemu: Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-10-13 15:31 ` [Qemu-devel] [PATCH 1/3] Introduce threadlets Arun R Bharadwaj
2010-10-14  9:02   ` Stefan Hajnoczi
2010-10-14 21:17     ` Venkateswararao Jujjuri (JV)
2010-10-15  9:52       ` Stefan Hajnoczi
2010-10-15 14:56         ` Venkateswararao Jujjuri (JV)
2010-10-15 14:42     ` [Qemu-devel] " Paolo Bonzini
2010-10-14  9:15   ` [Qemu-devel] " Stefan Hajnoczi
2010-10-14  9:19     ` Gleb Natapov
2010-10-14 16:16     ` Avi Kivity
2010-10-14 21:32       ` Venkateswararao Jujjuri (JV)
2010-10-17  8:57         ` Avi Kivity
2010-10-18 10:47           ` Arun R Bharadwaj [this message]
2010-10-18 12:29             ` Avi Kivity
2010-10-15  8:05       ` Stefan Hajnoczi
2010-10-13 15:31 ` [Qemu-devel] [PATCH 2/3] Make paio subsystem use threadlets Arun R Bharadwaj
2010-10-13 15:31 ` [Qemu-devel] [PATCH 3/3] Add helper functions for virtio-9p to " Arun R Bharadwaj
  -- strict thread matches above, loose matches on Subject: below --
2010-10-13 16:44 [Qemu-devel] [PATCH 0/3]: Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-10-13 16:47 ` [Qemu-devel] [PATCH 1/3]: Introduce threadlets Arun R Bharadwaj
2010-10-19 17:42 [Qemu-devel] v6: [PATCH 0/3]: Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-10-19 17:42 ` [Qemu-devel] [PATCH 1/3] Introduce threadlets Arun R Bharadwaj
2010-10-19 18:36   ` Balbir Singh
2010-10-19 21:00     ` Venkateswararao Jujjuri (JV)
2010-10-20  2:26       ` Balbir Singh
2010-10-19 21:36     ` Anthony Liguori
2010-10-20  2:22       ` Balbir Singh
2010-10-20  3:46         ` Venkateswararao Jujjuri (JV)
2010-10-20 13:05           ` Balbir Singh
2010-10-20 13:13         ` Anthony Liguori
2010-10-20  3:19       ` Venkateswararao Jujjuri (JV)
2010-10-20  8:16   ` Stefan Hajnoczi
2010-10-21 12:10 [Qemu-devel] [PATCH 0/3]: v7: Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-10-21 12:10 ` [Qemu-devel] [PATCH 1/3] Introduce threadlets Arun R Bharadwaj
2010-10-22  7:02   ` Balbir Singh
2010-10-26 14:14 [Qemu-devel] v8: [PATCH 0/3] Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-10-26 14:14 ` [Qemu-devel] [PATCH 1/3] Introduce threadlets Arun R Bharadwaj
2010-10-26 19:31   ` Blue Swirl
2010-11-01 13:40   ` Anthony Liguori
2010-11-05  6:48     ` Arun R Bharadwaj

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=20101018104742.GA3266@linux.vnet.ibm.com \
    --to=arun@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=jvrao@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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 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).