Re: mpt irq timeout problem after reboot - only if non-verbose booting !?!
schrieb John Baldwin am 17.10.2012 19:19 (localtime): Are you using any RAID volumes? The only shutdown handler in mpt that looks like it might want interrupts to work is mpt_raid_shutdown(). It needs to use polled I/O instead of disabling interrupts I think. Try this: Index: mpt_raid.c === --- mpt_raid.c(revision 241641) +++ mpt_raid.c(working copy) @@ -115,7 +115,7 @@ static timeout_t mpt_raid_timer; static void mpt_enable_vol(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol, int enable); #endif -static void mpt_verify_mwce(struct mpt_softc *, struct mpt_raid_volume *); +static void mpt_verify_mwce(struct mpt_softc *, struct mpt_raid_volume *, int); static void mpt_adjust_queue_depth(struct mpt_softc *, struct mpt_raid_volume *, struct cam_path *); #if __FreeBSD_version 50 @@ -135,7 +135,7 @@ static void mpt_disk_prt(struct mpt_softc *mpt, st static int mpt_issue_raid_req(struct mpt_softc *mpt, struct mpt_raid_volume *vol, struct mpt_raid_disk *disk, request_t *req, u_int Action, uint32_t ActionDataWord, bus_addr_t addr, bus_size_t len, -int write, int wait); +int write, int wait, int sleep_ok); static int mpt_refresh_raid_data(struct mpt_softc *mpt); static void mpt_schedule_raid_refresh(struct mpt_softc *mpt); @@ -517,7 +517,7 @@ mpt_raid_shutdown(struct mpt_softc *mpt) mpt-raid_mwce_setting = MPT_RAID_MWCE_OFF; RAID_VOL_FOREACH(mpt, mpt_vol) { - mpt_verify_mwce(mpt, mpt_vol); + mpt_verify_mwce(mpt, mpt_vol, FALSE); } } @@ -592,7 +592,7 @@ static int mpt_issue_raid_req(struct mpt_softc *mpt, struct mpt_raid_volume *vol, struct mpt_raid_disk *disk, request_t *req, u_int Action, uint32_t ActionDataWord, bus_addr_t addr, bus_size_t len, -int write, int wait) +int write, int wait, int sleep_ok) { MSG_RAID_ACTION_REQUEST *rap; SGE_SIMPLE32 *se; @@ -623,7 +623,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt, struct m if (wait) { return (mpt_wait_req(mpt, req, REQ_STATE_DONE, REQ_STATE_DONE, - /*sleep_ok*/FALSE, /*time_ms*/2000)); + sleep_ok, /*time_ms*/2000)); } else { return (0); } @@ -763,7 +763,7 @@ mpt_raid_quiesce_disk(struct mpt_softc *mpt, struc MPI_RAID_ACTION_QUIESCE_PHYS_IO, /*ActionData*/0, /*addr*/0, /*len*/0, /*write*/FALSE, - /*wait*/FALSE); + /*wait*/FALSE, /*sleep_ok*/FALSE); if (rv != 0) return (CAM_REQ_CMP_ERR); @@ -882,7 +882,7 @@ mpt_enable_vol(struct mpt_softc *mpt, struct mpt_r enable ? MPI_RAID_ACTION_ENABLE_VOLUME : MPI_RAID_ACTION_DISABLE_VOLUME, /*data*/0, /*addr*/0, /*len*/0, - /*write*/FALSE, /*wait*/TRUE); + /*write*/FALSE, /*wait*/TRUE, /*sleep_ok*/TRUE); if (rv == ETIMEDOUT) { mpt_vol_prt(mpt, mpt_vol, mpt_enable_vol: %s Volume Timed-out\n, @@ -903,7 +903,8 @@ mpt_enable_vol(struct mpt_softc *mpt, struct mpt_r #endif static void -mpt_verify_mwce(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol) +mpt_verify_mwce(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol, +int sleep_ok) { request_t *req; struct mpt_raid_action_result *ar; @@ -950,7 +951,7 @@ static void return; } - req = mpt_get_request(mpt, /*sleep_ok*/TRUE); + req = mpt_get_request(mpt, sleep_ok); if (req == NULL) { mpt_vol_prt(mpt, mpt_vol, mpt_verify_mwce: Get request failed!\n); @@ -965,7 +966,7 @@ static void rv = mpt_issue_raid_req(mpt, mpt_vol, /*disk*/NULL, req, MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS, data, /*addr*/0, /*len*/0, - /*write*/FALSE, /*wait*/TRUE); + /*write*/FALSE, /*wait*/TRUE, sleep_ok); if (rv == ETIMEDOUT) { mpt_vol_prt(mpt, mpt_vol, mpt_verify_mwce: Write Cache Enable Timed-out\n); @@ -1018,7 +1019,8 @@ mpt_verify_resync_rate(struct mpt_softc *mpt, stru rv = mpt_issue_raid_req(mpt, mpt_vol, /*disk*/NULL, req, MPI_RAID_ACTION_SET_RESYNC_RATE, mpt-raid_resync_rate, /*addr*/0, - /*len*/0,
Re: mpt irq timeout problem after reboot - only if non-verbose booting !?!
On Wednesday, October 17, 2012 3:14:52 pm Harald Schmalzbauer (mobil) wrote: -Ursprüngliche Nachricht- Von: John Baldwin j...@freebsd.org An: freebsd-stable@freebsd.org Cc: h.schmalzba...@omnilan.de Gesendet: 17.10.'12, 20:46 On Tuesday, October 16, 2012 5:24:44 am Harald Schmalzbauer wrote: Hello, I have 9.1-RC2 running in an ESXi 5.1 guest. I use 'lsisas' as virtual SCSI-Controller and mpt attaches and finds 1068E. Everything is working fine until the first 'shutdown -r now': The second boot pauses for ~2 minutes after probing disks and continues with this error: mpt0: Timedout requests already complete. Interrupts may not be functioning. To be clear, you only see this at the end of reboot, and the hardware is fine once the machine is back up? . Thanks for your attention! The timeout occurs after the first 'shutdown -r' while device probing during second boot process. Perhaps this is amd64 specific. Today I had a new i386 setup which doesn't exhibit this timeout. But it's on different hardware and hv-host was 5.0 inestead 5.1. So not really representative... Hmmm, ok. In that case my patch is not relevant. It would only fix that message occuring during the shutdown. -- John Baldwin ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: mpt irq timeout problem after reboot - only if non-verbose booting !?!
On Tuesday, October 16, 2012 5:24:44 am Harald Schmalzbauer wrote: Hello, I have 9.1-RC2 running in an ESXi 5.1 guest. I use 'lsisas' as virtual SCSI-Controller and mpt attaches and finds 1068E. Everything is working fine until the first 'shutdown -r now': The second boot pauses for ~2 minutes after probing disks and continues with this error: mpt0: Timedout requests already complete. Interrupts may not be functioning. To be clear, you only see this at the end of reboot, and the hardware is fine once the machine is back up? This problem was also obeserved with real 1068 hardware: http://lists.freebsd.org/pipermail/freebsd-stable/2011-September/063937.html When I power off the virtual machine instead of rebooting, the problem doesn't occur. Accidentally I found a workarround ;-) : If I set 'verbose_boot' in loader.conf, the problem vanisehs!?!?!? Any idea how „verbose_boot“ affects the operation of the mpt driver? Extra printfs affect the timing most likely. Are you using any RAID volumes? The only shutdown handler in mpt that looks like it might want interrupts to work is mpt_raid_shutdown(). It needs to use polled I/O instead of disabling interrupts I think. Try this: Index: mpt_raid.c === --- mpt_raid.c (revision 241641) +++ mpt_raid.c (working copy) @@ -115,7 +115,7 @@ static timeout_t mpt_raid_timer; static void mpt_enable_vol(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol, int enable); #endif -static void mpt_verify_mwce(struct mpt_softc *, struct mpt_raid_volume *); +static void mpt_verify_mwce(struct mpt_softc *, struct mpt_raid_volume *, int); static void mpt_adjust_queue_depth(struct mpt_softc *, struct mpt_raid_volume *, struct cam_path *); #if __FreeBSD_version 50 @@ -135,7 +135,7 @@ static void mpt_disk_prt(struct mpt_softc *mpt, st static int mpt_issue_raid_req(struct mpt_softc *mpt, struct mpt_raid_volume *vol, struct mpt_raid_disk *disk, request_t *req, u_int Action, uint32_t ActionDataWord, bus_addr_t addr, bus_size_t len, -int write, int wait); +int write, int wait, int sleep_ok); static int mpt_refresh_raid_data(struct mpt_softc *mpt); static void mpt_schedule_raid_refresh(struct mpt_softc *mpt); @@ -517,7 +517,7 @@ mpt_raid_shutdown(struct mpt_softc *mpt) mpt-raid_mwce_setting = MPT_RAID_MWCE_OFF; RAID_VOL_FOREACH(mpt, mpt_vol) { - mpt_verify_mwce(mpt, mpt_vol); + mpt_verify_mwce(mpt, mpt_vol, FALSE); } } @@ -592,7 +592,7 @@ static int mpt_issue_raid_req(struct mpt_softc *mpt, struct mpt_raid_volume *vol, struct mpt_raid_disk *disk, request_t *req, u_int Action, uint32_t ActionDataWord, bus_addr_t addr, bus_size_t len, - int write, int wait) + int write, int wait, int sleep_ok) { MSG_RAID_ACTION_REQUEST *rap; SGE_SIMPLE32 *se; @@ -623,7 +623,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt, struct m if (wait) { return (mpt_wait_req(mpt, req, REQ_STATE_DONE, REQ_STATE_DONE, -/*sleep_ok*/FALSE, /*time_ms*/2000)); +sleep_ok, /*time_ms*/2000)); } else { return (0); } @@ -763,7 +763,7 @@ mpt_raid_quiesce_disk(struct mpt_softc *mpt, struc MPI_RAID_ACTION_QUIESCE_PHYS_IO, /*ActionData*/0, /*addr*/0, /*len*/0, /*write*/FALSE, - /*wait*/FALSE); + /*wait*/FALSE, /*sleep_ok*/FALSE); if (rv != 0) return (CAM_REQ_CMP_ERR); @@ -882,7 +882,7 @@ mpt_enable_vol(struct mpt_softc *mpt, struct mpt_r enable ? MPI_RAID_ACTION_ENABLE_VOLUME : MPI_RAID_ACTION_DISABLE_VOLUME, /*data*/0, /*addr*/0, /*len*/0, - /*write*/FALSE, /*wait*/TRUE); + /*write*/FALSE, /*wait*/TRUE, /*sleep_ok*/TRUE); if (rv == ETIMEDOUT) { mpt_vol_prt(mpt, mpt_vol, mpt_enable_vol: %s Volume Timed-out\n, @@ -903,7 +903,8 @@ mpt_enable_vol(struct mpt_softc *mpt, struct mpt_r #endif static void -mpt_verify_mwce(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol) +mpt_verify_mwce(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol, +int sleep_ok) { request_t *req; struct mpt_raid_action_result *ar; @@ -950,7 +951,7 @@ static void return; } - req = mpt_get_request(mpt, /*sleep_ok*/TRUE); + req = mpt_get_request(mpt, sleep_ok); if (req == NULL) { mpt_vol_prt(mpt,
Re: mpt irq timeout problem after reboot - only if non-verbose booting !?!
-Ursprüngliche Nachricht- Von: John Baldwin j...@freebsd.org An: freebsd-stable@freebsd.org Cc: h.schmalzba...@omnilan.de Gesendet: 17.10.'12, 20:46 On Tuesday, October 16, 2012 5:24:44 am Harald Schmalzbauer wrote: Hello, I have 9.1-RC2 running in an ESXi 5.1 guest. I use 'lsisas' as virtual SCSI-Controller and mpt attaches and finds 1068E. Everything is working fine until the first 'shutdown -r now': The second boot pauses for ~2 minutes after probing disks and continues with this error: mpt0: Timedout requests already complete. Interrupts may not be functioning. To be clear, you only see this at the end of reboot, and the hardware is fine once the machine is back up? . Thanks for your attention! The timeout occurs after the first 'shutdown -r' while device probing during second boot process. Perhaps this is amd64 specific. Today I had a new i386 setup which doesn't exhibit this timeout. But it's on different hardware and hv-host was 5.0 inestead 5.1. So not really representative... Extra printfs affect the timing most likely. Are you using any RAID volumes? The only shutdown handler in mpt that looks The controller is 'virtual' SAS. But thers's been reports that also on real HW (sasuc8i) the same problem occurs. I'll try your patch tomorrow morning; timezon shift... Thanks, -Harry ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org