Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: romieu@fr.zoreil.com, sgruszka@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2 -next] r8169: allocate with GFP_KERNEL flag when able to sleep
Date: Sat, 25 Sep 2010 11:12:25 +0200	[thread overview]
Message-ID: <1285405945.2478.255.camel@edumazet-laptop> (raw)
In-Reply-To: <20100925.001300.193725148.davem@davemloft.net>

Le samedi 25 septembre 2010 à 00:13 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Sat, 25 Sep 2010 08:06:37 +0200
> 
> > Patch solves the suspend/resume, probably, but as soon as we receive
> > trafic, we can hit the allocation error anyway...
> 
> It allocates 1536 + N, where N can be NET_IP_ALIGN, or some small
> value like 8.
> 
> This is in the same ballpark as what tg3 allocates for RX buffers.
> 
> SLAB/SLUB/whatever just wants multi-order page allocations even
> for SKBs which are about this size.
> 
> Furthermore, the sleeping allocations we do at ->open() time to
> allocate the entire RX ring all at once will buddy up a lot of
> pages and make 1-order allocs more likely.

Yes, I forgot this problem about SLUB (I ended using SLAB on servers
because of this order-3 problem on kmalloc(2048))

bnx2 uses GFP_KERNEL allocations at init time, but tg3 uses GFP_ATOMIC
(because tp->lock is held).

The r8169 current problem is its currently copying all incoming frames.
I guess nobody cares or noticed the performance drop.
(But commit c0cd884a is recent (2.6.34), this is not yet in
production...)





  reply	other threads:[~2010-09-25  9:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 12:01 [PATCH 1/2 -next] r8169: allocate with GFP_KERNEL flag when able to sleep Stanislaw Gruszka
2010-09-23 12:01 ` [PATCH 2/2 -next] r8169: use device model DMA API Stanislaw Gruszka
2010-09-23 14:59   ` Denis Kirjanov
2010-09-23 15:23     ` Stanislaw Gruszka
2010-09-23 21:20 ` [PATCH 1/2 -next] r8169: allocate with GFP_KERNEL flag when able to sleep Francois Romieu
2010-09-24 11:18   ` Stanislaw Gruszka
2010-09-24 22:24     ` Francois Romieu
2010-09-25  5:37       ` David Miller
2010-09-25  6:06         ` Eric Dumazet
2010-09-25  7:13           ` David Miller
2010-09-25  9:12             ` Eric Dumazet [this message]
2010-09-25 23:33               ` Ben Hutchings
2010-09-26  6:09                 ` Eric Dumazet
2010-09-26 12:46                   ` Ben Hutchings

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=1285405945.2478.255.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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