From: "Alex Bennée" <alex.bennee@linaro.org>
To: "François Ozog" <francois.ozog@linaro.org>
Cc: "Mikhail Golubev" <Mikhail.Golubev@opensynergy.com>,
"Vasyl Vavrychuk" <Vasyl.Vavrychuk@opensynergy.com>,
"Zhao Jiancong" <chou.kensou@jp.panasonic.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Stratos Mailing List" <stratos-dev@op-lists.linaro.org>
Subject: Re: Measuring the impact of buffer copy for virtio-gpu guests
Date: Wed, 17 Feb 2021 15:48:01 +0000 [thread overview]
Message-ID: <87v9aqsnhe.fsf@linaro.org> (raw)
In-Reply-To: <CAHFG_=VHqTORBGshu5CpC83h3EtFeD1pPteftC4UfSUP9OyUbQ@mail.gmail.com>
François Ozog <francois.ozog@linaro.org> writes:
> On Wed, 17 Feb 2021 at 15:13, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>> Hi Gerd,
>>
>> I was in a discussion with the AGL folks today talking about approaches
>> to achieving zero-copy when running VirGL virtio guests. AIUI (which is
>> probably not very much) the reasons for copy can be due to a number of
>> reasons:
>>
>> - the GPA not being mapped to a HPA that is accessible to the final HW
>> - the guest allocation of a buffer not meeting stride/alignment
>> requirements
>> - data needing to be transformed for consumption by the real hardware?
>>
>> any others? Is there an impedance between different buffer resource
>> allocators in the guest and the guest? Is that just a problem for
>> non-FLOSS blob drivers in the kernel?
>>
>> I'm curious if it's possible to measure the effect of these extra copies
>> and where do they occur?
>
> Making a good benchmark is going to be difficult. Copying has big impacts
> on:
> - L3 pressure (pure cost of evictions and loss of "sticky" cache lines
> benefits)
> - Memory request queue and prefetching
> - TLB pressure
> Conversely, as we are in VM environments the pressure that other VMs have
> on those resources, the jitter of the bounce copies will grow.
> (lesson learnt from high speed - > 100Gbps - user pace networking)
> All this to say that a unitest may be wrongly give impression that copy is
> not that costly.
No I'm not doubting that unneeded copying can be costly - I'm just
trying to get an understanding of the scope of the problem. How often do
buffers get copied rather than measuring the total effect which as you
say can be very load dependant.
>
>> Do all resources get copied from the guest buffer to
>> host or does this only occur when there is a mismatch in the buffer
>> requirements?
>>
>> Are there any functions where I could add trace points to measure this?
>> If this occurs in the kernel I wonder if I could use an eBPF probe to
>> count the number of bytes copied?
>>
>> Apologies for the wall of questions I'm still very new to the 3D side of
>> things ;-)
>>
>> --
>> Alex Bennée
>>
--
Alex Bennée
next prev parent reply other threads:[~2021-02-17 15:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 13:46 Measuring the impact of buffer copy for virtio-gpu guests Alex Bennée
2021-02-17 14:48 ` François Ozog
2021-02-17 15:48 ` Alex Bennée [this message]
2021-02-18 11:06 ` Gerd Hoffmann
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=87v9aqsnhe.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=Mikhail.Golubev@opensynergy.com \
--cc=Vasyl.Vavrychuk@opensynergy.com \
--cc=chou.kensou@jp.panasonic.com \
--cc=francois.ozog@linaro.org \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.griffin@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stratos-dev@op-lists.linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).