From: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH 0/9] Second threading model.
Date: Thu, 14 Oct 2010 17:53:04 +0530 [thread overview]
Message-ID: <20101014122217.2238.94995.stgit@localhost6.localdomain6> (raw)
Hi,
This patch implements the second threading model.
The first model can be referred here:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg43846.html
The features of the second threading model:
* The VCPU thread runs the Qemu code until the first blocking
call is encountered.
* The work to be done in the blocking call is assigned to an
asynchronous thread and the VCPU thread continues running
the Qemu code.
* If any blocking call is encountered by the asynchronous thread,
it simply waits for the blocking call to finish and continues
to run the succeeding part after that.
* There is no constant context switching between the VCPU thread
and the asynchronous thread.
* The code flow is simple to understand when compared to the
first threading model.
I have run the following test to measure the performance:
To test the v9fs_write call which is converted to the
second threading model, I run X dd threads in parallel
on the virtfs exported directory. The following is the command
I use for running 2 dd threads in parallel:
time dd if=/dev/zero of=null1 bs=4k count=1000 oflag=sync &
time dd if=/dev/zero of=null1 bs=4k count=1000 oflag=sync
Here is how the performance comparison between the original code,
first threading model and second threading model looks like:
1 2 3 5 10
no threading: real time(s) 18.1 46.4 99.2 360.8 1518.6
system time(s) 18.0 38.3 66.8 211.7 551.6
throughput(kbps) 226 353 373 235 268
1st model: real time 18.8 48.6 77.7 164.5 451.3
system time 0.6 0.2 0.18 0.68 2.4
throughput 218 336 474 624 914
2nd model: real time 23.1 37.8 57.1 166.5 430
system time 0.9 1.8 0.24 0.7 3.0
throughput 177 432 430 611 940
This patchset needs to be applied on top of the threadlets infrastructure
series available here:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg43842.html
The following series implements...
---
Sripathi Kodi (9):
Add read-write lock to QEMU
Introduce lock fid_list_lock to protect the fid list.
Global rename lock
Convert stat into 2nd threading model
Convert wstat into 2nd threading model
Convert open into 2nd threading model
Convert walk into 2nd threading model
Convert read into 2nd threading model
Convert write into 2nd threading model.
hw/virtio-9p.c | 950 +++++++++++++++++++++++---------------------------------
hw/virtio-9p.h | 27 ++
qemu-thread.c | 40 ++
qemu-thread.h | 10 +
4 files changed, 463 insertions(+), 564 deletions(-)
--
arun
next reply other threads:[~2010-10-14 12:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-14 12:23 Arun R Bharadwaj [this message]
2010-10-14 12:23 ` [Qemu-devel] [PATCH 1/9] Add read-write lock to QEMU Arun R Bharadwaj
2010-10-14 12:23 ` [Qemu-devel] [PATCH 2/9] Introduce lock fid_list_lock to protect the fid list Arun R Bharadwaj
2010-10-14 12:24 ` [Qemu-devel] [PATCH 3/9] Global rename lock Arun R Bharadwaj
2010-10-14 12:24 ` [Qemu-devel] [PATCH 4/9] Convert stat into 2nd threading model Arun R Bharadwaj
2010-10-14 12:24 ` [Qemu-devel] [PATCH 5/9] Convert wstat " Arun R Bharadwaj
2010-10-14 12:24 ` [Qemu-devel] [PATCH 6/9] Convert open " Arun R Bharadwaj
2010-10-14 12:25 ` [Qemu-devel] [PATCH 7/9] Convert walk " Arun R Bharadwaj
2010-10-14 12:25 ` [Qemu-devel] [PATCH 8/9] Convert read " Arun R Bharadwaj
2010-10-14 12:25 ` [Qemu-devel] [PATCH 9/9] Convert write " 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=20101014122217.2238.94995.stgit@localhost6.localdomain6 \
--to=arun@linux.vnet.ibm.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.