summaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorkashyap.desai@lsi.com <kashyap.desai@lsi.com>2011-08-04 16:42:46 +0530
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 08:35:18 -0600
commita38ae37fdcd77657fb6624b0a0ec57f3d21e2f40 (patch)
tree21f2f183fe342a25fca6ec3a37db395573a35b63 /drivers/message
parente62cca19a9bbfc72c62632d95a7c01cd6476708c (diff)
downloadlinux-stable-a38ae37fdcd77657fb6624b0a0ec57f3d21e2f40.tar.gz
linux-stable-a38ae37fdcd77657fb6624b0a0ec57f3d21e2f40.tar.bz2
linux-stable-a38ae37fdcd77657fb6624b0a0ec57f3d21e2f40.zip
[SCSI] mptfusion: Avoid out of order Event processing due to cpu migration
Driver will now schedule MPI event using "delay_work_queue_on" to specify same CPU to be used to schedule work. Earlier it used "delay_work_queue" which can cause migration of work due to kernel' timer migration feature. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptsas.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index d21924ba4b1a..074e52254fcd 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -290,10 +290,11 @@ mptsas_add_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
spin_lock_irqsave(&ioc->fw_event_lock, flags);
list_add_tail(&fw_event->list, &ioc->fw_event_list);
INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work);
- devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)\n",
- ioc->name, __func__, fw_event));
- queue_delayed_work(ioc->fw_event_q, &fw_event->work,
- delay);
+ devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)"
+ "on cpuid %d\n", ioc->name, __func__,
+ fw_event, smp_processor_id()));
+ queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q,
+ &fw_event->work, delay);
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
}
@@ -305,10 +306,11 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
unsigned long flags;
spin_lock_irqsave(&ioc->fw_event_lock, flags);
devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: reschedule task "
- "(fw_event=0x%p)\n", ioc->name, __func__, fw_event));
+ "(fw_event=0x%p)on cpuid %d\n", ioc->name, __func__,
+ fw_event, smp_processor_id()));
fw_event->retries++;
- queue_delayed_work(ioc->fw_event_q, &fw_event->work,
- msecs_to_jiffies(delay));
+ queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q,
+ &fw_event->work, msecs_to_jiffies(delay));
spin_unlock_irqrestore(&ioc->fw_event_lock, flags);
}