Netdev List
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	m.szyprowski@samsung.com
Cc: netdev@vger.kernel.org, iommu@lists.linux.dev, joro@8bytes.org,
	will@kernel.org, "Björn Töpel" <bjorn@kernel.org>
Subject: Re: [PATCH 04/11] dma-contiguous: pass the NUMA node to dma_alloc_contiguous()
Date: Thu, 12 Nov 2026 16:21:49 +0000	[thread overview]
Message-ID: <ca3d6077-651c-4882-af5b-15fa01242c35@arm.com> (raw)
In-Reply-To: <c014414f-fdd2-4a79-b133-44671c0e4475@redhat.com>

On 2026-11-12 3:43 pm, Paolo Abeni wrote:
> On 11/12/26 14:28, Robin Murphy wrote:
>> On 2026-11-12 9:53 am, Paolo Abeni wrote:
>>> On 11/6/26 19:44, Jakub Kicinski wrote:
>>>> --- a/kernel/dma/mapping.c
>>>> +++ b/kernel/dma/mapping.c
>>>> @@ -642,6 +642,13 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
>>>>    * Same as dma_alloc_attrs() but places the memory on @node rather 
>>>> than on the
>>>>    * node of @dev. Like with kmalloc_node() the node is only a 
>>>> preference,
>>>>    * the page allocator may fall back to other nodes if @node is out 
>>>> of memory.
>>>> + * The contiguous memory allocator (CMA) does not: only the CMA 
>>>> area of @node
>>>> + * and the global CMA area are tried. The allocation may fail even 
>>>> though the
>>>> + * CMA area of another node, e.g. that of @dev, still has free space.
>>>> + *
>>>> + * Allocations served from per-device or global coherent pools, 
>>>> per- device CMA
>>>> + * areas, restricted or atomic pools, arch_dma_alloc() or dma_map_ops
>>>> + * implementations do not take @node into account.
>>> I'm possibly over-thinking here, but AFAICS there are a bunch of 
>>> dma_map_ops that
>>> are using dev_to_node():
>>>
>>> dma_iommu_alloc_coherent() in arch/powerpc/kernel/dma-iommu.c
>>> vio_dma_iommu_alloc_coherent() in arch/powerpc/platforms/pseries/vio.c
>>> gart_alloc_coherent() in arch/x86/kernel/amd_gart_64.c
>>>
>>> With this series they will stop using the driver provided numa node.
>>> Probably not a blocker but possibly worth to call out?
>>
>> Nothing "stops" - this series adds a *new* interface by which drivers 
>> can now indicate a specific preferred node, but DMA API backends are 
>> still free to ignore the caller-provided hint and continue doing 
>> whatever they want. This is already called out all over the series in 
>> commit messages, documentation and comments including the one above.
> I mean: the series also replaces the old hacks with the new APIs usage
> in a few drivers, and in the above cases there could be actual regressions.
> 
> But I guess we could handle them if and when they will surface.

Ah, sorry, I was confused by the comment being made in the context of 
this patch - what you mean is that in patches 6-11, the new API isn't 
guaranteed to give the same result as the set_dev_node() hacks being 
removed? To be fair, the new API itself still does not change any 
behaviour, removing the hacks changes the behaviour ;)

I guess it could be worth a note in those commit messages if we think 
there's a chance that anyone is using these NICs on POWER systems that 
might conceivably observe a performance blip.

Cheers,
Robin.

  parent reply	other threads:[~2026-11-12 16:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 18:44 [PATCH 00/11] dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 01/11] " Jakub Kicinski
2026-11-06 23:41   ` Marek Szyprowski
2026-11-06 18:44 ` [PATCH 02/11] dma-direct: add dma_direct_alloc_node() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 03/11] iommu/dma: pass the NUMA node to iommu_dma_alloc() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 04/11] dma-contiguous: pass the NUMA node to dma_alloc_contiguous() Jakub Kicinski
2026-11-12  9:53   ` Paolo Abeni
2026-11-12 13:28     ` Robin Murphy
2026-11-12 15:43       ` Paolo Abeni
2026-11-12 16:17         ` Jakub Kicinski
2026-11-12 16:21         ` Robin Murphy [this message]
2026-11-06 18:44 ` [PATCH 05/11] eth: libwx: restore the device's NUMA node after ring allocation Jakub Kicinski
2026-11-06 18:44 ` [PATCH 06/11] eth: libwx: use dma_alloc_coherent_node() Jakub Kicinski
2026-11-06 18:44 ` [PATCH 07/11] eth: ixgbe: " Jakub Kicinski
2026-11-06 18:44 ` [PATCH 08/11] eth: xgbe: " Jakub Kicinski
2026-11-06 18:44 ` [PATCH 09/11] eth: fungible: " Jakub Kicinski
2026-11-06 18:44 ` [PATCH 10/11] eth: mlx5: " Jakub Kicinski
2026-11-12 12:31   ` Tariq Toukan
2026-11-06 18:44 ` [PATCH 11/11] eth: mlx4: " Jakub Kicinski
2026-11-12 12:32   ` Tariq Toukan
2026-11-12 16:16 ` [PATCH 00/11] dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node() Jakub Kicinski
2026-11-12 16:51 ` Robin Murphy

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=ca3d6077-651c-4882-af5b-15fa01242c35@arm.com \
    --to=robin.murphy@arm.com \
    --cc=bjorn@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kuba@kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=will@kernel.org \
    /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