From patchwork Wed Apr 8 21:50:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Romieu X-Patchwork-Id: 459517 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4B4281401DC for ; Thu, 9 Apr 2015 07:51:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754378AbbDHVvG (ORCPT ); Wed, 8 Apr 2015 17:51:06 -0400 Received: from violet.fr.zoreil.com ([92.243.8.30]:57867 "EHLO violet.fr.zoreil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073AbbDHVvF (ORCPT ); Wed, 8 Apr 2015 17:51:05 -0400 Received: from violet.fr.zoreil.com (localhost [127.0.0.1]) by violet.fr.zoreil.com (8.14.5/8.14.5) with ESMTP id t38LoqRb025333; Wed, 8 Apr 2015 23:50:52 +0200 Received: (from romieu@localhost) by violet.fr.zoreil.com (8.14.5/8.14.5/Submit) id t38LopjG025332; Wed, 8 Apr 2015 23:50:51 +0200 Date: Wed, 8 Apr 2015 23:50:51 +0200 From: Francois Romieu To: Nix Cc: netdev@vger.kernel.org, "David S. Miller" , rl@hellgate.ch, Bjarke Istrup Pedersen Subject: Re: [PATCH RFT net-next #2 0/6] via-rhine receive buffers rework Message-ID: <20150408215051.GA25326@electric-eye.fr.zoreil.com> References: <87vbh6364u.fsf@spindle.srvr.nix> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87vbh6364u.fsf@spindle.srvr.nix> X-Organisation: Land of Sunshine Inc. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Nix : [...] > I am sorry to report that I just had a watchdog-triggered autoreboot > during testing of this patch series :( with no log messages of any kind. > looks like the underlying bug is still there, or another bug with the > same symptoms (i.e. some way to crash inside the rx handler). I qwish I > could get some debugging output when this happens! You may add the patch below on top of the current stack. I don't expect much difference. Increasing RX_RING_SIZE could be a different story. Did you keep netconsole disabled and did you increse via-rhine verbosity level ? No shared IRQ ? > However, to give some good news, CPU usage is much lower than before the > patch: si ~10%, rather than ~80% with spikes of full CPU usage: > ksoftirqd's CPU usage is steady at about 3% rather than 40--60% with > spikes to 100%, and some of that will be USB interrupts from the > continuous USB traffic from my entropy key. Huuuuh ? Which entropy key ? --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c index 3e6fdbb..d441d8c 100644 --- a/drivers/net/ethernet/via/via-rhine.c +++ b/drivers/net/ethernet/via/via-rhine.c @@ -1849,7 +1849,7 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb, netdev_sent_queue(dev, skb->len); /* lock eth irq */ - wmb(); + dma_wmb(); rp->tx_ring[entry].tx_status |= cpu_to_le32(DescOwn); wmb(); @@ -1996,6 +1996,7 @@ static inline u16 rhine_get_vlan_tci(struct sk_buff *skb, int data_size) static inline void rhine_rx_vlan_tag(struct sk_buff *skb, struct rx_desc *desc, int data_size) { + dma_rmb(); if (unlikely(desc->desc_length & cpu_to_le32(DescTag))) { u16 vlan_tci; @@ -2161,6 +2162,7 @@ static void rhine_slow_event_task(struct work_struct *work) container_of(work, struct rhine_private, slow_event_task); struct net_device *dev = rp->dev; u32 intr_status; + u16 enable_mask; mutex_lock(&rp->task_lock); @@ -2176,7 +2178,12 @@ static void rhine_slow_event_task(struct work_struct *work) if (intr_status & IntrPCIErr) netif_warn(rp, hw, dev, "PCI error\n"); - iowrite16(RHINE_EVENT & 0xffff, rp->base + IntrEnable); + napi_disable(&rp->napi); + + enable_mask = ioread16(rp->base + IntrEnable) | RHINE_EVENT_SLOW; + iowrite16(enable_mask, rp->base + IntrEnable); + + napi_enable(&rp->napi); out_unlock: mutex_unlock(&rp->task_lock);