All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Francois Romieu <romieu@fr.zoreil.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] r8169: allocate with GFP_KERNEL flag when able to sleep
Date: Fri, 8 Oct 2010 16:52:57 +0200	[thread overview]
Message-ID: <20101008145256.GB10393@redhat.com> (raw)
In-Reply-To: <1286547901-10782-1-git-send-email-sgruszka@redhat.com>

On Fri, Oct 08, 2010 at 04:25:00PM +0200, Stanislaw Gruszka wrote:
> We have fedora bug report where driver fail to initialize after
> suspend/resume because of memory allocation errors:
> https://bugzilla.redhat.com/show_bug.cgi?id=629158

There is also one more thing to do regarding above. Calltraces from bug
reports, shows that order 3 allocation fail. On arch with 4kB pages,
order 3 mean 32kB allocation. We want to alloc 16kB, but there is also
internal sk_buff data what make that we exceed the boundary and take
32kB from allocator, getting almost 50% wastage.

To fix we can use similar method as in niu or iwlwifi drivers, alloc
pages directly form buddy allocator and attach them to skb (by
skb_add_rx_frag for example). I'm going to prepare such patch, but
I have one doubt, what happens if page size in system is bigger
than 16kB, should I care about such case? 

Stanislaw

  parent reply	other threads:[~2010-10-08 14:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 14:25 [PATCH 1/2] r8169: allocate with GFP_KERNEL flag when able to sleep Stanislaw Gruszka
2010-10-08 14:25 ` [PATCH 2/2] r8169: use device model DMA API Stanislaw Gruszka
2010-10-09  7:57   ` Eric Dumazet
2010-10-09 16:17     ` David Miller
2010-10-08 14:52 ` Stanislaw Gruszka [this message]
2010-10-08 15:04   ` [PATCH 1/2] r8169: allocate with GFP_KERNEL flag when able to sleep Eric Dumazet
2010-10-08 16:03     ` Stanislaw Gruszka
2010-10-08 16:27       ` Eric Dumazet
2010-10-09 15:59       ` [PATCH] net: introduce alloc_skb_order0 Eric Dumazet
2010-10-11 15:55         ` Stanislaw Gruszka
2010-10-11 16:05           ` Eric Dumazet
2010-10-11 21:17             ` Eric Dumazet
2010-10-16 18:53               ` David Miller
2010-10-11 16:03     ` [PATCH 1/2] r8169: allocate with GFP_KERNEL flag when able to sleep Christoph Lameter
2010-10-11 16:07       ` Eric Dumazet
2010-10-11 16:14         ` Christoph Lameter
2010-10-09  7:54 ` Eric Dumazet
2010-10-09 16:17   ` David Miller

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=20101008145256.GB10393@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.