* question on mmc_queue_bounce_pre()/post() in block.c
@ 2011-07-12 0:36 J Freyensee
0 siblings, 0 replies; only message in thread
From: J Freyensee @ 2011-07-12 0:36 UTC (permalink / raw)
To: linux-mmc
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-12 0:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12 0:36 question on mmc_queue_bounce_pre()/post() in block.c J Freyensee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox