ACK/cmt: [SRU][D / B aws-edge][aws][PULL v3] proper hibernation support
Khaled Elmously
khalid.elmously at canonical.com
Thu Feb 13 18:50:58 UTC 2020
On 2020-02-13 11:36:26 , Andrea Righi wrote:
> On Wed, Feb 12, 2020 at 05:23:10PM -0500, Khaled Elmously wrote:
> > I don't think the following points are necessarily "mistakes", but a few things looked a little strange so I thought I'd point them out:
> > 1- In "UBUNTU SAUCE [aws]: mm: swap: improve swap readahead heuristic", the refactored function "static unsigned long swapin_nr_pages(unsigned long offset)" no longer uses 'offset' at all. Is that expected? Why not change the function signature then?
>
> I actually thought about changing the signature, but maintaining the
> same prototype reduces the risk of breaking other potential users of
> this function, making the patch easier to maintain.
>
> > 2- In "UBUNTU SAUCE [aws]: PM / hibernate: make sure pm_async is always disabled", you changed "int pm_async_enabled = 1;" to make it "int pm_async_enabled;" in order to "make sure that pm_async is never enabled" - yet you don't explicitly set it to 0 on initialization. I assume that it will default to 0 (due to BSS initialization?), but I wasn't sure if maybe you had different intentions.
>
> Yeah.. the comment of this patch is a bit misleading, we actually want
> to set the default to be off, we don't necessarily want to prevent
> having pm_async enabled. Probably a better title would have been:
> "PM / hibernate: make pm_async disabled by default".
>
> I can change the description and send another pull request.
>
> > 3- In "UBUNTU SAUCE [aws]: PM / hibernate: set image_size to 0 by default", the patch description says "Set image_size to 0 by default so that..." yet the patch doesn't set image_size to 0 or to any value at all. Maybe by removing the assignment you are ensuring that it will always remain 0 but in that case then the patch description is inaccurate/misleading.
>
> Removing the code that initializes image_size guarantees that the value
> will be 0 by default, because of bss initialization. I could have added
> an explicit "image_size = 0", but I don't think it's necessary.
> Moreover, like pm_async, we don't want to prevent changing this value,
> we just want to change the default.
>
> >
> >
> > If you can please confirm that you're aware of and OK with those issues, you have my ACK :)
> >
> > Thanks
> > Khaled
>
> Thanks for the review!
Thanks for the clarification Andrea. Yeah they didn't really look like mistakes but I just wanted to confirm.
Looks good to me, +1.
But I don't think this patch needs to be nominated separately for aws-edge.. aws-edge should just get those changes when it is rebased on D.
Acked-by: Khalid Elmously <khalid.elmously at canonical.com>
>
> -Andrea
>
> >
> > On 2020-02-11 08:33:35 , Andrea Righi wrote:
> > > BugLink: https://bugs.launchpad.net/bugs/1858618
> > > BugLink: https://bugs.launchpad.net/bugs/1831940
> > >
> > > The following patches are required to properly support hibernation with
> > > bionic:linux-aws-edge / disco:linux-aws.
> > >
> > > The most important patch is "PM / hibernate: memory_bm_find_bit():
> > > Tighten node optimisation": this is a very critical bug fix for
> > > hibernation that prevents potential memory corruptions on resume.
> > >
> > > All the other hibernation-related SAUCE patches are required to improve
> > > swapoff performance after a successful resume.
> > >
> > > Moreover, some Xen-related patches have been included (ported from
> > > bionic:linux-aws).
> > >
> > > All these patches have been tested in the AWS environment with positive
> > > results.
> > >
> > > Changes in v3:
> > > - added missing BugLink information
> > > - added "cherry picked" lines for upstream patches
> > >
> > > Changes in v2:
> > > - added missing Xen-related patches
> > > - added pm_async and image_size tunings
> > >
> > > The following changes since commit 0f84693e79c7c596ac56d952851e0b9527679689:
> > >
> > > UBUNTU: Ubuntu-aws-edge-5.0.0-1019.21~18.04.1 (2019-10-03 00:49:16 -0400)
> > >
> > > are available in the Git repository at:
> > >
> > > git://git.launchpad.net/~arighi/+git/bionic-linux aws-edge-arighi
> > >
> > > for you to fetch changes up to b4aa4088c1582fa27c63532788b4d7087b1bbafa:
> > >
> > > UBUNTU SAUCE [aws]: xen: Only restore the ACPI SCI interrupt in xen_restore_pirqs. (2020-02-11 08:32:11 +0100)
> > >
> > > ----------------------------------------------------------------
> > > Anchal Agarwal (1):
> > > UBUNTU SAUCE [aws]: ACPICA: Enable sleep button on ACPI legacy wake
> > >
> > > Andrea Righi (4):
> > > UBUNTU SAUCE [aws] PM / hibernate: reduce memory pressure during image writing
> > > UBUNTU SAUCE [aws]: mm: swap: improve swap readahead heuristic
> > > UBUNTU SAUCE [aws]: PM / hibernate: make sure pm_async is always disabled
> > > UBUNTU SAUCE [aws]: PM / hibernate: set image_size to 0 by default
> > >
> > > Andy Whitcroft (1):
> > > PM / hibernate: memory_bm_find_bit(): Tighten node optimisation
> > >
> > > Eduardo Valentin (1):
> > > UBUNTU SAUCE [aws]: block: xen-blkfront: consider new dom0 features on restore
> > >
> > > Frank van der Linden (2):
> > > UBUNTU SAUCE [aws]: xen: restore pirqs on resume from hibernation.
> > > UBUNTU SAUCE [aws]: xen: Only restore the ACPI SCI interrupt in xen_restore_pirqs.
> > >
> > > Vineeth Remanan Pillai (2):
> > > mm: refactor swap-in logic out of shmem_getpage_gfp
> > > mm: rid swapoff of quadratic complexity
> > >
> > > arch/x86/xen/suspend.c | 2 +
> > > drivers/acpi/acpica/hwsleep.c | 11 +
> > > drivers/block/xen-blkfront.c | 3 +
> > > drivers/xen/events/events_base.c | 45 +++
> > > include/linux/frontswap.h | 7 +
> > > include/linux/shmem_fs.h | 3 +-
> > > include/xen/events.h | 1 +
> > > kernel/power/main.c | 4 +-
> > > kernel/power/snapshot.c | 10 +-
> > > kernel/power/swap.c | 24 +-
> > > mm/shmem.c | 716 +++++++++++++++++++++------------------
> > > mm/swap.c | 2 +-
> > > mm/swap_state.c | 60 +---
> > > mm/swapfile.c | 433 +++++++++--------------
> > > 14 files changed, 646 insertions(+), 675 deletions(-)
> > >
> > > --
> > > kernel-team mailing list
> > > kernel-team at lists.ubuntu.com
> > > https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list