From: Matthew Auld <matthew.auld@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org, Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH v2 7/7] drm/xe/configfs: add disable_mem_copy knob
Date: Tue, 21 Oct 2025 10:06:24 +0100 [thread overview]
Message-ID: <92540c50-58ee-4234-bf03-d089c4f35953@intel.com> (raw)
In-Reply-To: <jvvrjixujx5hz2o7x7szsqhjvgbze6a5wtzbifclltsffg72ir@rm243p6z4zlo>
On 21/10/2025 03:18, Lucas De Marchi wrote:
> On Mon, Oct 20, 2025 at 01:54:39PM +0100, Matthew Auld wrote:
>> For easier experimentation/comparison allow turning off the newer
>> MEM_COPY path, without needing to apply manual hacks and build a new
>> kernel. This needs to be configured before fully probing the device.
>>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Cc: Matthew Brost <matthew.brost@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_configfs.c | 65 ++++++++++++++++++++++++++++++++
>> drivers/gpu/drm/xe/xe_configfs.h | 2 +
>> drivers/gpu/drm/xe/xe_pci.c | 4 +-
>> 3 files changed, 70 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/
>> xe_configfs.c
>> index c1419a270fa4..df459daa0f07 100644
>> --- a/drivers/gpu/drm/xe/xe_configfs.c
>> +++ b/drivers/gpu/drm/xe/xe_configfs.c
>> @@ -236,6 +236,15 @@
>> *
>> * This setting only takes effect when probing the device.
>> *
>> + * Disable MEM_COPY path
>> + * -----------------------------------------------------
>> + * This config will force the use of the older XY_FAST_COPY
>> instruction in the migration code.
>> + * Intended only for experimentation.
>> + *
>> + * # echo 1 > /sys/kernel/config/xe/0000:03:00.0/disable_mem_copy
>> + *
>> + * This setting only takes effect when probing the device.
>> + *
>> * Remove devices
>> * ==============
>> *
>> @@ -264,6 +273,9 @@ struct xe_config_group_device {
>> struct {
>> unsigned int max_vfs;
>> } sriov;
>> + struct {
>> + bool disable_mem_copy;
>> + } migrate;
>
> so this is migrate.disable_mem_copy
>
> ...
>
>> CONFIGFS_ATTR(, ctx_restore_mid_bb);
>> CONFIGFS_ATTR(, ctx_restore_post_bb);
>> +CONFIGFS_ATTR(, disable_mem_copy);
>
> but the attribute is a misleading "disable_mem_copy".
I was just trying to group the migrate related knobs under one struct
since there could potentially be more in the future. Should that be
reflected in the attribute? Should we do migrate_disable_mem_copy or did
you mean something else here?
>
> Note that configfs is not a place for hacks so if it's generally useful
> we need to think of a name that is not misleading and will be
> future-proof. This seems more like "the MEM_COPY for migration is a new
> path and we may have bugs or we want to compare them in the short term".
> Did I misunderstand the purpose of the patch?
Yeah, it's likely more a short/medium term thing. Although I did also
use it to quickly test both paths on one machine. Happy to drop this
one, if this is not a good fit.
>
> Lucas De Marchi
next prev parent reply other threads:[~2025-10-21 9:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 12:54 [PATCH v2 0/7] Some migration fixes/improvements Matthew Auld
2025-10-20 12:54 ` [PATCH v2 1/7] drm/xe/migrate: rework size restrictions for sram pte emit Matthew Auld
2025-10-20 12:54 ` [PATCH v2 2/7] drm/xe/migrate: fix chunk handling for 2M page emit Matthew Auld
2025-10-20 12:54 ` [PATCH v2 3/7] drm/xe/migrate: fix batch buffer sizing Matthew Auld
2025-10-20 12:54 ` [PATCH v2 4/7] drm/xe/migrate: trim " Matthew Auld
2025-10-20 12:54 ` [PATCH v2 5/7] drm/xe/migrate: support MEM_COPY instruction Matthew Auld
2025-10-20 18:41 ` Matthew Brost
2025-10-20 12:54 ` [PATCH v2 6/7] drm/xe/migrate: skip bounce buffer path on xe2 Matthew Auld
2025-10-20 18:52 ` Matthew Brost
2025-10-21 9:23 ` Matthew Auld
2025-10-20 12:54 ` [PATCH v2 7/7] drm/xe/configfs: add disable_mem_copy knob Matthew Auld
2025-10-20 22:49 ` Matthew Brost
2025-10-21 2:18 ` Lucas De Marchi
2025-10-21 9:06 ` Matthew Auld [this message]
2025-10-20 13:04 ` ✗ CI.KUnit: failure for Some migration fixes/improvements (rev2) 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=92540c50-58ee-4234-bf03-d089c4f35953@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@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