From: Felix Fietkau <nbd@openwrt.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
Hauke Mehrtens <hauke@hauke-m.de>
Subject: Re: [PATCH v4 2/9] bgmac: leave interrupts disabled as long as there is work to do
Date: Mon, 13 Apr 2015 17:44:04 +0200 [thread overview]
Message-ID: <552BE444.8040906@openwrt.org> (raw)
In-Reply-To: <CACna6rzASVB-j8TxDzybC5FC+BhJFA-3e9LGTXqfP8FgSnH0bA@mail.gmail.com>
On 2015-04-13 17:06, Rafał Miłecki wrote:
> On 13 April 2015 at 17:03, Felix Fietkau <nbd@openwrt.org> wrote:
>> On 2015-04-13 16:34, Rafał Miłecki wrote:
>>> On 13 April 2015 at 15:52, Felix Fietkau <nbd@openwrt.org> wrote:
>>>> Always poll rx and tx during NAPI poll instead of relying on the status
>>>> of the first interrupt. This prevents bgmac_poll from leaving unfinished
>>>> work around until the next IRQ.
>>>> In my tests this makes bridging/routing throughput under heavy load more
>>>> stable and ensures that no new IRQs arrive as long as bgmac_poll uses up
>>>> the entire budget.
>>>
>>> What do you think about keeping u32 int_status; and just updating it
>>> at the end of bgmac_poll? In case you decide to implement multiple TX
>>> queues, it may be cheaper to just check a single bit in memory instead
>>> reading DMA ring status.
>> Events might arrive in the mean time. I ran some tests, and not checking
>> the irq status for processing rx/tx gave me fewer total IRQs under load.
>
> But you do check the status, I mean the following line:
> if (bgmac_read(bgmac, BGMAC_INT_STATUS) & (BGMAC_IS_TX0 | BGMAC_IS_RX))
>
> Would it make sense to do
> bgmac->int_status = bgmac_read(bgmac, BGMAC_INT_STATUS);
I don't really see the point in storing the status from the initial IRQ.
The check there is only to decide whether the poll function should run
at all. By the time bgmac_poll is called, more events may have arrived
already, making the initial status useless.
- Felix
next prev parent reply other threads:[~2015-04-13 15:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 13:52 [PATCH v4 1/9] bgmac: simplify tx ring index handling Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 2/9] bgmac: leave interrupts disabled as long as there is work to do Felix Fietkau
2015-04-13 14:34 ` Rafał Miłecki
2015-04-13 15:03 ` Felix Fietkau
2015-04-13 15:06 ` Rafał Miłecki
2015-04-13 15:44 ` Felix Fietkau [this message]
2015-04-13 16:35 ` Rafał Miłecki
2015-04-13 13:52 ` [PATCH v4 3/9] bgmac: set received skb headroom to NET_SKB_PAD Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 4/9] bgmac: simplify rx DMA error handling Felix Fietkau
2015-04-13 14:53 ` Rafał Miłecki
2015-04-13 15:05 ` Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 5/9] bgmac: add check for oversized packets Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 6/9] bgmac: increase rx ring size from 511 to 512 Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 7/9] bgmac: simplify dma init/cleanup Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 8/9] bgmac: fix DMA rx corruption Felix Fietkau
2015-04-13 13:52 ` [PATCH v4 9/9] bgmac: drop ring->num_slots Felix Fietkau
2015-04-13 14:21 ` [PATCH v4 1/9] bgmac: simplify tx ring index handling Rafał Miłecki
2015-04-13 15:01 ` Felix Fietkau
2015-04-13 18:05 ` Rafał Miłecki
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=552BE444.8040906@openwrt.org \
--to=nbd@openwrt.org \
--cc=hauke@hauke-m.de \
--cc=netdev@vger.kernel.org \
--cc=zajec5@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).