Submit #2468

[PATCH] kernel -- nata: Move ata_finish to MPSAFE taskqueue.

Added by vsrinivas almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


ata_finish() doesn't need the MP Lock; moving it from taskqueue_swi
to taskqueue_swi_mp will make sure it's not taken.

Note that taskqueue_swi(_mp) will be processed when this ithread
attempts to switch back to the thread it preempted. This means that
taskqueue_swi(_mp) processing exclude processing further interrupts
on the ithread while they're running. This may not be desirable and
is different than taskqueue_swi / swi_* / setsoft* in FreeBSD 4.x.
sys/dev/disk/nata/ata-queue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/disk/nata/ata-queue.c b/sys/dev/disk/nata/ata-queue.c
index b1b96a3..157d5cf 100644
--- a/sys/dev/disk/nata/ata-queue.c
+++ b/sys/dev/disk/nata/ata-queue.c
@@ -285,8 +285,8 @@ ata_finish(struct ata_request *request)
/* put request on the proper taskqueue for completion */
/* XXX FreeBSD has some sort of bio_taskqueue code here */
TASK_INIT(&request->task, 0, ata_completed, request);
- ATA_DEBUG_RQ(request, "finish taskqueue_swi");
- taskqueue_enqueue(taskqueue_swi, &request->task);
+ ATA_DEBUG_RQ(request, "finish taskqueue_swi_mp");
+ taskqueue_enqueue(taskqueue_swi_mp, &request->task);


-- vs


#1 Updated by vsrinivas almost 4 years ago

  • Status changed from New to Closed

Committed as cf5f86b6a177ae06633f7456d6414de7aca47f1b.

Also available in: Atom PDF