ALSA: sh: aica: Remove deprecated create_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Tue, 7 Jun 2016 03:41:48 +0000 (09:11 +0530)
committerTakashi Iwai <tiwai@suse.de>
Tue, 7 Jun 2016 09:23:33 +0000 (11:23 +0200)
commit43aa56d95d2c3f141d516c78a654a33d1f287839
tree479267ae735b1ed752b11196af3fc11101cd04c8
parentfabc16fe9a92709c284325fbd14805fa410dc1d3
ALSA: sh: aica: Remove deprecated create_workqueue

System workqueues have been able to handle high level of concurrency
for a long time now and there's no reason to use dedicated workqueues
just to gain concurrency. Since aica_queue for AICA sound
driver has workitem dreamcastcard->spu_dma_work (maps to run_spu_dma)
which is involved in aica dma transfers and is not being used on a memory
reclaim path, dedicated aica_queue has been replaced with the
use of system_wq.

Unlike a dedicated per-cpu workqueue created with create_workqueue(),
system_wq allows multiple work items to overlap executions even on
the same CPU; however, a per-cpu workqueue doesn't have any CPU
locality or global ordering guarantees unless the target CPU is
explicitly specified and thus the increase of local concurrency
shouldn't make any difference.

Since the work items could be pending, flush_work() has been used in
snd_aicapcm_pcm_close() to ensure that there is no pending task while
disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/sh/aica.c