[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02874ECE860811409154E81DA85FBB58565F1520@ORSMSX104.amr.corp.intel.com>
Date: Wed, 18 Sep 2013 23:24:12 +0000
From: "Keller, Jacob E" <jacob.e.keller@...el.com>
To: Francois Romieu <romieu@...zoreil.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Duyck, Alexander H" <alexander.h.duyck@...el.com>,
Hyong-Youb Kim <hykim@...i.com>,
"Dmitry Kravkov" <dmitry@...adcom.com>,
Amir Vadai <amirv@...lanox.com>,
"Eliezer Tamir" <eliezer.tamir@...ux.intel.com>
Subject: RE: [PATCH net RFC 2/2] ixgbe: fix sleep bug caused by napi_disable
inside local_bh_disable()d context
> -----Original Message-----
> From: Francois Romieu [mailto:romieu@...zoreil.com]
> Sent: Wednesday, September 18, 2013 4:10 PM
> To: Keller, Jacob E
> Cc: netdev@...r.kernel.org; Duyck, Alexander H; Hyong-Youb Kim;
> Dmitry Kravkov; Amir Vadai; Eliezer Tamir
> Subject: Re: [PATCH net RFC 2/2] ixgbe: fix sleep bug caused by
> napi_disable inside local_bh_disable()d context
>
> Jacob Keller <jacob.e.keller@...el.com> :
> > This patch fixes a bug caused by calling napi_disable after
> local_bh_disable.
> > It is possible for napi_disable to sleep, (though not guarunteed) so it
> could
> > cause an atomic sleep bug during the schedule() call in msleep. This
> patch
> > resolves the issue by moving the local_bh_disable() calls inside the for
> loop
> > in ixgbe_napi_disable_all().
>
> Why couldn't you take mdelay(1) outside of the locally disabled bh
> section ?
I actually am not sure. Originally the local_bh_disable was put around the entire for loop, over all of the
napi_disable and the qv_lock_napi code.
I know that we need local_bh_disable around the qv_lock_napi code because it uses spin_lock instead
of spin_lock_bh. I believe the reason we need bh disabled around the entire context is so that the small
window between failed calls to qv_lock_napi don't get interrupted and continue to have busy_poll lock
the q_vector over and over.
I have to move the local_bh_disable in order to put napi_disable outside of the call since napi_disable
could sleep, causing a scheduling while atomic BUG.
Regards, Jake
>
> --
> Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists