From: J Freyensee <james_p_freyensee@linux.intel.com>
To: linux-mmc@vger.kernel.org
Subject: question on mmc_queue_bounce_pre()/post() in block.c
Date: Mon, 11 Jul 2011 17:36:14 -0700 [thread overview]
Message-ID: <4E1B96FE.8000402@linux.intel.com> (raw)
I have a question concerning the following block of code in
~/drivers/mmc/card/block.c:
mmc_queue_bounce_pre(mq);
/*
* Before issuing a user req, host driver should
* wait for the BKOPS is done or just use HPI to
* interrupt it.
*/
if (mmc_wait_for_bkops(card))
goto cmd_err;
mmc_wait_for_req(card->host, &brq.mrq);
mmc_queue_bounce_post(mq);
What is the purpose of mmc_queue_bounce_pre() and
mmc_queue_bounce_post()? At first when I looked at the code, I thought
it was implementing some type of sw cache- mmc_queue_bounce_pre(mq)
would be stored in a buffer, available for reads even before the data
gets eventually written to the SSD from the mmc_wait_for_req() call.
But the way the code is written, a read from the buffer won't happen
until AFTER the mmc_wait_for_req(), which kind-of defeats the purpose of
cache. This is independent of the work Per Forlin and co. are doing to
make mmc_wait_for_req() non-blocking. So with the way that the code is
written today, I am not really sure what benefit
mmc_queue_bounce_pre()/*_post() is providing.
I'm still ramping up in this area of the linux kernel, like I don't yet
understand the purpose of a scatterlist. But I'm looking to contribute
to this area of Linux in some regard.
Thanks for the help,
Jay
reply other threads:[~2011-07-12 0:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4E1B96FE.8000402@linux.intel.com \
--to=james_p_freyensee@linux.intel.com \
--cc=linux-mmc@vger.kernel.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.