[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230411124945.527b0ee4@kernel.org>
Date: Tue, 11 Apr 2023 12:49:45 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: Brett Creeley <bcreeley@....com>,
Brett Creeley <brett.creeley@....com>, davem@...emloft.net,
netdev@...r.kernel.org, drivers@...sando.io,
shannon.nelson@....com, neel.patel@....com
Subject: Re: [PATCH net] ionic: Fix allocation of q/cq info structures from
device local node
On Tue, 11 Apr 2023 15:47:04 +0300 Leon Romanovsky wrote:
> > We want to allocate memory from the node local to our PCI device, which is
> > not necessarily the same as the node that the thread is running on where
> > vzalloc() first tries to alloc.
>
> I'm not sure about it as you are running kernel thread which is
> triggered directly by device and most likely will run on same node as
> PCI device.
Isn't that true only for bus-side probing?
If you bind/unbind via sysfs does it still try to move to the right
node? Same for resources allocated during ifup?
> > Since it wasn't clear to us that vzalloc_node() does any fallback,
>
> vzalloc_node() doesn't do fallback, but vzalloc will find the right node
> for you.
Sounds like we may want a vzalloc_node_with_fallback or some GFP flag?
All the _node() helpers which don't fall back lead to unpleasant code
in the users.
> > we followed the example in the ena driver to follow up with a more
> > generic vzalloc() request.
>
> I don't know about ENA implementation, maybe they have right reasons to
> do it, but maybe they don't.
>
> >
> > Also, the custom message helps us quickly figure out exactly which
> > allocation failed.
>
> If OOM is missing some info to help debug allocation failures, let's add
> it there, but please do not add any custom prints after alloc failures.
+1
Powered by blists - more mailing lists