mmc: add support for scheduling mmcqd on idle CPU

In order to boost mmc performance on various platforms,
add support for configuring whether set_wake_up_idle()
should be called on the mmc queue thread (mmcqd).
The decision will be set in each individual platform's
dts file.

CRs-Fixed: 787554
Change-Id: I3989d3f5b8228785e6d3bc49c7eb01ebf2fa2f38
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
Dov Levenglick 2015-03-10 16:00:56 +02:00 committed by Subhash Jadavani
parent 326454ec69
commit ed9551c160
4 changed files with 15 additions and 2 deletions

View file

@ -75,6 +75,9 @@ In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltag
- qcom,large-address-bus - specifies whether the soc is capable of
supporting larger than 32 bit address bus width.
- qcom,wakeup-on-idle: if configured, the mmcqd thread will call
set_wake_up_idle(), thereby voting for it to be called on idle CPUs.
Example:
aliases {

View file

@ -59,6 +59,7 @@ static int mmc_queue_thread(void *d)
{
struct mmc_queue *mq = d;
struct request_queue *q = mq->queue;
struct mmc_card *card = mq->card;
struct sched_param scheduler_params = {0};
scheduler_params.sched_priority = 1;
@ -66,6 +67,8 @@ static int mmc_queue_thread(void *d)
sched_setscheduler(current, SCHED_FIFO, &scheduler_params);
current->flags |= PF_MEMALLOC;
if (card->host->wakeup_on_idle)
set_wake_up_idle(true);
down(&mq->thread_sem);
do {

View file

@ -1367,7 +1367,9 @@ static void sdhci_msm_populate_affinity_type(struct sdhci_msm_pltfm_data *pdata,
#endif
/* Parse platform data */
static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev)
static
struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
struct sdhci_msm_host *msm_host)
{
struct sdhci_msm_pltfm_data *pdata = NULL;
struct device_node *np = dev->of_node;
@ -1477,6 +1479,9 @@ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev)
sdhci_msm_populate_affinity_type(pdata, np);
if (of_property_read_bool(np, "qcom,wakeup-on-idle"))
msm_host->mmc->wakeup_on_idle = true;
return pdata;
out:
return NULL;
@ -2822,7 +2827,8 @@ static int sdhci_msm_probe(struct platform_device *pdev)
goto pltfm_free;
}
msm_host->pdata = sdhci_msm_populate_pdata(&pdev->dev);
msm_host->pdata = sdhci_msm_populate_pdata(&pdev->dev,
msm_host);
if (!msm_host->pdata) {
dev_err(&pdev->dev, "DT parsing error\n");
goto pltfm_free;

View file

@ -458,6 +458,7 @@ struct mmc_host {
enum mmc_load state;
} clk_scaling;
enum dev_state dev_status;
bool wakeup_on_idle;
unsigned long private[0] ____cacheline_aligned;
};