]> git.baikalelectronics.ru Git - kernel.git/commit
libata: take advantage of cmwq and remove concurrency limitations
authorTejun Heo <tj@kernel.org>
Fri, 2 Jul 2010 08:03:52 +0000 (10:03 +0200)
committerTejun Heo <tj@kernel.org>
Fri, 2 Jul 2010 08:59:24 +0000 (10:59 +0200)
commit4e700361474c18ff3113fde77837a4722082d604
treee93af7f241987ffe365792c0130d182b0ac890d1
parent5af5873889f663735e18aeae503f6aee824b7977
libata: take advantage of cmwq and remove concurrency limitations

libata has two concurrency related limitations.

a. ata_wq which is used for polling PIO has single thread per CPU.  If
   there are multiple devices doing polling PIO on the same CPU, they
   can't be executed simultaneously.

b. ata_aux_wq which is used for SCSI probing has single thread.  In
   cases where SCSI probing is stalled for extended period of time
   which is possible for ATAPI devices, this will stall all probing.

#a is solved by increasing maximum concurrency of ata_wq.  Please note
that polling PIO might be used under allocation path and thus needs to
be served by a separate wq with a rescuer.

#b is solved by using the default wq instead and achieving exclusion
via per-port mutex.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/libata-sff.c
drivers/ata/libata.h
include/linux/libata.h