From: "Ville Syrjälä" <ville.syrjala@linux•intel.com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: Eric Dumazet <edumazet@google•com>,
"David S. Miller" <davem@davemloft•net>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [regression v4.11] 617f01211baf ("8139too: use napi_complete_done()")
Date: Mon, 10 Apr 2017 15:11:02 +0300 [thread overview]
Message-ID: <20170410121102.GM30290@intel.com> (raw)
In-Reply-To: <1491590329.10124.86.camel@edumazet-glaptop3.roam.corp.google.com>
On Fri, Apr 07, 2017 at 11:38:49AM -0700, Eric Dumazet wrote:
> On Fri, 2017-04-07 at 21:17 +0300, Ville Syrjälä wrote:
> > Hi,
> >
> > My old P3 laptop started to die on me in the middle of larger compile
> > jobs (using distcc) after v4.11-rc<something>. I bisected the problem
> > to 617f01211baf ("8139too: use napi_complete_done()").
> >
> > Unfortunately I wasn't able to capture a full oops as the machine doesn't
> > have serial and ramoops failed me. I did get one partial oops on vgacon
> > which showed rtl8139_poll() being involved (EIP was around
> > _raw_spin_unlock_irqrestore() supposedly), so seems to agree with my
> > bisect result.
> >
> > So maybe some kind of nasty thing going between the hard irq and
> > softirq? Perhaps UP related? I tried to stare at the locking around
> > rtl8139_poll() for a while but it looked mostly sane to me.
> >
>
> Thanks a lot for the detective work, I am so sorry for this !
>
> Could you try the following patch ?
>
> I do not really see what could be wrong, the code should run just fine
> on UP.
>
> Thanks.
>
> diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
> index 89631753e79962d91456d93b71929af768917da1..cd2dbec331dd796f5296cd378561b3443f231673 100644
> --- a/drivers/net/ethernet/realtek/8139too.c
> +++ b/drivers/net/ethernet/realtek/8139too.c
> @@ -2135,11 +2135,12 @@ static int rtl8139_poll(struct napi_struct *napi, int budget)
> if (likely(RTL_R16(IntrStatus) & RxAckBits))
> work_done += rtl8139_rx(dev, tp, budget);
>
> - if (work_done < budget && napi_complete_done(napi, work_done)) {
> + if (work_done < budget) {
> unsigned long flags;
>
> spin_lock_irqsave(&tp->lock, flags);
> - RTL_W16_F(IntrMask, rtl8139_intr_mask);
> + if (napi_complete_done(napi, work_done))
> + RTL_W16_F(IntrMask, rtl8139_intr_mask);
> spin_unlock_irqrestore(&tp->lock, flags);
> }
> spin_unlock(&tp->rx_lock);
>
>
Yep, that patch does appear to make it stable again.
Tested-by: Ville Syrjälä <ville.syrjala@linux•intel.com>
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2017-04-10 12:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 18:17 [regression v4.11] 617f01211baf ("8139too: use napi_complete_done()") Ville Syrjälä
2017-04-07 18:38 ` Eric Dumazet
2017-04-07 18:42 ` David Miller
2017-04-08 10:23 ` Francois Romieu
2017-04-10 14:22 ` tedheadster
2017-04-10 14:55 ` Eric Dumazet
2017-04-10 12:11 ` Ville Syrjälä [this message]
2017-09-18 19:46 ` Ville Syrjälä
2017-09-18 19:52 ` Eric Dumazet
2017-09-19 12:45 ` Ville Syrjälä
2017-09-19 13:51 ` Eric Dumazet
2017-09-18 20:03 ` [PATCH net] 8139too: revisit napi_complete_done() usage Eric Dumazet
2017-09-19 3:57 ` David Miller
2018-01-22 17:27 ` tedheadster
2018-01-22 19:03 ` Eric Dumazet
2017-06-19 14:44 ` [regression v4.11] 617f01211baf ("8139too: use napi_complete_done()") Michal Kubecek
2017-07-05 19:53 ` Ville Syrjälä
2017-04-21 11:40 ` Ville Syrjälä
2017-04-21 13:29 ` Eric Dumazet
2017-04-21 15:09 ` Eric Dumazet
2017-04-21 15:34 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170410121102.GM30290@intel.com \
--to=ville.syrjala@linux$(echo .)intel.com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox