From: Stefan Hajnoczi <stefanha@redhat.com>
To: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: peter.crosthwaite@xilinx.com, peter.maydell@linaro.org,
aliguori@us.ibm.com, sw@weilnetz.de, qemu-devel@nongnu.org,
blauwirbel@gmail.com, paul@codesourcery.com, pbonzini@redhat.com,
afaerber@suse.de
Subject: Re: [Qemu-devel] [RFC 0/7] Convert SD card model to AIO
Date: Mon, 13 May 2013 14:13:54 +0200 [thread overview]
Message-ID: <20130513121354.GC21733@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1368202225-45798-1-git-send-email-i.mitsyanko@gmail.com>
On Fri, May 10, 2013 at 08:10:18PM +0400, Igor Mitsyanko wrote:
> This is an initial attempt to change our SD card model to use asynchronious
> input/output API instead of synchronious one. This will require converting of
> every user also. Right now I've converted only PL181 model, and I'll wait
> for some feedback on taken approach before I'll continue with other users.
>
> New async SD interface is built on two callbacks:
> 1 Callback which models arrival of start bit on DAT line from card (start bit)
> 2 Callback modeling deasserting of DAT0 line by card when it has finished
> programming data (data busy end)
>
> This is based on SD card specification.
> Start bit is issued for every new block of data coming from card.
> DAT0 line is kept low by card to signal busy state, while data block is being
> programmed by card and it can't receive new data.
>
> Furthermore, I decided to drop data buffering on SD controller side. We already
> have two buffers in SD card model, no need to have another one in controller model.
> We can avoid intermediate copying from card's buffer to controller's buffer, and
> read/write directly from card.
>
> Tested by running this Fedora image
> https://fedoraproject.org/wiki/Architectures/ARM/F18/Versatile_Express
> on versatile board.
>
> Igor Mitsyanko (7):
> sd.c: introduce AIO related members in SD state
> sd.c: introduce variable for trekking valid data
> sd.c: introduce "start bit" and "busy deasserted" callbacks
> sd.c: use callbacks as a flag to use async IO
> sd.c: introduce async read operation
> sd.c: introduce async write interface
> pl181.c: convert to async IO SD card interface
>
> hw/sd/omap_mmc.c | 6 +-
> hw/sd/pl181.c | 302 +++++++++++++++++++++++++++++++++-------------------
> hw/sd/pxa2xx_mmci.c | 2 +-
> hw/sd/sd.c | 272 ++++++++++++++++++++++++++++++++++++++++++----
> hw/sd/sdhci.c | 4 +-
> include/hw/sd.h | 3 +-
> 6 files changed, 449 insertions(+), 140 deletions(-)
Thanks for doing this! It makes me happy when we replace synchronous
block layer callers with asynchronous ones.
I didn't review each line but overall it seems like the right direction.
Stefan
prev parent reply other threads:[~2013-05-13 12:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 16:10 [Qemu-devel] [RFC 0/7] Convert SD card model to AIO Igor Mitsyanko
2013-05-10 16:10 ` [Qemu-devel] [RFC 1/7] sd.c: introduce AIO related members in SD state Igor Mitsyanko
2013-05-10 16:10 ` [Qemu-devel] [RFC 2/7] sd.c: introduce variable for trekking valid data Igor Mitsyanko
2013-06-14 11:49 ` Peter Maydell
2013-06-17 12:30 ` Stefan Hajnoczi
2013-06-17 14:03 ` Paolo Bonzini
2013-05-10 16:10 ` [Qemu-devel] [RFC 3/7] sd.c: introduce "start bit" and "busy deasserted" callbacks Igor Mitsyanko
2013-06-14 11:51 ` Peter Maydell
2013-05-10 16:10 ` [Qemu-devel] [RFC 4/7] sd.c: use callbacks as a flag to use async IO Igor Mitsyanko
2013-05-10 16:10 ` [Qemu-devel] [RFC 5/7] sd.c: introduce async read operation Igor Mitsyanko
2013-05-13 12:10 ` Stefan Hajnoczi
2013-05-10 16:10 ` [Qemu-devel] [RFC 6/7] sd.c: introduce async write interface Igor Mitsyanko
2013-06-14 12:09 ` Peter Maydell
2013-05-10 16:10 ` [Qemu-devel] [RFC 7/7] pl181.c: convert to async IO SD card interface Igor Mitsyanko
2013-06-14 12:05 ` Peter Maydell
2013-05-13 12:13 ` Stefan Hajnoczi [this message]
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=20130513121354.GC21733@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=i.mitsyanko@gmail.com \
--cc=paul@codesourcery.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).