From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Andi Shyti <andi.shyti@kernel.org>
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: Tue, 03 Nov 2026 16:32:16 +0100 [thread overview]
Message-ID: <bc86567cb914a435dd65d5e3eb463eb4ebf57ae4.camel@linux.intel.com> (raw)
In-Reply-To: <auHk62MFrf-H4tms@zenone.zhora.eu>
On Wed, 2026-10-28 at 16:07 +0100, Andi Shyti wrote:
> 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
Thanks for reviewing, Andi. Will fix.
Thanks,
Thomas
next prev parent reply other threads:[~2026-11-03 15:32 UTC|newest]
Thread overview: 7+ 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 ` [PATCH] " Andi Shyti
2026-11-03 15:32 ` Thomas Hellström [this message]
2026-10-28 20:59 ` ✓ Xe.CI.FULL: success for " 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=bc86567cb914a435dd65d5e3eb463eb4ebf57ae4.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=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 \
/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.