linux-aws: swapoff optimization

Bug #1858618 reported by Andrea Righi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-aws (Ubuntu)
Fix Released
Undecided
Andrea Righi
Bionic
Fix Released
Undecided
Andrea Righi
Disco
Won't Fix
High
Andrea Righi
Eoan
Fix Released
Undecided
Andrea Righi
Focal
Fix Released
Undecided
Andrea Righi
linux-aws-5.0 (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
High
Unassigned
Disco
Invalid
Undecided
Unassigned
Eoan
Won't Fix
Undecided
Unassigned
Focal
Invalid
Undecided
Unassigned

Bug Description

[Impact]

When an instance in the AWS EC2 infrastructure is successfully hibernated and resumed we want to deactivate the swap file as fast as possible in order to make the instance available again for the user. By default the kernel doesn't really optimize swapoff performance, it tries to keep the whole system still usable and responsive while swapoff is running.

However, in our specific use case, swapoff needs to complete as fast as possible, so we may want to give swapoff I/O a higher priority and use different heuristics in order to optimize the I/O and page readahead generated by swapoff.

[Test Case]

Run the hibernation test on the AWS EC2 instances.

[Fix]

Apply a more aggressive swapin readahead policy that allows to improve swapoff performance.

[Regression Potential]

Minimal, this change is only affecting the swapoff-related code and it has been tested extensively with positive test results. The only downside is that this different heuristic makes the system more unresponsive during swapoff, but this is not a problem in the AWS scenario, because (by explicit requirement) the user shouldn't be able to use the instance during this swapoff phase.

Andrea Righi (arighi)
Changed in linux-aws (Ubuntu):
assignee: nobody → Andrea Righi (arighi)
Changed in linux-aws (Ubuntu Bionic):
assignee: nobody → Andrea Righi (arighi)
Changed in linux-aws (Ubuntu Bionic):
status: New → Fix Committed
Andrea Righi (arighi)
Changed in linux-aws (Ubuntu Disco):
importance: Undecided → High
assignee: nobody → Andrea Righi (arighi)
Stefan Bader (smb)
Changed in linux-aws-5.0 (Ubuntu Disco):
status: New → Invalid
Changed in linux-aws-5.0 (Ubuntu Bionic):
importance: Undecided → High
Changed in linux-aws-5.0 (Ubuntu):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-aws - 4.15.0-1058.60

---------------
linux-aws (4.15.0-1058.60) bionic; urgency=medium

  * bionic/linux-aws: 4.15.0-1058.60 -proposed tracker (LP: #1859795)

  * Update EFA driver to 1.5.0 (LP: #1850195)
    - SAUCE: linux/efa: Fix incorrect error print
    - SAUCE: linux/efa: Fix ‘err’ may be used uninitialized in this function
      warning
    - SAUCE: linux/efa: Add support for CentOS 7.7
    - SAUCE: linux/efa: Clear the admin command buffer prior to its submission
    - SAUCE: linux/efa: Bump driver version to 1.4.1
    - SAUCE: linux/efa: Store network attributes in device attributes
    - SAUCE: linux/efa: Support remote read access in MR registration
    - SAUCE: linux/efa: Expose RDMA read related attributes
    - SAUCE: linux/efa: Add ib_uverbs as a soft dependency
    - SAUCE: linux/efa: Use the ib_port_phys_state enum values
    - SAUCE: linux/efa: Backport missing driver id
    - SAUCE: linux/efa: Check sscanf return value
    - SAUCE: linux/efa: SuSE 15.1 support
    - SAUCE: linux/efa: Bump driver version to 1.5.0

  * linux-aws: swapoff optimization (LP: #1858618)
    - UBUNTU SAUCE [aws]: mm: swap: improve swap readahead heuristic

  * ARM CPU erratum Neoverse-N1 #1542419 (LP: #1855729)
    - arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC
    - arm64: Add part number for Neoverse N1
    - arm64: cpufeature: Trap CTR_EL0 access only where it is necessary
    - arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419
    - arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419
    - arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space
    - aws: [Config] updateconfigs for ARM64_ERRATUM_1542419

  [ Ubuntu: 4.15.0-75.85 ]

  * bionic/linux: 4.15.0-75.85 -proposed tracker (LP: #1859705)
  * use-after-free in i915_ppgtt_close (LP: #1859522) // CVE-2020-7053
    - SAUCE: drm/i915: Fix use-after-free when destroying GEM context
  * CVE-2019-14615
    - drm/i915/gen9: Clear residual context state on context switch
  * PAN is broken for execute-only user mappings on ARMv8 (LP: #1858815)
    - arm64: Revert support for execute-only user mappings
  * [Regression] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
    (LP: #1856608)
    - SAUCE: Revert "usb: handle warm-reset port requests on hub resume"
  * Miscellaneous Ubuntu changes
    - update dkms package versions

  [ Ubuntu: 4.15.0-74.84 ]

  * bionic/linux: 4.15.0-74.84 -proposed tracker (LP: #1856749)
  * [Hyper-V] KVP daemon fails to start on first boot of disco VM (LP: #1820063)
    - [Packaging] bind hv_kvp_daemon startup to hv_kvp device
  * Unrevert "arm64: Use firmware to detect CPUs that are not affected by
    Spectre-v2" (LP: #1854207)
    - arm64: Get rid of __smccc_workaround_1_hvc_*
    - arm64: Use firmware to detect CPUs that are not affected by Spectre-v2
  * Bionic kernel panic on Cavium ThunderX CN88XX (LP: #1853485)
    - SAUCE: irqchip/gic-v3-its: Add missing return value in
      its_irq_domain_activate()

 -- Connor Kuehl <email address hidden> Wed, 15 Jan 2020 10:27:24 -0800

Changed in linux-aws (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in linux-aws-5.0 (Ubuntu Bionic):
status: New → Fix Committed
Changed in linux-aws (Ubuntu Disco):
status: New → Fix Committed
Andrea Righi (arighi)
Changed in linux-aws (Ubuntu Eoan):
assignee: nobody → Andrea Righi (arighi)
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (28.8 KiB)

This bug was fixed in the package linux-aws-5.0 - 5.0.0-1027.30

---------------
linux-aws-5.0 (5.0.0-1027.30) bionic; urgency=medium

  * bionic/linux-aws-5.0: 5.0.0-1027.30 -proposed tracker (LP: #1865434)

  [ Ubuntu: 5.0.0-43.47 ]

  * disco/linux: 5.0.0-43.47 -proposed tracker (LP: #1865110)
  * CVE-2020-2732
    - KVM: nVMX: Don't emulate instructions in guest mode
    - KVM: nVMX: Refactor IO bitmap checks into helper function
    - KVM: nVMX: Check IO instruction VM-exit conditions

linux-aws-5.0 (5.0.0-1026.29) bionic; urgency=medium

  * bionic/linux-aws-5.0: 5.0.0-1026.29 -proposed tracker (LP: #1863281)

  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - [config] linux-aws: remove CONFIG_ALLOW_LOCKDOWN_LIFT_BY_SYSRQ

  * hibernation support for linux-aws (LP: #1831940)
    - UBUNTU SAUCE [aws] PM / hibernate: reduce memory pressure during image
      writing
    - UBUNTU SAUCE [aws]: PM / hibernate: make sure pm_async is always disabled
    - UBUNTU SAUCE [aws]: PM / hibernate: set image_size to 0 by default
    - UBUNTU SAUCE [aws]: ACPICA: Enable sleep button on ACPI legacy wake
    - UBUNTU SAUCE [aws]: block: xen-blkfront: consider new dom0 features on
      restore
    - UBUNTU SAUCE [aws]: xen: restore pirqs on resume from hibernation.
    - UBUNTU SAUCE [aws]: xen: Only restore the ACPI SCI interrupt in
      xen_restore_pirqs.

  * linux-aws: swapoff optimization (LP: #1858618)
    - mm: refactor swap-in logic out of shmem_getpage_gfp
    - mm: rid swapoff of quadratic complexity
    - UBUNTU SAUCE [aws]: mm: swap: improve swap readahead heuristic

  [ Ubuntu: 5.0.0-42.46 ]

  * disco/linux: 5.0.0-42.46 -proposed tracker (LP: #1863297)
  * CVE-2019-3016
    - KVM: Introduce a new guest mapping API
    - kvm: fix compilation on aarch64
    - kvm: fix compilation on s390
    - kvm: fix compile on s390 part 2
    - KVM: Properly check if "page" is valid in kvm_vcpu_unmap
    - x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit
    - x86/kvm: Introduce kvm_(un)map_gfn()
    - x86/kvm: Cache gfn to pfn translation
    - x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed
    - x86/KVM: Clean up host's steal time structure
  * Dell XPS 13 (7390) Display Flickering - 19.10 (LP: #1849947)
    - SAUCE: drm/i915: Disable PSR by default on all platforms
  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - Revert "UBUNTU: SAUCE: (efi-lockdown) Add a SysRq option to lift kernel
      lockdown"
  * Disco update: upstream stable patchset 2020-02-07 (LP: #1862418)
    - ARM: dts: meson8: fix the size of the PMU registers
    - clk: qcom: gcc-sdm845: Add missing flag to votable GDSCs
    - dt-bindings: reset: meson8b: fix duplicate reset IDs
    - ARM: dts: imx6q-dhcom: fix rtc compatible
    - clk: Don't try to enable critical clocks if prepare failed
    - ASoC: msm8916-wcd-digital: Reset RX interpolation path after use
    - iio: buffer: align the size of scan bytes to size of the largest element
    - USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx
    - USB: serial: option: Add support for Quectel RM500Q
    - USB: serial: opticon: fix control-message timeouts
    - USB: ser...

Changed in linux-aws-5.0 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in linux-aws (Ubuntu Eoan):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-aws - 5.4.0-1007.7

---------------
linux-aws (5.4.0-1007.7) focal; urgency=medium

  [ Ubuntu: 5.4.0-21.25 ]

  * CVE-2020-8835
    - SAUCE: bpf: undo incorrect __reg_bound_offset32 handling

 -- Thadeu Lima de Souza Cascardo <email address hidden> Fri, 27 Mar 2020 17:06:08 -0300

Changed in linux-aws (Ubuntu Focal):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (65.7 KiB)

This bug was fixed in the package linux-aws - 5.3.0-1017.18

---------------
linux-aws (5.3.0-1017.18) eoan; urgency=medium

  * eoan/linux-aws: 5.3.0-1017.18 -proposed tracker (LP: #1870709)

  * hibernation support for linux-aws (LP: #1831940)
    - UBUNTU SAUCE [aws] PM / hibernate: reduce memory pressure during image
      writing
    - UBUNTU SAUCE [aws]: PM / hibernate: make sure pm_async is always disabled
    - UBUNTU SAUCE [aws]: PM / hibernate: set image_size to 0 by default
    - UBUNTU SAUCE [aws]: ACPICA: Enable sleep button on ACPI legacy wake
    - UBUNTU SAUCE [aws]: block: xen-blkfront: consider new dom0 features on
      restore
    - UBUNTU SAUCE [aws]: xen: restore pirqs on resume from hibernation.
    - UBUNTU SAUCE [aws]: xen: Only restore the ACPI SCI interrupt in
      xen_restore_pirqs.

  * linux-aws: swapoff optimization (LP: #1858618)
    - UBUNTU SAUCE [aws]: mm: swap: improve swap readahead heuristic

  * Root can lift kernel lockdown via USB/IP (LP: #1861238)
    - [Config] aws: really remove option to lift lockdown via SysRq

  [ Ubuntu: 5.3.0-47.39 ]

  * eoan/linux: 5.3.0-47.39 -proposed tracker (LP: #1870720)
  * Packaging resync (LP: #1786013)
    - update dkms package versions
  * All PS/2 ports on PS/2 Serial add-in bracket are not working after S3
    (LP: #1866734)
    - SAUCE: Input: i8042 - fix the selftest retry logic
  * Eoan update: upstream stable patchset 2020-03-31 (LP: #1869908)
    - ACPI: watchdog: Allow disabling WDAT at boot
    - HID: apple: Add support for recent firmware on Magic Keyboards
    - cfg80211: check reg_rule for NULL in handle_channel_custom()
    - scsi: libfc: free response frame from GPN_ID
    - net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch
    - net: ks8851-ml: Fix IRQ handling and locking
    - mac80211: rx: avoid RCU list traversal under mutex
    - signal: avoid double atomic counter increments for user accounting
    - slip: not call free_netdev before rtnl_unlock in slip_open
    - hinic: fix a irq affinity bug
    - hinic: fix a bug of setting hw_ioctxt
    - net: rmnet: fix NULL pointer dereference in rmnet_newlink()
    - net: rmnet: fix NULL pointer dereference in rmnet_changelink()
    - net: rmnet: fix suspicious RCU usage
    - net: rmnet: remove rcu_read_lock in rmnet_force_unassociate_device()
    - net: rmnet: do not allow to change mux id if mux id is duplicated
    - net: rmnet: use upper/lower device infrastructure
    - net: rmnet: fix bridge mode bugs
    - net: rmnet: fix packet forwarding in rmnet bridge mode
    - sfc: fix timestamp reconstruction at 16-bit rollover points
    - jbd2: fix data races at struct journal_head
    - driver core: Remove device link creation limitation
    - driver core: Fix creation of device links with PM-runtime flags
    - net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue
    - ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional()
    - ARM: 8958/1: rename missed uaccess .fixup section
    - mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
    - HID: google: add moonball USB id
    - ipv4: ensure rcu_read_lock() in cipso_v4_error()
    - netfilter: hashlimit: do not use indir...

Changed in linux-aws (Ubuntu Eoan):
status: Fix Committed → Fix Released
Steve Langasek (vorlon)
Changed in linux-aws (Ubuntu Disco):
status: Fix Committed → Won't Fix
Revision history for this message
Brian Murray (brian-murray) wrote :

The Eoan Ermine has reached end of life, so this bug will not be fixed for that release

Changed in linux-aws-5.0 (Ubuntu Eoan):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.