提交 b26ed97c 编写于 作者: A Anna Neal 提交者: John W. Linville

libertas: increase spi driver thread priority

Currently, the libertas main thread contends with the spi driver thread
in the TX path.  To improve throughput, ensure that the driver thread
has higher scheduling priority than the libertas main thread.  Do this
by making the libertas spi driver thread a low priority real time
thread.

We measured an average throughput improvement of 13%.
Signed-off-by: NAnna Neal <anna@cozybit.com>
Signed-off-by: NAndrey Yurovsky <andrey@cozybit.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 25e47c18
...@@ -1020,6 +1020,7 @@ static int __devinit if_spi_probe(struct spi_device *spi) ...@@ -1020,6 +1020,7 @@ static int __devinit if_spi_probe(struct spi_device *spi)
struct libertas_spi_platform_data *pdata = spi->dev.platform_data; struct libertas_spi_platform_data *pdata = spi->dev.platform_data;
int err = 0; int err = 0;
u32 scratch; u32 scratch;
struct sched_param param = { .sched_priority = 1 };
lbs_deb_enter(LBS_DEB_SPI); lbs_deb_enter(LBS_DEB_SPI);
...@@ -1123,6 +1124,9 @@ static int __devinit if_spi_probe(struct spi_device *spi) ...@@ -1123,6 +1124,9 @@ static int __devinit if_spi_probe(struct spi_device *spi)
lbs_pr_err("error creating SPI thread: err=%d\n", err); lbs_pr_err("error creating SPI thread: err=%d\n", err);
goto remove_card; goto remove_card;
} }
if (sched_setscheduler(card->spi_thread, SCHED_FIFO, &param))
lbs_pr_err("Error setting scheduler, using default.\n");
err = request_irq(spi->irq, if_spi_host_interrupt, err = request_irq(spi->irq, if_spi_host_interrupt,
IRQF_TRIGGER_FALLING, "libertas_spi", card); IRQF_TRIGGER_FALLING, "libertas_spi", card);
if (err) { if (err) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册