All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] Move threadlets infrastructure to qemu-threadlets.c
Date: Wed, 10 Nov 2010 23:26:20 +0530	[thread overview]
Message-ID: <20101110175620.GB2300@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTik4Va_OEEAofJtaHew4jG6CGRnahwNJNAWLmtj_@mail.gmail.com>

* Blue Swirl <blauwirbel@gmail.com> [2010-11-10 17:29:30]:

> On Wed, Nov 10, 2010 at 1:19 PM, Arun R Bharadwaj
> <arun@linux.vnet.ibm.com> wrote:
> > The reason for creating this generic infrastructure is so that other subsystems,
> > such as virtio-9p could make use of it for offloading tasks that could block.
> >
> > Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > Signed-off-by: Gautham R Shenoy <gautham.shenoy@gmail.com>
> > Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
> > ---
> >  Makefile.objs          |    1
> >  docs/async-support.txt |  141 +++++++++++++++++++++++++++++++++++++++
> >  posix-aio-compat.c     |  173 ------------------------------------------------
> >  qemu-threadlets.c      |  168 +++++++++++++++++++++++++++++++++++++++++++++++
> >  qemu-threadlets.h      |   48 +++++++++++++
> >  5 files changed, 359 insertions(+), 172 deletions(-)
> >  create mode 100644 docs/async-support.txt
> >  create mode 100644 qemu-threadlets.c
> >  create mode 100644 qemu-threadlets.h
> >
> > diff --git a/qemu-threadlets.h b/qemu-threadlets.h
> > new file mode 100644
> > index 0000000..f869304
> > --- /dev/null
> > +++ b/qemu-threadlets.h
> > @@ -0,0 +1,48 @@
> > +/*
> > + * Threadlet support for offloading tasks to be executed asynchronously
> > + *
> > + * Copyright IBM, Corp. 2008
> > + * Copyright IBM, Corp. 2010
> > + *
> > + * Authors:
> > + *  Anthony Liguori     <aliguori@us.ibm.com>
> > + *  Aneesh Kumar K.V    <aneesh.kumar@linux.vnet.ibm.com>
> > + *  Gautham R Shenoy    <gautham.shenoy@gmail.com>
> > + *
> > + * This work is licensed under the terms of the GNU GPL, version 2.  See
> > + * the COPYING file in the top-level directory.
> > + */
> > +
> > +#ifndef QEMU_ASYNC_WORK_H
> > +#define QEMU_ASYNC_WORK_H
> > +
> > +#include "qemu-queue.h"
> > +#include "qemu-common.h"
> > +#include "qemu-thread.h"
> > +
> > +typedef struct ThreadletQueue
> > +{
> > +    QemuMutex lock;
> > +    QemuCond cond;
> > +    int max_threads;
> > +    int min_threads;
> > +    int cur_threads;
> > +    int idle_threads;
> > +    QTAILQ_HEAD(, ThreadletWork) request_list;
> > +} ThreadletQueue;
> > +
> > +typedef struct ThreadletWork
> > +{
> > +    QTAILQ_ENTRY(ThreadletWork) node;
> > +    void (*func)(struct ThreadletWork *work);
> > +} ThreadletWork;
> > +
> > +extern void submit_work_to_queue(ThreadletQueue *queue,
> > +                                 ThreadletWork *work);
> > +extern void submit_work(ThreadletWork *work);
> > +extern int dequeue_work_on_queue(ThreadletQueue *queue,
> > +                                 ThreadletWork *work);
> > +extern int dequeue_work(ThreadletWork *work);
> > +extern void threadlet_queue_init(ThreadletQueue *queue, int max_threads,
> > +                                 int min_threads);
> 
> Please remove 'extern' qualifiers, they are useless for function
> declarations. In most cases they are not used in QEMU.

Will change these. Thanks for the review.

-arun

  reply	other threads:[~2010-11-10 17:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 13:19 [Qemu-devel] v10: [PATCH 0/3] Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-11-10 13:19 ` [Qemu-devel] [PATCH 1/3] Make paio subsystem use threadlets infrastructure Arun R Bharadwaj
2010-11-10 13:45   ` Stefan Hajnoczi
2010-11-10 17:54     ` Arun R Bharadwaj
2010-11-10 20:13       ` Stefan Hajnoczi
2010-11-11  8:41     ` [Qemu-devel] " Paolo Bonzini
2010-11-11  9:26       ` Stefan Hajnoczi
2010-11-10 13:19 ` [Qemu-devel] [PATCH 2/3] Move threadlets infrastructure to qemu-threadlets.c Arun R Bharadwaj
2010-11-10 13:47   ` Stefan Hajnoczi
2010-11-11  8:18     ` Arun R Bharadwaj
2010-11-10 17:29   ` Blue Swirl
2010-11-10 17:56     ` Arun R Bharadwaj [this message]
2010-11-10 13:19 ` [Qemu-devel] [PATCH 3/3] Add helper functions to enable virtio-9p make use of the threadlets Arun R Bharadwaj
2010-11-10 13:54   ` Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2010-11-15 17:53 [Qemu-devel] [PATCH 0/3] v11: Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-11-15 17:53 ` [Qemu-devel] [PATCH 2/3] Move threadlets infrastructure to qemu-threadlets.c Arun R Bharadwaj
2010-11-08 10:46 [Qemu-devel] [REFACTORED CODE] [PATCH 0/3] Threadlets: A generic task offloading framework Arun R Bharadwaj
2010-11-08 10:47 ` [Qemu-devel] [PATCH 2/3] Move threadlets infrastructure to qemu-threadlets.c 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=20101110175620.GB2300@linux.vnet.ibm.com \
    --to=arun@linux.vnet.ibm.com \
    --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.