Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: "Christian König" <christian.koenig@amd.com>,
	intel-xe@lists.freedesktop.org,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Kasireddy Vivek" <vivek.kasireddy@intel.com>,
	"Simona Vetter" <simona.vetter@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org
Subject: Re: [RFC PATCH v2 1/2] dma-buf: Add support for private interconnects
Date: Mon, 29 Sep 2025 09:27:26 -0300	[thread overview]
Message-ID: <20250929122726.GH2617119@nvidia.com> (raw)
In-Reply-To: <42520738dbc23174181db7d31d55de56996fba88.camel@linux.intel.com>

On Mon, Sep 29, 2025 at 10:25:06AM +0200, Thomas Hellström wrote:
> > > 2) dma-buf pcie-p2p allows transparent fallback to system memory
> > > dma-
> > > buf. I think that is a good thing to keep even for other
> > > interconnects
> > > (if possible). Like if someone wants to pull the network cable, we
> > > could trigger a move_notify() and on next map() we'd fall back. Any
> > > ideas around this?
> > 
> > We already do that if new importers come along.
> > 
> > E.g. you have a connection which can do PCIe P2P and then suddenly
> > somebody attaches which can only do DMA to system memory. In that
> > situation we use move_notify to move the buffer into system memory
> > and imports re-map it to grasp the new location.
> 
> Sure, Just wandering whether we should document and require that also
> for fast interconnects. 

I thin Thomas is pushing toward a question of what happens to the
interconnect during a move?

If the interconnect is established during attach, can/should move
re-negotiate it?

It seems like yes - if the attachment negotiated using some private
interconnect then move happens and the memory is on CPU and no longer
available to the private interconnect the attachment needs to
renegotiate and change to a new interconnect during the move sequence.

If the importer supports only 1 interconnect, then it shouldn't have
to implement renegotiate.

I think this needs to be called out explicitly in the flow and
documentation.

> So that if we use a new map_attachment()
> function, like was suggested ealier, if that fails, the importer should
> ideally retry with the old one to get an sg-list to system memory?

It would be amazing to avoid this hassle, if the core code could see
the exporter is old and automatically match the sg-list behavior to
generic interconnect options. And vice versa for old importers.

Jason

  reply	other threads:[~2025-09-29 12:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  8:46 [RFC PATCH v2 0/2] dma-buf private interconnect POC Thomas Hellström
2025-09-26  8:46 ` [RFC PATCH v2 1/2] dma-buf: Add support for private interconnects Thomas Hellström
2025-09-26 12:56   ` Christian König
2025-09-26 13:51     ` Thomas Hellström
2025-09-26 14:41       ` Jason Gunthorpe
2025-09-26 14:51         ` Christian König
2025-09-26 16:00           ` Jason Gunthorpe
2025-09-29  8:16             ` Thomas Hellström
2025-09-29  8:20               ` Christian König
2025-09-29  8:25                 ` Thomas Hellström
2025-09-29 12:27                   ` Jason Gunthorpe [this message]
2025-09-29  8:16             ` Christian König
2025-09-29 12:45               ` Jason Gunthorpe
2025-09-29 16:02                 ` Thomas Hellström
2025-09-29 16:13                   ` Jason Gunthorpe
2025-09-26  8:46 ` [RFC PATCH v2 2/2] drm/xe/dma-buf: Add generic interconnect support framework Thomas Hellström
2025-09-26  9:34 ` ✗ CI.checkpatch: warning for dma-buf private interconnect POC (rev2) Patchwork
2025-09-26  9:35 ` ✓ CI.KUnit: success " Patchwork
2025-09-26  9:50 ` ✗ CI.checksparse: warning " Patchwork
2025-09-26 10:11 ` ✓ Xe.CI.BAT: success " Patchwork
2025-09-26 14:23 ` ✗ Xe.CI.Full: failure " Patchwork

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=20250929122726.GH2617119@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=vivek.kasireddy@intel.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