[SRU][PULL v4][G/aws] config changes to improve hibernation on Xen instance types

Andrea Righi andrea.righi at canonical.com
Thu Nov 5 18:05:48 UTC 2020


BugLink: https://bugs.launchpad.net/bugs/1902926
BugLink: https://bugs.launchpad.net/bugs/1732512
BugLink: https://bugs.launchpad.net/bugs/1879711

[Impact]

The 5.8 kernel (groovy) is not still 100% reliable with hibernation,
especially on the Xen instance type. However, re-aligning the config
options as much as possible with the 5.4 kernel (focal) allows to
hibernate and resume with a success rate close to 100% (according to our
tests on the AWS cloud).

[Test case]

 - spin up an AWS instance (for example a c4.8xlarge instance type)
 - run a memory stress test
 - hibernate
 - resume
 - verify that the system has been resumed correctly and the memory
   stress test is still running

[Fix]

The following fixes must be applied to improve hibernation/resume
reliability:

 - disable CONFIG_SUSPEND (suspend to memory is not supported in AWS and
   it can introduce a deadlock condition with the Xen hibernation layer)
 - make sure CONFIG_DMA_CMA is disabled (this introduces another
   deadlock condition with Xen)
 - disable CONFIG_FB_HYPERV: this would enable CONFIG_DMA_CMA and we
   don't want that (to prevent the Xen deadlock); moreover this driver
   is not needed at all in the AWS environment
 - disable CONFIG_XEN_FBDEV_FRONTEND: this is also not required in the
   AWS environement and it has the potential of breaking hibernation
 - disable CONFIG_INPUT_XEN_KBDDEV_FRONTEND
 - disable CONFIG_XEN_BALLOON
 - make sure xen-netfront is *not* compiled as a module, otherwise
   it seems that the network is not properly resumed on the t2 instance
   types (enforce that in the annotations file to prevent changing it
   again in the future)
 - remove all sound-related modules (not really needed in the AWS cloud,
   they were also disabled on 5.4)

[Regression potential]

These are all .config changes. With these changes we are basically
re-aligning with the previous 5.4 settings and we have experimentally
verified (tests) that these changes are increasing the success rate of
hibernation. So the regression potential is minimal.

Changes v3 -> v4:
 - enforce xen-netfront to be statically compiled in the kernel
   (otherwise the network is not properly resumed on the t2 instance types)

----------------------------------------------------------------
The following changes since commit f352dd559e7c0ab7aa8db3b91f698e4cbbfbcbe3:

  UBUNTU: Ubuntu-aws-5.8.0-1011.11 (2020-10-22 11:23:44 +0200)

are available in the Git repository at:

  git://git.launchpad.net/~arighi/ubuntu/+source/linux-aws/+git/groovy tags/aws-config-update

for you to fetch changes up to 6f973e789d4bec33c42a21dcbddf3a8a5596cb45:

  UBUNTU: [Config] [aws] remove all sound-related modules (2020-11-05 18:39:59 +0100)

----------------------------------------------------------------
Andrea Righi (7):
      UBUNTU: [Config] [aws] make sure CONFIG_FB_HYPERV is disabled
      UBUNTU: [Config] [aws] make sure CONFIG_SUSPEND is disabled
      UBUNTU: [Config] [aws] disable CONFIG_XEN_FBDEV_FRONTEND
      UBUNTU: [Config] [aws] disable CONFIG_INPUT_XEN_KBDDEV_FRONTEND
      UBUNTU: [Config] [aws] disable CONFIG_XEN_BALLOON on amd64
      UBUNTU: [Config] [aws] enforce CONFIG_XEN_NETDEV_FRONTEND
      UBUNTU: [Config] [aws] remove all sound-related modules

 debian.aws/abi/5.8.0-1010.10/amd64/aws.modules | 478 -----------------
 debian.aws/abi/5.8.0-1010.10/arm64/aws.modules | 479 -----------------
 debian.aws/config/amd64/config.common.amd64    |   3 +-
 debian.aws/config/annotations                  | 655 +----------------------
 debian.aws/config/arm64/config.common.arm64    |   3 +-
 debian.aws/config/config.common.ubuntu         | 693 +------------------------
 debian.aws/control.d/aws.inclusion-list        |   1 -
 7 files changed, 21 insertions(+), 2291 deletions(-)



More information about the kernel-team mailing list