Hi Hongyan,
On 11/12/2019 10:28, Xia, Hongyan wrote:
On Tue, 2019-12-10 at 16:20 +0100, Jan Beulich wrote:
ol2e = l2e_from_intpte(
l2e_get_intpte(ol2e) + (PAGE_SIZE <<
PAGETABLE_ORDER));
Of course, as mentioned before, I'm not overly happy to see type
safety lost in case like this one, where it's not needed like e.g.
further up to convert from L3 to L2 entry.
Okay, so I did a comparison between the efficiency of the assembly
under a release build.
The old "type-safe" way requires 16 instructions to prepare the first
l2e, and each iteration of the inner loop of populating l2t requires 7
instructions.
The new type-unsafe way requires 6 to prepare the first l2e, and each
iteration of populating l2t takes 5 instructions.
So the difference of populating l2t is 3600 vs. 2566 instructions,
which is not very small.
While this involves more instructions, how often do we expect the code
to be called?
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel