diff options
author | kashyap.desai@lsi.com <kashyap.desai@lsi.com> | 2011-08-04 07:12:46 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:35:18 -0400 |
commit | a38ae37fdcd77657fb6624b0a0ec57f3d21e2f40 (patch) | |
tree | 21f2f183fe342a25fca6ec3a37db395573a35b63 /drivers/message/fusion | |
parent | e62cca19a9bbfc72c62632d95a7c01cd6476708c (diff) |
[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/fusion')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 16 |
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, | |||
290 | spin_lock_irqsave(&ioc->fw_event_lock, flags); | 290 | spin_lock_irqsave(&ioc->fw_event_lock, flags); |
291 | list_add_tail(&fw_event->list, &ioc->fw_event_list); | 291 | list_add_tail(&fw_event->list, &ioc->fw_event_list); |
292 | INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work); | 292 | INIT_DELAYED_WORK(&fw_event->work, mptsas_firmware_event_work); |
293 | devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)\n", | 293 | devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: add (fw_event=0x%p)" |
294 | ioc->name, __func__, fw_event)); | 294 | "on cpuid %d\n", ioc->name, __func__, |
295 | queue_delayed_work(ioc->fw_event_q, &fw_event->work, | 295 | fw_event, smp_processor_id())); |
296 | delay); | 296 | queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q, |
297 | &fw_event->work, delay); | ||
297 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); | 298 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); |
298 | } | 299 | } |
299 | 300 | ||
@@ -305,10 +306,11 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, | |||
305 | unsigned long flags; | 306 | unsigned long flags; |
306 | spin_lock_irqsave(&ioc->fw_event_lock, flags); | 307 | spin_lock_irqsave(&ioc->fw_event_lock, flags); |
307 | devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: reschedule task " | 308 | devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: reschedule task " |
308 | "(fw_event=0x%p)\n", ioc->name, __func__, fw_event)); | 309 | "(fw_event=0x%p)on cpuid %d\n", ioc->name, __func__, |
310 | fw_event, smp_processor_id())); | ||
309 | fw_event->retries++; | 311 | fw_event->retries++; |
310 | queue_delayed_work(ioc->fw_event_q, &fw_event->work, | 312 | queue_delayed_work_on(smp_processor_id(), ioc->fw_event_q, |
311 | msecs_to_jiffies(delay)); | 313 | &fw_event->work, msecs_to_jiffies(delay)); |
312 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); | 314 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); |
313 | } | 315 | } |
314 | 316 | ||