mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: shechenglong <shechenglong@xfusion.com>,
	airlied@redhat.com, kraxel@redhat.com, tzimmermann@suse.de
Cc: gurchetansingh@chromium.org, olvaffe@gmail.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	simona@ffwll.ch, dri-devel@lists.freedesktop.org,
	virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
	stone.xulei@xfusion.com, chenjialong@xfusion.com
Subject: Re: [PATCH RESEND] drm/virtio: expose GEM memory statistics through fdinfo
Date: Sat, 10 Oct 2026 23:11:10 +0300	[thread overview]
Message-ID: <d459ced7-99f0-46c1-961c-0f6815163596@collabora.com> (raw)
In-Reply-To: <20261008164135.510-1-shechenglong@xfusion.com>

On 10/8/26 19:41, shechenglong wrote:
> On Thu, 8 Oct 2026 00:44:34 +0300, Dmitry Osipenko wrote:
>> Usefulness of this change is dubious. VirtIO-GPU has different types of
>> RAM, I'd expect them all represented properly instead of only shmem.
> 
> Hi Dmitry,
> 
> Thanks for the review.
> 
> Agreed that a generic memory collector does not map well onto
> virtio-gpu, given its different memory types. For v2, I plan to
> replace it with virtio-gpu-specific accounting and to document the
> semantics of each reported value explicitly:
> 
> - Guest shmem objects: reported under the "memory" region as
>   drm-total/drm-shared, based on the guest GEM object size. These
>   reflect the requested buffer size; drm-resident, if reported, would
>   be derived from the actual state of the guest backing pages.
> 
> - Host-only blobs (VIRTGPU_BLOB_MEM_HOST3D): reported under a separate
>   region, tentatively "host3d", using the requested blob size. These
>   values would be documented as logical sizes and not as actual host
>   RAM or VRAM consumption.
> 
> - Mixed blobs (VIRTGPU_BLOB_MEM_HOST3D_GUEST): the guest shadow
>   backing is accounted under "memory", while the logical blob size is
>   exposed through a separate, documented supplementary key. This
>   distinguishes mixed resources from guest-only ones without
>   presenting the supplementary value as additional measured host
>   memory.
> 
> - Imported dma-bufs: handled explicitly, without assuming that they
>   are backed by local shmem.
> 
> Usage of the host-visible memory region would be reported separately
> from the backing statistics and would not be used to infer host
> residency.
> 
> The actual host allocation size and residency, including legacy virgl
> resources and the host part of mixed blobs, are not available through
> the existing guest/host interface. Reporting them would require
> additional host/renderer support, so I propose leaving that out of
> this series unless you consider it a prerequisite.
> 
> Does this scope match your expectations for v2? Are there other
> memory types or accounting semantics you would like covered?
Sounds okay

-- 
Best regards,
Dmitry

      reply	other threads:[~2026-10-10 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  9:44 [PATCH] " shechenglong
2026-09-28 13:36 ` [PATCH RESEND] " shechenglong
2026-10-07 21:44   ` Dmitry Osipenko
2026-10-08 16:41     ` shechenglong
2026-10-10 20:11       ` Dmitry Osipenko [this message]

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=d459ced7-99f0-46c1-961c-0f6815163596@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=airlied@redhat.com \
    --cc=chenjialong@xfusion.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=olvaffe@gmail.com \
    --cc=shechenglong@xfusion.com \
    --cc=simona@ffwll.ch \
    --cc=stone.xulei@xfusion.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®