From: Ben Greear <greearb@candelatech.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>,
Johannes Berg <johannes@sipsolutions.net>,
"ath9k-devel@venema.h4ckr.net" <ath9k-devel@venema.h4ckr.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [ath9k-devel] [PATCH 1/3] ath9k: Decrease skb size to fit into one page.
Date: Fri, 07 Jan 2011 14:20:45 -0800 [thread overview]
Message-ID: <4D2791BD.7050502@candelatech.com> (raw)
In-Reply-To: <1294432018.2709.2.camel@edumazet-laptop>
On 01/07/2011 12:26 PM, Eric Dumazet wrote:
> Le vendredi 07 janvier 2011 à 12:09 -0800, Luis R. Rodriguez a écrit :
>> On Fri, Jan 07, 2011 at 10:34:52AM -0800, Ben Greear wrote:
>>> On 01/07/2011 02:58 AM, Johannes Berg wrote:
>>>> On Thu, 2011-01-06 at 16:46 -0800, greearb@candelatech.com wrote:
>>>>> From: Ben Greear<greearb@candelatech.com>
>>>>>
>>>>> Patch is from Eric Dumazet, as described here:
>>>>> https://patchwork.kernel.org/patch/104271/
>>>>>
>>>>> Reported-by: Michael Guntsche<mike@it-loops.com>
>>>>> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
>>>>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>>>>> ---
>>>>>
>>>>> NOTE: This needs review by ath9k and/or other informed
>>>>> people.
>>>>
>>>> This doesn't make sense. It might help, but it'll probably lead to not
>>>> being able to receive all frames off the air.
>>>>
>>>> If this is an issue, ath9k should do paged RX like iwlwifi.
>>>
>>> Ok, I backed this out..but now I'm back to getting buffer allocation
>>> failures (and this is on a system with 2GB RAM).
>>>
>>> Seems it's coming from mac80211 instead of ath9k, at least most of
>>> the time (I'm using 60 stations, so it probably needs to make lots of
>>> copies in the rx path). The traffic I'm generating/receiving is 1024 byte UDP
>>> payloads.
>>>
>>> Does this mean I really received a packet that was 3872 bytes long,
>>> or is the skb_copy allocating/copying empty data?
>>
>> Good question. The buffer we setup for DMA should be large since we
>> need to support AMSDU RX up to a certain bytes of RX data for the frame.
>> Harwdware should tell us the right size for the RX'd data and the skb
>> should be set with that size, respectively. Following this logic,
>> skb_copy() should only allocate on the order of the required skb->len.
>>
>> Remember that trick we did to force the older memory leak issues by
>> forcing an skb_copy() on every RX'd frame and then just discarding that
>> buffer immediately? You can try to do the same and print the skb->len
>> there, just to check what's going on.
>
>
> Using skb_copy() is wrong then, since it makes a copy (order-1
> allocations)
>
> It should use :
> skb_alloc( actual_size_of_frame not the 3840 thing ...)
> copy(data)
We need the extra stuff copied too I think (like skb->cb).
If you could provide a bit more complete example code, I'll be happy
to test it...
Thanks,
Ben
>
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2011-01-07 22:20 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 0:46 [PATCH 1/3] ath9k: Decrease skb size to fit into one page greearb
2011-01-07 0:46 ` [PATCH 2/3] ath9k: Re-start xmit logic in xmit watchdog timer greearb
2011-01-07 6:51 ` Vasanthakumar Thiagarajan
2011-01-07 7:16 ` Ben Greear
2011-01-07 15:11 ` [ath9k-devel] " Peter Stuge
2011-01-07 15:19 ` Ben Greear
2011-01-07 15:20 ` Vasanthakumar Thiagarajan
2011-01-07 0:46 ` [PATCH 3/3] ath9k: Keep track of stations for debugfs greearb
2011-01-07 2:30 ` [ath9k-devel] " Luis R. Rodriguez
2011-01-07 2:45 ` Ben Greear
2011-01-07 2:49 ` Luis R. Rodriguez
2011-01-07 3:17 ` Ben Greear
2011-01-07 15:36 ` Peter Stuge
2011-01-07 15:52 ` Ben Greear
2011-01-07 20:01 ` Luis R. Rodriguez
2011-01-07 20:25 ` Luis R. Rodriguez
2011-01-07 20:30 ` Luis R. Rodriguez
2011-01-07 19:46 ` Luis R. Rodriguez
2011-01-07 2:45 ` Felix Fietkau
2011-01-07 2:48 ` Ben Greear
2011-01-07 0:57 ` [ath9k-devel] [PATCH 1/3] ath9k: Decrease skb size to fit into one page Luis R. Rodriguez
2011-01-07 1:03 ` Ben Greear
2011-01-07 1:04 ` Christian Lamparter
2011-01-07 1:23 ` Eric Dumazet
2011-01-07 1:57 ` Luis R. Rodriguez
2011-01-07 2:07 ` Eric Dumazet
2011-01-07 2:13 ` Luis R. Rodriguez
2011-01-07 2:24 ` Eric Dumazet
2011-01-07 2:33 ` Eric Dumazet
2011-01-07 10:58 ` Johannes Berg
2011-01-07 18:34 ` Ben Greear
2011-01-07 20:09 ` [ath9k-devel] " Luis R. Rodriguez
2011-01-07 20:26 ` Eric Dumazet
2011-01-07 22:20 ` Ben Greear [this message]
2011-01-07 22:26 ` Eric Dumazet
2011-01-07 22:46 ` Ben Greear
2011-01-09 9:34 ` Johannes Berg
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=4D2791BD.7050502@candelatech.com \
--to=greearb@candelatech.com \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=eric.dumazet@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.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;
as well as URLs for NNTP newsgroup(s).