<div dir="ltr"><div>Hi Marcus,</div><div><br></div><div>ACM already has some uverbs local event handling but does not currently handle IBV_EVENT_DEVICE_FATAL. I think that event would need to be handled in acm_event_handler.</div><div><br></div><div>In terms of RDMA_CM_EVENT_DEVICE_REMOVAL, what was changed in librdmacm ? Was this fed upstream ? Within last week, there is relevant discussion thread on this event.</div><div><br></div><div>-- Hal</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 22, 2016 at 9:09 PM, Marcus Epperson <span dir="ltr"><<a href="mailto:marcus.r.epperson@gmail.com" target="_blank">marcus.r.epperson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It looks like a change to the mlx4 driver between OFED 3.12 and 3.18 broke sysrq poweroff for us, but only when ibacm is running. Here's what I see when I issue sysrq 'o':<br><br>SysRq : Power Off<br>igb 0000:02:00.1: PCI INT B disabled<br>igb 0000:02:00.0: PCI INT A disabled<br>INFO: task events/0:67 blocked for more than 120 seconds.<br> Tainted: P --------------- 2.6.32-504.16.2.el6.x86_64 #1<br>"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.<br>events/0 D 0000000000000000 0 67 2 0x00000000<br> ffff881029697b40 0000000000000046 0000000000000000 ffff881000000000<br> ffff881029697a90 ffff881029697a90 0000f1546265231e ffff881029697ae0<br> ffff88100af7e520 000000010fcaaf92 ffff881029695ad8 ffff881029697fd8<br>Call Trace:<br> [<ffffffff8152ad25>] schedule_timeout+0x215/0x2e0<br> [<ffffffff8152a9a3>] wait_for_common+0x123/0x180<br> [<ffffffff81064bc0>] ? default_wake_function+0x0/0x20<br> [<ffffffff8152aabd>] wait_for_completion+0x1d/0x20<br> [<ffffffffa037b0b3>] ib_uverbs_remove_one+0x73/0xa0 [ib_uverbs]<br> [<ffffffffa0080e5f>] ib_unregister_device+0x4f/0x100 [ib_core]<br> [<ffffffffa01354e1>] mlx4_ib_remove+0x41/0x270 [mlx4_ib]<br> [<ffffffffa00ef5d1>] mlx4_remove_device+0x71/0x90 [mlx4_core]<br> [<ffffffffa00ef633>] mlx4_unregister_device+0x43/0x90 [mlx4_core]<br> [<ffffffffa00f17ff>] mlx4_unload_one+0xdf/0x390 [mlx4_core]<br> [<ffffffff810c7e50>] ? do_poweroff+0x0/0x10<br> [<ffffffff812af4bc>] pci_device_shutdown+0x2c/0x50<br> [<ffffffff81367dfb>] device_shutdown+0x4b/0x120<br> [<ffffffff81095eb6>] kernel_shutdown_prepare+0x36/0x40<br> [<ffffffff81095ed3>] kernel_power_off+0x13/0x50<br> [<ffffffff810c7e5e>] do_poweroff+0xe/0x10<br> [<ffffffff81098090>] worker_thread+0x170/0x2a0<br> [<ffffffff8109ebb0>] ? autoremove_wake_function+0x0/0x40<br> [<ffffffff81097f20>] ? worker_thread+0x0/0x2a0<br> [<ffffffff8109e71e>] kthread+0x9e/0xc0<br> [<ffffffff8100c20a>] child_rip+0xa/0x20<br> [<ffffffff8109e680>] ? kthread+0x0/0xc0<br> [<ffffffff8100c200>] ? child_rip+0x0/0x20<br><br>The node will stay powered on indefinitely at this point, unless I kill ibacm. Once ibacm is gone, I see the expected "Power down." message and the node powers off right away.<br><br>Some of our own processes were also preventing the poweroff from happening. We had to add handing for RDMA_CM_EVENT_DEVICE_REMOVAL to get around it -- we just exit immediately when we see that. I don't know how to do the equivalent for ibacm though.<br><br>In general it seems wrong that a "power off right now" mechanism should be defeated by userspace processes like this. I thought about removing the 'shutdown' hook in our mlx4 driver, as show below, going back to how it was in OFED 3.12. Is there any downside to that, other than having to maintain my own patch forever?<br><br>Thanks for any input,<br>-Marcus<br><br><br>--- compat-rdma-3.18-1/drivers/net/ethernet/mellanox/mlx4/main.c.orig 2015-11-24 01:15:01.000000000 -0800<br>+++ compat-rdma-3.18-1/drivers/net/ethernet/mellanox/mlx4/main.c 2015-11-24 01:15:01.000000000 -0800<br><br>@@ -2951,7 +2539,6 @@ static struct pci_driver mlx4_driver = {<br> .name = DRV_NAME,<br> .id_table = mlx4_pci_table,<br> .probe = mlx4_init_one,<br>- .shutdown = mlx4_unload_one,<br> .remove = mlx4_remove_one,<br> .err_handler = &mlx4_err_handler,<br> };<br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openfabrics.org">Users@lists.openfabrics.org</a><br>
<a href="http://lists.openfabrics.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.openfabrics.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>