From: Boris Brezillon <boris.brezillon@collabora.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "Adrián Larumbe" <adrian.larumbe@collabora.com>,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
quic_abhinavk@quicinc.com, dmitry.baryshkov@linaro.org,
sean@poorly.run, marijn.suijten@somainline.org, robh@kernel.org,
steven.price@arm.com, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
healych@amazon.com, kernel@collabora.com,
freedreno@lists.freedesktop.org,
"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>
Subject: Re: [PATCH v4 6/6] drm/drm-file: Show finer-grained BO sizes in drm_show_memory_stats
Date: Wed, 13 Sep 2023 19:17:57 +0200 [thread overview]
Message-ID: <20230913191757.6594f8c8@collabora.com> (raw)
In-Reply-To: <CAF6AEGu+NeMfeP3yVLr76fUmXeWPx86D9ckw_WjXu+Xpn6DJvA@mail.gmail.com>
On Wed, 13 Sep 2023 09:46:45 -0700
Rob Clark <robdclark@gmail.com> wrote:
> On Wed, Sep 13, 2023 at 12:36 AM Boris Brezillon
> <boris.brezillon@collabora.com> wrote:
> >
> > On Tue, 12 Sep 2023 19:14:35 -0700
> > Rob Clark <robdclark@gmail.com> wrote:
> >
> > > On Tue, Sep 12, 2023 at 6:46 PM Rob Clark <robdclark@gmail.com> wrote:
> > > >
> > > > On Tue, Sep 12, 2023 at 2:32 AM Boris Brezillon
> > > > <boris.brezillon@collabora.com> wrote:
> > > > >
> > > > > On Tue, 12 Sep 2023 09:37:00 +0100
> > > > > Adrián Larumbe <adrian.larumbe@collabora.com> wrote:
> > > > >
> > > > > > The current implementation will try to pick the highest available size
> > > > > > display unit as soon as the BO size exceeds that of the previous
> > > > > > multiplier. That can lead to loss of precision in BO's whose size is
> > > > > > not a multiple of a MiB.
> > > > > >
> > > > > > Fix it by changing the unit selection criteria.
> > > > > >
> > > > > > For much bigger BO's, their size will naturally be aligned on something
> > > > > > bigger than a 4 KiB page, so in practice it is very unlikely their display
> > > > > > unit would default to KiB.
> > > > >
> > > > > Let's wait for Rob's opinion on this.
> > > >
> > > > This would mean that if you have SZ_1G + SZ_1K worth of buffers, you'd
> > > > report the result in KiB.. which seems like overkill to me, esp given
> > > > that the result is just a snapshot in time of a figure that
> > > > realistically is dynamic.
> >
> > Yeah, my point was that, generally, such big buffers tend to have
> > a bigger size alignment (like 2MB for anything bigger than 1GB), but
> > maybe this assumption doesn't stand for all drivers.
>
> Maybe for CMA? Regardless, this # is the sum of buffer sizes, so you
> could still get that 1G+1K scenario
My bad, for some reason I had per-buffer size printing in mind.
prev parent reply other threads:[~2023-09-13 17:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 8:36 [PATCH v4 0/6] Add fdinfo support to Panfrost Adrián Larumbe
2023-09-12 8:36 ` [PATCH v4 1/6] drm/panfrost: Add cycle count GPU register definitions Adrián Larumbe
2023-09-12 8:36 ` [PATCH v4 2/6] drm/panfrost: Add fdinfo support GPU load metrics Adrián Larumbe
2023-09-12 9:28 ` Boris Brezillon
2023-09-12 8:36 ` [PATCH v4 3/6] drm/panfrost: Add fdinfo support for memory stats Adrián Larumbe
2023-09-12 9:29 ` Boris Brezillon
2023-09-12 8:36 ` [PATCH v4 4/6] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo Adrián Larumbe
2023-09-12 8:36 ` [PATCH v4 5/6] drm/panfrost: Implement generic DRM object RSS reporting function Adrián Larumbe
2023-09-12 9:29 ` Boris Brezillon
2023-09-12 8:37 ` [PATCH v4 6/6] drm/drm-file: Show finer-grained BO sizes in drm_show_memory_stats Adrián Larumbe
2023-09-12 9:32 ` Boris Brezillon
2023-09-13 1:46 ` Rob Clark
2023-09-13 2:14 ` Rob Clark
2023-09-13 7:36 ` Boris Brezillon
2023-09-13 16:46 ` Rob Clark
2023-09-13 17:17 ` Boris Brezillon [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=20230913191757.6594f8c8@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=healych@amazon.com \
--cc=kernel@collabora.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=robh@kernel.org \
--cc=sean@poorly.run \
--cc=steven.price@arm.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=tzimmermann@suse.de \
/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