Neil Horman
d576a5e80c
bnx2fc: Improve stats update mechanism
...
Recently had this warning reported:
[ 290.489047] Call Trace:
[ 290.489053] [<ffffffff8169efec>] dump_stack+0x19/0x1b
[ 290.489055] [<ffffffff810ac7a9>] __might_sleep+0x179/0x230
[ 290.489057] [<ffffffff816a4ad5>] mutex_lock_nested+0x55/0x520
[ 290.489061] [<ffffffffa01b9905>] ? bnx2fc_l2_rcv_thread+0xc5/0x4c0 [bnx2fc]
[ 290.489065] [<ffffffffa0174c1a>] fc_vport_id_lookup+0x3a/0xa0 [libfc]
[ 290.489068] [<ffffffffa01b9a6c>] bnx2fc_l2_rcv_thread+0x22c/0x4c0 [bnx2fc]
[ 290.489070] [<ffffffffa01b9840>] ? bnx2fc_vport_destroy+0x110/0x110 [bnx2fc]
[ 290.489073] [<ffffffff8109e0cd>] kthread+0xed/0x100
[ 290.489075] [<ffffffff8109dfe0>] ? insert_kthread_work+0x80/0x80
[ 290.489077] [<ffffffff816b2fec>] ret_from_fork+0x7c/0xb0
[ 290.489078] [<ffffffff8109dfe0>] ? insert_kthread_work+0x80/0x80
Its due to the fact that we call a potentially sleeping function from the bnx2fc
rcv path with preemption disabled (via the get_cpu call embedded in the per-cpu
variable stats lookup in bnx2fc_l2_rcv_thread.
Easy enough fix, we can just move the stats collection later in the function
where we are sure we won't preempt or sleep. This also allows us to not have to
enable pre-emption when doing a per-cpu lookup, since we're certain not to get
rescheduled.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-25 13:29:31 +02:00
..
2014-03-19 15:04:44 -07:00
2014-06-09 18:54:06 -07:00
2013-06-04 11:15:59 -07:00
2014-03-15 10:19:19 -07:00
2014-05-28 18:14:16 +02:00
2014-06-25 13:29:05 +02:00
2014-05-19 19:12:22 +02:00
2014-06-25 13:29:31 +02:00
2014-05-07 13:15:46 +02:00
2013-11-15 16:47:22 -08:00
2014-03-15 10:19:18 -07:00
2014-06-06 07:57:37 -06:00
2014-05-19 19:12:23 +02:00
2014-05-07 13:15:46 +02:00
2014-05-19 13:33:00 +02:00
2014-04-18 12:07:24 +02:00
2014-04-18 14:20:48 +02:00
2013-09-04 13:52:35 -07:00
2014-04-01 18:49:04 -07:00
2014-06-14 19:49:48 -05:00
2014-05-19 13:30:59 +02:00
2014-05-28 18:13:24 +02:00
2014-05-28 18:13:22 +02:00
2014-06-20 08:22:39 +08:00
2014-06-06 07:57:37 -06:00
2013-04-09 14:13:21 -04:00
2014-06-25 13:29:05 +02:00
2014-06-14 19:49:48 -05:00
2014-05-28 18:13:19 +02:00
2014-04-12 18:02:16 -07:00
2014-05-28 12:25:13 +02:00
2013-11-29 08:48:39 +04:00
2013-11-29 08:48:39 +04:00
2013-11-29 08:48:39 +04:00
2012-03-28 18:30:03 +01:00
2013-01-03 15:57:01 -08:00
2013-11-26 11:09:07 +01:00
2013-11-26 11:09:07 +01:00
2013-11-26 11:09:07 +01:00
2013-10-25 11:44:54 +01:00
2014-03-19 15:04:44 -07:00
2012-06-28 11:44:36 +02:00
2013-04-09 14:13:23 -04:00
2014-05-28 12:10:43 +02:00
2014-06-09 18:54:06 -07:00
2014-05-28 12:11:08 +02:00
2013-10-14 15:26:04 +02:00
2013-10-25 09:57:57 +01:00
2013-06-26 18:32:47 -07:00
2013-01-03 15:57:01 -08:00
2013-02-27 19:10:18 -08:00
2013-07-09 22:52:29 +01:00
2013-11-15 16:47:22 -08:00
2013-01-03 15:57:01 -08:00
2013-10-25 11:40:42 +01:00
2013-10-25 11:36:26 +01:00
2014-05-28 12:10:43 +02:00
2013-04-09 14:13:17 -04:00
2014-03-19 15:04:44 -07:00
2014-03-19 15:04:44 -07:00
2013-08-01 18:08:34 -07:00
2013-08-01 18:08:34 -07:00
2013-01-03 15:57:01 -08:00
2013-06-26 18:32:47 -07:00
2014-05-28 12:05:37 +02:00
2014-05-28 12:05:37 +02:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2014-03-19 15:04:44 -07:00
2013-04-09 14:13:16 -04:00
2013-11-26 11:09:07 +01:00
2014-03-15 10:18:59 -07:00
2014-06-02 09:55:02 +02:00
2014-06-02 09:55:02 +02:00
2014-06-02 09:54:59 +02:00
2013-01-03 15:57:01 -08:00
2012-11-27 08:59:43 +04:00
2013-04-09 14:13:16 -04:00
2014-03-19 15:04:44 -07:00
2014-03-19 15:04:44 -07:00
2014-04-01 19:19:15 -07:00
2014-03-19 15:04:42 -07:00
2013-11-29 08:48:39 +04:00
2013-04-09 14:13:27 -04:00
2014-03-15 10:19:19 -07:00
2014-05-23 16:28:53 -04:00
2014-04-11 16:15:36 -04:00
2013-01-03 15:57:01 -08:00
2014-06-02 12:42:19 -07:00
2013-01-03 15:57:01 -08:00
2014-03-15 10:19:18 -07:00
2014-06-12 22:38:32 -07:00
2012-03-28 18:30:03 +01:00
2013-01-03 15:57:01 -08:00
2014-05-28 12:10:43 +02:00
2014-05-28 12:05:37 +02:00
2013-12-19 07:39:02 -08:00
2014-03-27 08:26:31 -07:00
2014-03-27 08:26:31 -07:00
2012-03-28 18:30:03 +01:00
2013-01-03 15:57:01 -08:00
2013-04-09 14:13:15 -04:00
2013-10-14 15:26:04 +02:00
2013-04-15 14:30:44 -06:00
2013-10-14 15:31:06 +02:00
2014-05-28 12:10:43 +02:00
2014-05-28 18:14:16 +02:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-06-19 17:53:35 +02:00
2014-06-06 07:57:37 -06:00
2014-03-19 15:04:44 -07:00
2014-05-28 12:05:36 +02:00
2013-12-06 08:30:18 -08:00
2013-04-09 14:13:17 -04:00
2013-01-03 15:57:01 -08:00
2014-02-27 08:07:39 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2014-05-19 19:57:31 +02:00
2013-06-24 13:00:10 -07:00
2014-06-11 08:41:17 -07:00
2014-06-11 08:41:17 -07:00
2014-04-24 13:44:54 -04:00
2014-04-10 15:30:35 -07:00
2014-04-10 15:30:35 -07:00
2013-05-31 15:16:51 -04:00
2014-04-11 17:23:52 -07:00
2014-06-06 16:08:16 -07:00
2014-04-01 18:49:04 -07:00
2014-03-15 10:19:24 -07:00
2014-06-25 13:29:30 +02:00
2014-02-20 14:54:28 +01:00
2014-05-22 15:54:03 -07:00
2012-05-10 09:06:12 +01:00
2014-03-24 10:05:30 -07:00
2014-04-11 17:23:52 -07:00
2013-11-23 22:33:50 -08:00
2014-06-09 18:54:06 -07:00
2014-03-27 08:26:33 -07:00
2014-03-27 08:26:31 -07:00
2014-06-06 07:57:37 -06:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2014-05-19 12:35:09 +02:00
2014-06-06 07:57:37 -06:00
2012-09-14 17:59:29 +01:00
2013-10-14 15:26:04 +02:00
2014-03-12 13:16:54 +04:00
2014-05-28 18:14:16 +02:00
2014-05-28 12:16:28 +02:00
2014-05-28 12:16:28 +02:00
2014-05-28 12:11:33 +02:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2014-05-28 12:05:37 +02:00
2014-05-28 12:05:37 +02:00
2013-11-15 16:47:22 -08:00
2013-10-25 11:51:37 +01:00
2014-03-19 15:04:44 -07:00
2012-03-28 18:30:03 +01:00
2014-06-12 22:38:32 -07:00
2014-03-19 15:04:46 -07:00
2014-03-19 15:04:46 -07:00
2013-04-09 14:13:15 -04:00
2013-04-09 14:13:15 -04:00
2014-03-19 15:04:44 -07:00
2013-01-03 15:57:01 -08:00
2013-11-26 11:09:07 +01:00