From: "Li,Rongqing" <lirongqing@baidu.com>
To: Yunsheng Lin <linyunsheng@huawei.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"saeedm@mellanox.com" <saeedm@mellanox.com>
Subject: 答复: [PATCH] page_pool: mark unbound node page as reusable pages
Date: Thu, 5 Dec 2019 01:22:14 +0000 [thread overview]
Message-ID: <e6463d9fac9c4fcd884508a3809071da@baidu.com> (raw)
In-Reply-To: <d7836d35-ba21-69ab-8aba-457b2da6ffa1@huawei.com>
> -----邮件原件-----
> 发件人: Yunsheng Lin [mailto:linyunsheng@huawei.com]
> 发送时间: 2019年12月5日 8:55
> 收件人: Li,Rongqing <lirongqing@baidu.com>; netdev@vger.kernel.org;
> saeedm@mellanox.com
> 主题: Re: [PATCH] page_pool: mark unbound node page as reusable pages
>
> On 2019/12/4 18:14, Li RongQing wrote:
> > some drivers uses page pool, but not require to allocate page from
> > bound node, so pool.p.nid is NUMA_NO_NODE, and this fixed patch will
> > block this kind of driver to recycle
> >
> > Fixes: d5394610b1ba ("page_pool: Don't recycle non-reusable pages")
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> > Cc: Saeed Mahameed <saeedm@mellanox.com>
> > ---
> > net/core/page_pool.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/net/core/page_pool.c b/net/core/page_pool.c index
> > a6aefe989043..4054db683178 100644
> > --- a/net/core/page_pool.c
> > +++ b/net/core/page_pool.c
> > @@ -317,7 +317,9 @@ static bool __page_pool_recycle_direct(struct page
> *page,
> > */
> > static bool pool_page_reusable(struct page_pool *pool, struct page
> > *page) {
> > - return !page_is_pfmemalloc(page) && page_to_nid(page) == pool->p.nid;
> > + return !page_is_pfmemalloc(page) &&
> > + (page_to_nid(page) == pool->p.nid ||
> > + pool->p.nid == NUMA_NO_NODE);
>
> If I understand it correctly, you are allowing recycling when
> pool->p.nid is NUMA_NO_NODE, which does not seems match the commit
> log: "this fixed patch will block this kind of driver to recycle".
>
> Maybe you mean "commit d5394610b1ba" by this fixed patch?
>
I maybe should change the commit header as below:
page_pool: take unbound numa node allocated pages as reusable
some drivers uses page pool, but not require to allocate
page from bound node, so pool.p.nid is NUMA_NO_NODE, and
the commit d5394610b1ba ("page_pool: Don't recycle
non-reusable pages") will block this kind of driver to
recycle
Fixes: d5394610b1ba ("page_pool: Don't recycle non-reusable pages")
Thanks
-RongQing
> Also, maybe it is better to allow recycling if the below condition is matched:
>
> pool->p.nid == NUMA_NO_NODE && page_to_nid(page) ==
> numa_mem_id()
>
> > }
> >
> > void __page_pool_put_page(struct page_pool *pool, struct page *page,
> >
prev parent reply other threads:[~2019-12-05 1:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 10:14 [PATCH] page_pool: mark unbound node page as reusable pages Li RongQing
2019-12-05 0:55 ` Yunsheng Lin
2019-12-05 1:08 ` 答复: " Li,Rongqing
2019-12-05 1:43 ` Yunsheng Lin
2019-12-05 1:55 ` 答复: " Li,Rongqing
2019-12-05 2:06 ` Yunsheng Lin
2019-12-05 2:17 ` 答复: " Li,Rongqing
2019-12-05 2:30 ` Yunsheng Lin
2019-12-05 2:47 ` 答复: " Li,Rongqing
2019-12-05 3:03 ` Yunsheng Lin
2019-12-05 3:18 ` 答复: " Li,Rongqing
2019-12-05 3:33 ` Yunsheng Lin
2019-12-06 8:05 ` 答复: " Li,Rongqing
2019-12-05 1:22 ` Li,Rongqing [this message]
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=e6463d9fac9c4fcd884508a3809071da@baidu.com \
--to=lirongqing@baidu.com \
--cc=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.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).