mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 02:01:05 +07:00
197ecb3802
Scrubbing pages on initial balloon down can take some time, especially in nested virtualization case (nested EPT is slow). When HVM/PVH guest is started with memory= significantly lower than maxmem=, all the extra pages will be scrubbed before returning to Xen. But since most of them weren't used at all at that point, Xen needs to populate them first (from populate-on-demand pool). In nested virt case (Xen inside KVM) this slows down the guest boot by 15-30s with just 1.5GB needed to be returned to Xen. Add runtime parameter to enable/disable it, to allow initially disabling scrubbing, then enable it back during boot (for example in initramfs). Such usage relies on assumption that a) most pages ballooned out during initial boot weren't used at all, and b) even if they were, very few secrets are in the guest at that time (before any serious userspace kicks in). Convert CONFIG_XEN_SCRUB_PAGES to CONFIG_XEN_SCRUB_PAGES_DEFAULT (also enabled by default), controlling default value for the new runtime switch. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
87 lines
2.9 KiB
Plaintext
87 lines
2.9 KiB
Plaintext
What: /sys/devices/system/xen_memory/xen_memory0/max_retry_count
|
|
Date: May 2011
|
|
KernelVersion: 2.6.39
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
The maximum number of times the balloon driver will
|
|
attempt to increase the balloon before giving up. See
|
|
also 'retry_count' below.
|
|
A value of zero means retry forever and is the default one.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/max_schedule_delay
|
|
Date: May 2011
|
|
KernelVersion: 2.6.39
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
The limit that 'schedule_delay' (see below) will be
|
|
increased to. The default value is 32 seconds.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/retry_count
|
|
Date: May 2011
|
|
KernelVersion: 2.6.39
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
The current number of times that the balloon driver
|
|
has attempted to increase the size of the balloon.
|
|
The default value is one. With max_retry_count being
|
|
zero (unlimited), this means that the driver will attempt
|
|
to retry with a 'schedule_delay' delay.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/schedule_delay
|
|
Date: May 2011
|
|
KernelVersion: 2.6.39
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
The time (in seconds) to wait between attempts to
|
|
increase the balloon. Each time the balloon cannot be
|
|
increased, 'schedule_delay' is increased (until
|
|
'max_schedule_delay' is reached at which point it
|
|
will use the max value).
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/target
|
|
Date: April 2008
|
|
KernelVersion: 2.6.26
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
The target number of pages to adjust this domain's
|
|
memory reservation to.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/target_kb
|
|
Date: April 2008
|
|
KernelVersion: 2.6.26
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
As target above, except the value is in KiB.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/info/current_kb
|
|
Date: April 2008
|
|
KernelVersion: 2.6.26
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
Current size (in KiB) of this domain's memory
|
|
reservation.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/info/high_kb
|
|
Date: April 2008
|
|
KernelVersion: 2.6.26
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
Amount (in KiB) of high memory in the balloon.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/info/low_kb
|
|
Date: April 2008
|
|
KernelVersion: 2.6.26
|
|
Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
Description:
|
|
Amount (in KiB) of low (or normal) memory in the
|
|
balloon.
|
|
|
|
What: /sys/devices/system/xen_memory/xen_memory0/scrub_pages
|
|
Date: September 2018
|
|
KernelVersion: 4.20
|
|
Contact: xen-devel@lists.xenproject.org
|
|
Description:
|
|
Control scrubbing pages before returning them to Xen for others domains
|
|
use. Can be set with xen_scrub_pages cmdline
|
|
parameter. Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
|