From: Felix Fietkau <nbd@openwrt.org>
To: Adrian Chadd <adrian@freebsd.org>
Cc: voncken <cedric.voncken@acksys.fr>,
Mohammed Shafi <shafi.wireless@gmail.com>,
linux-wireless@vger.kernel.org
Subject: Re: [RFC] ATH9K: infinite loop in Tasklet
Date: Wed, 02 Jan 2013 21:48:03 +0100 [thread overview]
Message-ID: <50E49D03.60207@openwrt.org> (raw)
In-Reply-To: <CAJ-VmomkzNgSyicAwcj_TWg24v-DH+Q7U6ifXFFognx-7nEZvw@mail.gmail.com>
On 2013-01-02 9:13 PM, Adrian Chadd wrote:
> On 2 January 2013 09:15, voncken <cedric.voncken@acksys.fr> wrote:
>> Yes,
>>
>> I used an mpc8314 at 400Mhz, with 128 Mbit of RAM for my test.
>
> Ah!
>
>> To find it, I measured the time elapsing in ath_rxbuf_alloc(..) with
>> the kernel function local_clock().
>>
>> With SLOB I found around 123 us (and I have an infinite loop in
>> ath9k tasklet, because when I have consumed one packet the next packet is
>> ready to rx process)
>> With SLAB I found around 22 us
>> With SLUB I found around 10 us
>
> Cool. That's significantly more CPU.. :-)
>
> So yes, the right thing to do here is to break out after a limit is
> reached, and if we hit that limit, re-schedule that tasklet to run.
I don't think it's worth adding such a band-aid. NAPI handles this much
better, as the network stack specifies a limit for the number of frames
to be accepted and doesn't poll if it doesn't have room for more, thus
solving this in a much better way.
- Felix
next prev parent reply other threads:[~2013-01-02 20:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 10:01 [RFC] ATH9K: infinite loop in Tasklet Cedric VONCKEN
2012-12-30 14:19 ` Mohammed Shafi
2013-01-01 4:20 ` Adrian Chadd
2013-01-01 15:18 ` Felix Fietkau
2013-01-01 23:40 ` Adrian Chadd
2013-01-02 13:17 ` voncken
2013-01-02 16:21 ` Adrian Chadd
2013-01-02 17:15 ` voncken
2013-01-02 20:13 ` Adrian Chadd
2013-01-02 20:48 ` Felix Fietkau [this message]
2013-01-02 23:12 ` Adrian Chadd
2013-01-02 23:22 ` Felix Fietkau
2013-01-03 1:36 ` Adrian Chadd
-- strict thread matches above, loose matches on Subject: below --
2012-12-07 15:27 Cedric VONCKEN
2012-12-07 13:52 Cedric VONCKEN
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=50E49D03.60207@openwrt.org \
--to=nbd@openwrt.org \
--cc=adrian@freebsd.org \
--cc=cedric.voncken@acksys.fr \
--cc=linux-wireless@vger.kernel.org \
--cc=shafi.wireless@gmail.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).