linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org, lirongqing@baidu.com,
	linyunsheng@huawei.com,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Saeed Mahameed <saeedm@mellanox.com>,
	peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next v4 PATCH] page_pool: handle page recycle for NUMA_NO_NODE condition
Date: Thu, 19 Dec 2019 15:52:06 +0100	[thread overview]
Message-ID: <20191219145206.GE26945@dhcp22.suse.cz> (raw)
In-Reply-To: <20191219143535.6c7bc880@carbon>

On Thu 19-12-19 14:35:35, Jesper Dangaard Brouer wrote:
> On Thu, 19 Dec 2019 13:09:25 +0100
> Michal Hocko <mhocko@kernel.org> wrote:
> 
> > On Wed 18-12-19 09:01:35, Jesper Dangaard Brouer wrote:
> > [...]
> > > For the NUMA_NO_NODE case, when a NIC IRQ is moved to another NUMA
> > > node, then ptr_ring will be emptied in 65 (PP_ALLOC_CACHE_REFILL+1)
> > > chunks per allocation and allocation fall-through to the real
> > > page-allocator with the new nid derived from numa_mem_id(). We accept
> > > that transitioning the alloc cache doesn't happen immediately.  
> 
> Oh, I just realized that the drivers usually refill several RX
> packet-pages at once, this means that this is called N times, meaning
> during a NUMA change this will result in N * 65 pages returned.
> 
> 
> > Could you explain what is the expected semantic of NUMA_NO_NODE in this
> > case? Does it imply always the preferred locality? See my other email[1] to
> > this matter.
> 
> I do think we want NUMA_NO_NODE to mean preferred locality.

I obviously have no saying here because I am not really familiar with
the users of this API but I would note that if there is such an implicit
assumption then you make it impossible to use the numa agnostic page
pool allocator (aka fast reallocation). This might be not important here
but future extension would be harder (you can still hack it around aka
NUMA_REALLY_NO_NODE). My experience tells me that people are quite
creative and usually require (or worse assume) semantics that you
thought were not useful.

That being said, if the NUMA_NO_NODE really should have a special
locality meaning then document it explicitly at least.
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2019-12-19 14:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 23:17 [net-next v3 PATCH] page_pool: handle page recycle for NUMA_NO_NODE condition Jesper Dangaard Brouer
2019-12-18  7:44 ` Jesper Dangaard Brouer
2019-12-18  8:01   ` [net-next v4 " Jesper Dangaard Brouer
2019-12-18 14:27     ` 答复: " Li,Rongqing
2019-12-19 12:00       ` Jesper Dangaard Brouer
2019-12-19 12:47         ` 答复: " Li,Rongqing
2019-12-19  1:52     ` Yunsheng Lin
2019-12-19 12:15       ` Jesper Dangaard Brouer
2019-12-19 12:09     ` Michal Hocko
2019-12-19 13:35       ` Jesper Dangaard Brouer
2019-12-19 14:52         ` Michal Hocko [this message]
2019-12-19 15:28           ` Ilias Apalodimas
2019-12-19 14:20   ` [net-next v5 " Jesper Dangaard Brouer
2019-12-20 10:23     ` Ilias Apalodimas
2019-12-20 10:41       ` Jesper Dangaard Brouer
2019-12-20 10:49         ` Ilias Apalodimas
2019-12-20 15:22           ` Jesper Dangaard Brouer
2019-12-20 16:06             ` Ilias Apalodimas
2019-12-23  7:57               ` Ilias Apalodimas
2019-12-23 16:52                 ` Jesper Dangaard Brouer
2019-12-23 22:10                   ` Saeed Mahameed
2019-12-24  9:34                     ` Ilias Apalodimas
2019-12-24  7:41                   ` Ilias Apalodimas
2019-12-20 21:27       ` Saeed Mahameed

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=20191219145206.GE26945@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=brouer@redhat.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linyunsheng@huawei.com \
    --cc=lirongqing@baidu.com \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.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).