linux-aws: swapoff optimization

Bug #1858618 reported by Andrea Righi on 2020-01-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-aws (Ubuntu)
Undecided
Andrea Righi
Bionic
Undecided
Andrea Righi
Disco
High
Andrea Righi
linux-aws-5.0 (Ubuntu)
Undecided
Unassigned
Bionic
High
Unassigned
Disco
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.

CVE References

Andrea Righi (arighi) on 2020-01-07
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) on 2020-01-16
Changed in linux-aws (Ubuntu Disco):
importance: Undecided → High
assignee: nobody → Andrea Righi (arighi)
Stefan Bader (smb) on 2020-01-16
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
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers