Pierrick Bouvier <pierrick.bouv...@linaro.org> writes:

> On 11/14/24 12:58, Richard Henderson wrote:
>> On 11/14/24 11:56, Pierrick Bouvier wrote:
>>> I tested this change by booting a debian x86_64 image, it works as expected.
>>>
>>> I noticed that this change does not come for free (64s before, 82s after - 
>>> 1.3x). Is that
>>> acceptable?
>> Well, no.  But I didn't notice any change during boot tests.  I used 
>> hyperfine over 'make
>> check-functional'.
>> I would only expect benefits to be seen during longer lived vm's,
>> since a boot test
>> doesn't run applications long enough to see tlb entries accumulate.  I have 
>> not attempted
>> to create a reproducible test for that so far.
>> 
>
> I didn't use check-functional neither.
> I used a vanilla debian bookworm install, with a modified
> /etc/rc.local calling poweroff, and ran 3 times with/without change
> with turbo disabled on my cpu.

If you want to really stress the VM handling you should use stress-ng to
exercise page faulting and recovery. Wrap it up in a systemd unit for a
reproducible test:

  cat /etc/systemd/system/benchmark-stress-ng.service 
  # A benchmark target
  #
  # This shutsdown once the boot has completed

  [Unit]
  Description=Default
  Requires=basic.target
  After=basic.target
  AllowIsolate=yes

  [Service]
  Type=oneshot
  ExecStart=stress-ng --perf --iomix 4 --vm 2 --timeout 10s
  ExecStartPost=/sbin/poweroff

  [Install]
  WantedBy=multi-user.target

and then call with something like:

  -append "root=/dev/sda2 console=ttyAMA0 
systemd.unit=benchmark-stress-ng.service"

>
>> r~

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to