Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #53548

Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped

From Bjørn Mork <bjorn@mork.no>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped
Date 2016-04-11 15:10 +0200
Message-ID <rmJLj-6qZ-1@gated-at.bofh.it> (permalink)
References <rms7M-CA-13@gated-at.bofh.it> <rmFeH-2HC-33@gated-at.bofh.it> <rmFeH-2HC-31@gated-at.bofh.it> <rmIcy-51x-5@gated-at.bofh.it>
Organization m

Cross-posted to 2 groups.

Show all headers | View raw


Ben Hutchings <ben@decadent.org.uk> writes:
> On Mon, 2016-04-11 at 09:55 +0200, Bjørn Mork wrote:
>> Ben Hutchings <ben@decadent.org.uk> writes:
>> > 
>> > On Sun, 2016-04-10 at 11:15 -0700, Vagrant Cascadian wrote:
>> > > 
>> > > It works for the most part, but floods syslog with messages:
>> > > 
>> > > [501966.870273] net_ratelimit: 35702 callbacks suppressed
>> > > [501966.875438] smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped
>> > > 
>> > > It seems to function ok, though I'm not sure if there's degraded
>> > > network performance...
>> > [...]
>> > 
>> > I understand network performance on all RPi models is poor due to lack
>> > of a built-in Ethernet MAC and the poor design of the USB interface.
>> > Also that message is a generic error message from the usbnet core and
>> > is not specific to the smsc95xx driver.
>> Yes, kevent 2 is "EVENT_RX_MEMORY", and this error affects any usbnet
>> based device under memory pressure.  The usbnet framework just doesn't
>> handle the case where GFP_KERNEL allocations fail. How could it? 
>
> What I don't understand, given this, is why Vagrant didn't report any
> OOM warnings.  (I wondered whether the __GFP_NOWARN flag was wrongly
> being added somewhere, but I don't see that.)

Maybe I'm wrong?  Looking at this again, I notice that rx_submit()
always will call usb_submit_urb(urb, GFP_ATOMIC) regardless of the input
mem_flags, because it's holding a spinlock when submitting the urb.  So
it doesn't necessarily help much that the urb and skb are allocated with
GFP_KERNEL.

Exactly what allocations usb_submit_urb() may end up with seems to be
depending on the host controller. So the error spam could very well be
caused by a problematic host controller.  At least partly.

>> The only viable "fix" I can see is by preallocating and recycling all
>> buffers instead of the repeated allocations done by usbnet now.  But
>> that's a major refactoring of usbnet.
>> 
>> The log message spam could of course be fixed, but the rate-limiting is
>> "good enough".
>
> How is anyone supposed to know what "kevent 2" is though?

By looking it up in include/linux/usb/usbnet.h :)

Yes, that could certainly be improved by translating the number back to
a readable description.  

> The drivers that support batching into large RX buffers should
> automatically fall back to smaller buffers if this happens, or whenever
> they're running on a small (for some definition of small) machine.  I
> understand that the dynamic fallback may be tricky though.

I don't think the smsc95xx use any large buffers.  Looks like it's an
ethernet packet + 12 bytes.  And usbnet limits the total rx queue to
60 * 1518 bytes.


Bjørn

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-04-10 20:20 +0200
  Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-04-10 21:20 +0200
    Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-04-10 22:30 +0200
    Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Diederik de Haas <didi.debian@cknow.org> - 2016-04-10 23:00 +0200
      Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-04-11 02:20 +0200
        Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-04-11 03:10 +0200
          Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-04-11 17:20 +0200
          Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-04-13 20:50 +0200
            Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-04-28 17:20 +0200
              Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Diederik de Haas <didi.debian@cknow.org> - 2016-04-28 17:40 +0200
                Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-04-28 18:20 +0200
              Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-05-02 03:30 +0200
                Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-05-02 21:00 +0200
                Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-05-03 06:10 +0200
                Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Vagrant Cascadian <vagrant@debian.org> - 2016-05-03 18:20 +0200
                Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-05-07 13:50 +0200
                Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Diederik de Haas <didi.debian@cknow.org> - 2016-05-07 14:10 +0200
  Processed: Re: Bug#820622: linux-image-4.5.0-trunk-armmp-lpae:  raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped owner@bugs.debian.org (Debian Bug Tracking System) - 2016-04-10 21:20 +0200
  Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Bjørn Mork <bjorn@mork.no> - 2016-04-11 10:20 +0200
    Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Ben Hutchings <ben@decadent.org.uk> - 2016-04-11 13:30 +0200
      Bug#820622: linux-image-4.5.0-trunk-armmp-lpae: raspberry pi 2: smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped Bjørn Mork <bjorn@mork.no> - 2016-04-11 15:10 +0200
  Processed: Re: Bug#820622: linux-image-4.5.0-trunk-armmp-lpae:  raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped owner@bugs.debian.org (Debian Bug Tracking System) - 2016-04-28 17:20 +0200
  Processed: Re: Bug#820622: linux-image-4.5.0-trunk-armmp-lpae:  raspberry pi 2:  smsc95xx 1-1.1:1.0 eth0: kevent 2 may have been dropped owner@bugs.debian.org (Debian Bug Tracking System) - 2016-05-02 03:30 +0200

csiph-web