From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
To: Yanchao Yang <yanchao.yang@mediatek.com>,
Loic Poulain <loic.poulain@linaro.org>,
Johannes Berg <johannes@sipsolutions.net>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev ML <netdev@vger.kernel.org>,
kernel ML <linux-kernel@vger.kernel.org>
Cc: MTK ML <linux-mediatek@lists.infradead.org>,
Liang Lu <liang.lu@mediatek.com>,
Haijun Liu <haijun.liu@mediatek.com>,
Hua Yang <hua.yang@mediatek.com>,
Ting Wang <ting.wang@mediatek.com>,
Felix Chen <felix.chen@mediatek.com>,
Mingliang Xu <mingliang.xu@mediatek.com>,
Min Dong <min.dong@mediatek.com>,
Aiden Wang <aiden.wang@mediatek.com>,
Guohao Zhang <guohao.zhang@mediatek.com>,
Chris Feng <chris.feng@mediatek.com>,
Lambert Wang <lambert.wang@mediatek.com>,
Mingchuang Qiao <mingchuang.qiao@mediatek.com>,
Xiayu Zhang <xiayu.zhang@mediatek.com>,
Haozhe Chang <haozhe.chang@mediatek.com>,
MediaTek Corporation <linuxwwan@mediatek.com>
Subject: Re: [PATCH net-next v1 02/13] net: wwan: tmi: Add buffer management
Date: Sun, 4 Dec 2022 22:58:21 +0400 [thread overview]
Message-ID: <14db8809-6144-1d10-59e7-298079b2e6e2@gmail.com> (raw)
In-Reply-To: <20221122111152.160377-3-yanchao.yang@mediatek.com>
On 22.11.2022 15:11, Yanchao Yang wrote:
> From: MediaTek Corporation <linuxwwan@mediatek.com>
>
> To malloc I/O memory as soon as possible, buffer management comes into being.
> It creates buffer pools that reserve some buffers through deferred works when
> the driver isn't busy.
>
> The buffer management provides unified memory allocation/de-allocation
> interfaces for other modules. It supports two buffer types of SKB and page.
> Two reload work queues with different priority values are provided to meet
> various requirements of the control plane and the data plane.
>
> When the reserved buffer count of the pool is less than a threshold (default
> is 2/3 of the pool size), the reload work will restart to allocate buffers
> from the OS until the buffer pool becomes full. When the buffer pool fills,
> the OS will recycle the buffer freed by the user.
>
> Signed-off-by: Mingliang Xu <mingliang.xu@mediatek.com>
> Signed-off-by: MediaTek Corporation <linuxwwan@mediatek.com>
> ---
> drivers/net/wwan/mediatek/Makefile | 3 +-
> drivers/net/wwan/mediatek/mtk_bm.c | 369 ++++++++++++++++++++++++++++
> drivers/net/wwan/mediatek/mtk_bm.h | 79 ++++++
> drivers/net/wwan/mediatek/mtk_dev.c | 11 +-
> drivers/net/wwan/mediatek/mtk_dev.h | 1 +
> 5 files changed, 461 insertions(+), 2 deletions(-)
> create mode 100644 drivers/net/wwan/mediatek/mtk_bm.c
> create mode 100644 drivers/net/wwan/mediatek/mtk_bm.h
Yanchao, can you share some numbers, how this custom pool is outperform
the regular kernel allocator?
--
Sergey
next prev parent reply other threads:[~2022-12-04 18:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 11:11 [PATCH net-next v1 00/13] net: wwan: tmi: PCIe driver for MediaTek M.2 modem Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 01/13] net: wwan: tmi: Add PCIe core Yanchao Yang
2022-11-24 11:06 ` AngeloGioacchino Del Regno
2022-12-05 12:40 ` Yanchao Yang (杨彦超)
2022-12-05 12:47 ` AngeloGioacchino Del Regno
2022-12-26 1:43 ` Yanchao Yang (杨彦超)
2022-12-04 18:52 ` Sergey Ryazanov
2022-12-07 2:33 ` Yanchao Yang (杨彦超)
2022-12-16 20:40 ` Sergey Ryazanov
2023-01-11 13:33 ` Yanchao Yang (杨彦超)
2022-11-22 11:11 ` [PATCH net-next v1 02/13] net: wwan: tmi: Add buffer management Yanchao Yang
2022-12-04 18:58 ` Sergey Ryazanov [this message]
2022-12-09 10:26 ` Yanchao Yang (杨彦超)
2022-12-16 20:17 ` Sergey Ryazanov
2023-01-11 13:37 ` Yanchao Yang (杨彦超)
2022-11-22 11:11 ` [PATCH net-next v1 03/13] net: wwan: tmi: Add control plane transaction layer Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 04/13] net: wwan: tmi: Add control DMA interface Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 05/13] net: wwan: tmi: Add control port Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 06/13] net: wwan: tmi: Add FSM thread Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 07/13] net: wwan: tmi: Add AT & MBIM WWAN ports Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 08/13] net: wwan: tmi: Introduce data plane hardware interface Yanchao Yang
2022-11-22 11:11 ` [PATCH net-next v1 09/13] net: wwan: tmi: Add data plane transaction layer Yanchao Yang
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=14db8809-6144-1d10-59e7-298079b2e6e2@gmail.com \
--to=ryazanov.s.a@gmail.com \
--cc=aiden.wang@mediatek.com \
--cc=chris.feng@mediatek.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=felix.chen@mediatek.com \
--cc=guohao.zhang@mediatek.com \
--cc=haijun.liu@mediatek.com \
--cc=haozhe.chang@mediatek.com \
--cc=hua.yang@mediatek.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=lambert.wang@mediatek.com \
--cc=liang.lu@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linuxwwan@mediatek.com \
--cc=loic.poulain@linaro.org \
--cc=min.dong@mediatek.com \
--cc=mingchuang.qiao@mediatek.com \
--cc=mingliang.xu@mediatek.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ting.wang@mediatek.com \
--cc=xiayu.zhang@mediatek.com \
--cc=yanchao.yang@mediatek.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).