From: Andi Shyti <andi.shyti@kernel.org>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org,
Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/xe: Add a per-client debugfs file reporting bo NUMA node distribution
Date: Wed, 28 Oct 2026 16:07:36 +0100 [thread overview]
Message-ID: <auHk62MFrf-H4tms@zenone.zhora.eu> (raw)
In-Reply-To: <20261028103237.70129-1-thomas.hellstrom@linux.intel.com>
Hi Thomas,
On Wed, Oct 28, 2026 at 11:32:37AM +0100, Thomas Hellström wrote:
> When debugging NUMA placement of bo system memory, there is currently
> no way to tell on which nodes the pages backing a bo reside. The
> /proc/<pid>/numa_maps interface doesn't help since bo CPU mappings are
> VM_PFNMAP, and clients may have thousands of bos, so a dump of all bos
> is undesirable.
...
> Example:
> exec 3<>/sys/kernel/debug/dri/client-<id>/bo_numa
> echo <handle1> >&3
> cat <&3
> echo <handle2> >&3
> cat <&3
> exec 3>&-
>
> The client id can be obtained from the drm-client-id fdinfo key.
>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Assisted-by: LLM
Please drop the Assisted-by and add your SoB :-)
...
> + do {
> + kvfree(buf);
> + bufsize *= 2;
> + buf = kvzalloc(bufsize, GFP_KERNEL_ACCOUNT);
> + if (!buf) {
> + ret = -ENOMEM;
> + goto out_unlock;
> + }
> +
> + iter = (struct drm_print_iterator) {
> + .data = buf,
> + .remain = bufsize,
> + };
> + p = drm_coredump_printer(&iter);
> + ret = xe_bo_print_numa_info(file, handle, &p);
> + if (ret)
> + goto out_free;
> + } while (!iter.remain);
this is basically
} while(drm_coredump_printer_is_full(&p));
The rest looks good to me.
Andi
next prev parent reply other threads:[~2026-10-28 15:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 10:32 [PATCH] drm/xe: Add a per-client debugfs file reporting bo NUMA node distribution Thomas Hellström
2026-10-28 10:43 ` ✗ CI.checkpatch: warning for " Patchwork
2026-10-28 10:45 ` ✓ CI.KUnit: success " Patchwork
2026-10-28 11:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-28 15:07 ` Andi Shyti [this message]
2026-10-28 20:59 ` ✓ Xe.CI.FULL: " 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=auHk62MFrf-H4tms@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.