From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Anthony PERARD <anthony.perard@vates.tech>,
Michal Orzel <michal.orzel@amd.com>,
Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH 6/8] pdx: introduce a new compression algorithm based on offsets between regions
Date: Thu, 12 Jun 2025 09:59:32 +0200 [thread overview]
Message-ID: <aEqI5NF27rIC1QKT@macbook.local> (raw)
In-Reply-To: <aEqBIdImfwmSOIRS@macbook.local>
On Thu, Jun 12, 2025 at 09:26:25AM +0200, Roger Pau Monné wrote:
> On Wed, Jun 11, 2025 at 08:33:55PM +0100, Andrew Cooper wrote:
> > On 11/06/2025 6:16 pm, Roger Pau Monne wrote:
> > > We can discuss whether we want both the fast and the slow variants. The
> > > slow (brute force) was added as a result of me playing with weird region
> > > layouts where the fast one didn't manage to compress, or the resulting
> > > coefficients had a poor compression ratio. However at this point the
> > > slow variant has only proven helpful in synthetic cases, I haven't (yet?)
> > > seen a real host memory layout that would benefit from it.
> >
> > I'm going to hold off on opinions until I've read the rest of the series.
> >
> > One question through. Can we round offset up to the next power of two,
> > so we can replace the divide with a shift?
>
> I've tried to round up both offset and size, but that resulted in no
> compression in some cases. I can try to maybe round just one of
> those?
>
> Note that the divide is done once with offset and once with size,
> depending on the direction of the translation. I can explore this a
> bit.
So for the 4s GNR example, rounding the offset to the nearest (lower)
power of two will result in:
PFN fast compression result diverge, expected:
offset 0000063e80000 size 0000008300000 (91%)
got:
offset 0000040000000 size 0000033e80000 (18%)
Ranges:
0000000000000-0000008080000
0000063e80000-000006be80000
00000c7e80000-00000cfe80000
000012be80000-0000133e80000
And that's just rounding the offset, if we then also round the size
there's no compression possible, as size would become 0x40000000 and
thus offset == size.
Thanks, Roger.
next prev parent reply other threads:[~2025-06-12 7:59 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 17:16 [PATCH 0/8] pdx: introduce a new compression algorithm Roger Pau Monne
2025-06-11 17:16 ` [PATCH 1/8] x86/pdx: simplify calculation of domain struct allocation boundary Roger Pau Monne
2025-06-11 17:58 ` Andrew Cooper
2025-06-12 6:57 ` Roger Pau Monné
2025-06-12 9:03 ` Jan Beulich
2025-06-12 10:46 ` Roger Pau Monné
2025-06-12 12:00 ` Jan Beulich
2025-06-11 17:16 ` [PATCH 2/8] pdx: introduce function to calculate max PFN based on PDX compression Roger Pau Monne
2025-06-12 9:11 ` Jan Beulich
2025-06-12 10:48 ` Roger Pau Monné
2025-06-12 12:02 ` Jan Beulich
2025-06-11 17:16 ` [PATCH 3/8] kconfig: turn PDX compression into a choice Roger Pau Monne
2025-06-12 8:28 ` Jan Beulich
2025-06-11 17:16 ` [PATCH 4/8] pdx: provide a unified set of unit functions Roger Pau Monne
2025-06-12 8:32 ` Jan Beulich
2025-06-12 10:50 ` Roger Pau Monné
2025-06-12 8:36 ` Jan Beulich
2025-06-12 10:51 ` Roger Pau Monné
2025-06-12 12:03 ` Jan Beulich
2025-06-11 17:16 ` [PATCH 5/8] pdx: allow optimizing PDX conversion helpers Roger Pau Monne
2025-06-11 17:16 ` [PATCH 6/8] pdx: introduce a new compression algorithm based on offsets between regions Roger Pau Monne
2025-06-11 19:33 ` Andrew Cooper
2025-06-12 7:26 ` Roger Pau Monné
2025-06-12 7:59 ` Roger Pau Monné [this message]
2025-06-12 8:27 ` Jan Beulich
2025-06-12 14:03 ` Roger Pau Monné
2025-06-16 7:50 ` Jan Beulich
2025-06-18 13:02 ` Jan Beulich
2025-06-18 14:11 ` Roger Pau Monné
2025-06-11 17:16 ` [PATCH 7/8] pdx: introduce translation helpers for offset compression Roger Pau Monne
2025-06-11 17:16 ` [PATCH 8/8] pdx: introduce a command line option " Roger Pau Monne
2025-06-17 7:09 ` Oleksii Kurochko
2025-06-18 13:36 ` Jan Beulich
2025-06-18 14:12 ` Roger Pau Monné
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=aEqI5NF27rIC1QKT@macbook.local \
--to=roger.pau@citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 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.