From: Matthew Brost <matthew.brost@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: VM madvise semantics
Date: Wed, 4 Jun 2025 07:26:34 -0700 [thread overview]
Message-ID: <aEBXmoUTWK0XNTCj@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <0e5a09490934b1332e13829c705af98026372300.camel@linux.intel.com>
On Wed, Jun 04, 2025 at 02:57:50PM +0200, Thomas Hellström wrote:
> Hi!
>
> I'm starting an email thread to move forward the questions Himal had on
> the madvise semantics:
>
> 1) Whether to support an array of ops?
>
> IMO the VM_BIND implementation got very complicated due to this and the
> needed rollback support. Perhaps due to single op splitting turning to
> multiple ops it would've been hard to avoid that. Can we avoid
> supporting an array of ops for madvise? If so I'd vote for single op.
>
I don't think rollback is strickly required as madvise failing mid-array
is not fatal compared to a VM bind failing mid-array not rolling back
is. At worst some VMAs/ranges/BOs might have had their attributes
changed and may have not. That said, not opposed to for single op if
that is what you prefer.
> 2) Purgeability. If it's not implemented yet we shouldn't merge an uapi
> for it, but ensure that it would at least be possible moving forward.
>
I agree, I think I mentioned that in my reviews too - pull this out of
the uAPI before the final merge.
> 3) Multi-device. In the spirit of the above I guess it makes sense if
> UMD wants to select between VRAM and SRAM now to merge an interface
> that supports *only* that. When we add multi-device support we could
> perhaps add another op, or an extension to support agreed multi-device
> semantics. Even if this means rolling back to Himal's original
> suggestion of a preferred placement UAPI.
>
I think the way Himal as this coded works for both multi-device and
choose between SRAM / VRAM.
The devmem_fd field means:
-1 == SRAM
0 == VRAM
0 > Multi-device devmem FD handle (NIY)
I think this is a solid enough interface we are good? Am I missing
something?
Matt
> Thoughts?
>
> Thomas
>
next prev parent reply other threads:[~2025-06-04 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 12:57 VM madvise semantics Thomas Hellström
2025-06-04 14:26 ` Matthew Brost [this message]
2025-06-04 14:32 ` Simona Vetter
2025-06-04 15:30 ` Thomas Hellström
2025-06-04 15:39 ` Simona Vetter
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=aEBXmoUTWK0XNTCj@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=thomas.hellstrom@linux.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