question on mmc_queue_bounce_pre()/post() in block.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux