From: Brian Norris <briannorris@chromium.org>
To: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
Larry Finger <Larry.Finger@lwfinger.net>,
David Laight <David.Laight@aculab.com>,
Christoph Hellwig <hch@infradead.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
"<netdev@vger.kernel.org>" <netdev@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
linux@endlessm.com, Daniel Drake <drake@endlessm.com>,
stable <stable@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] rtw88: pci: Rearrange the memory usage for skb in RX ISR
Date: Thu, 15 Aug 2019 13:25:46 -0700 [thread overview]
Message-ID: <CA+ASDXOgCHzAfyQDAGhkFZMO4UaXfrnpkN9a95jzfQY_L+EbAg@mail.gmail.com> (raw)
In-Reply-To: <20190710083825.7115-1-jian-hong@endlessm.com>
Hi all,
I realize this already is merged, and it had some previous review
comments that led to the decisions in this patch, but I'd still like
to ask here, where I think I'm reaching the relevant parties:
On Wed, Jul 10, 2019 at 1:43 AM Jian-Hong Pan <jian-hong@endlessm.com> wrote:
...
> This patch allocates a new, data-sized skb first in RX ISR. After
> copying the data in, we pass it to the upper layers. However, if skb
> allocation fails, we effectively drop the frame. In both cases, the
> original, full size ring skb is reused.
>
> In addition, by fixing the kernel crash, the RX routine should now
> generally behave better under low memory conditions.
>
> Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=204053
> Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
> Cc: <stable@vger.kernel.org>
> ---
> v2:
> - Allocate new data-sized skb and put data into it, then pass it to
> mac80211. Reuse the original skb in RX ring by DMA sync.
Is it really wise to force an extra memcpy() for *every* delivery?
Isn't there some other strategy that could be used to properly handle
low-memory scenarios while still passing the original buffer up to
higher layers most of the time? Or is it really so bad to keep
re-allocating RTK_PCI_RX_BUF_SIZE (>8KB) of contiguous memory, to
re-fill the RX ring? And if that is so bad, can we reduce the
requirement for contiguous memory instead? (e.g., keep with smaller
buffers, and perform aggregation / scatter-gather only for frames that
are really larger?)
Anyway, that's mostly a long-term thought, as this patch is good for
fixing the important memory errors, even if it's not necessarily the
ideal solution.
Regards,
Brian
next prev parent reply other threads:[~2019-08-15 20:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 6:32 [PATCH] rtw88/pci: Rearrange the memory usage for skb in RX ISR Jian-Hong Pan
2019-07-08 7:23 ` Tony Chuang
2019-07-08 8:07 ` Jian-Hong Pan
2019-07-08 9:00 ` Tony Chuang
2019-07-08 9:18 ` David Laight
2019-07-08 8:36 ` David Laight
2019-07-08 18:01 ` Larry Finger
2019-07-09 10:20 ` [PATCH v2 1/2] rtw88: pci: " Jian-Hong Pan
2019-07-10 8:36 ` Tony Chuang
2019-07-10 8:54 ` Jian-Hong Pan
2019-07-09 10:21 ` [PATCH v2 2/2] rtw88: pci: Use DMA sync instead of remapping " Jian-Hong Pan
2019-07-09 16:15 ` Christoph Hellwig
2019-07-10 8:38 ` [PATCH v3 1/2] rtw88: pci: Rearrange the memory usage for skb " Jian-Hong Pan
2019-07-10 8:57 ` David Laight
2019-07-11 3:50 ` Jian-Hong Pan
2019-07-11 5:24 ` [PATCH v4 " Jian-Hong Pan
2019-07-11 5:24 ` [PATCH v4 2/2] rtw88: pci: Use DMA sync instead of remapping " Jian-Hong Pan
2019-07-11 5:30 ` Jian-Hong Pan
2019-07-11 5:28 ` [PATCH v4 1/2] rtw88: pci: Rearrange the memory usage for skb " Jian-Hong Pan
2019-07-24 6:13 ` Jian-Hong Pan
2019-07-24 11:49 ` Kalle Valo
2019-08-15 20:25 ` Brian Norris [this message]
2019-07-10 8:38 ` [PATCH v3 2/2] rtw88: pci: Use DMA sync instead of remapping " Jian-Hong Pan
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=CA+ASDXOgCHzAfyQDAGhkFZMO4UaXfrnpkN9a95jzfQY_L+EbAg@mail.gmail.com \
--to=briannorris@chromium.org \
--cc=David.Laight@aculab.com \
--cc=Larry.Finger@lwfinger.net \
--cc=davem@davemloft.net \
--cc=drake@endlessm.com \
--cc=hch@infradead.org \
--cc=jian-hong@endlessm.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yhchuang@realtek.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).