[igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
Chris Wilson
chris at chris-wilson.co.uk
Fri Nov 22 00:55:18 UTC 2019
Quoting Hiatt, Don (2019-11-22 00:52:53)
>
>
> > From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Hiatt, Don
> > Sent: Thursday, November 21, 2019 4:41 PM
> > To: Chris Wilson <chris at chris-wilson.co.uk>; igt-dev at lists.freedesktop.org
> > Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend
> > to disk
> >
> > > From: Chris Wilson <chris at chris-wilson.co.uk>
> > > Sent: Thursday, November 21, 2019 4:36 PM
> > > To: Hiatt, Don <don.hiatt at intel.com>; igt-dev at lists.freedesktop.org
> > > Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend
> > > to disk
> > >
> > > Quoting don.hiatt at intel.com (2019-11-22 00:43:53)
> > > > From: Don Hiatt <don.hiatt at intel.com>
> > > >
> > > > Suspending to disk requires swap space, make sure it exists
> > > > before attempting to suspend to disk.
> > > >
> > > > Cc: Sujaritha Sundaresan <sujaritha.sundaresan at intel.com>
> > > > Signed-off-by: Don Hiatt <don.hiatt at intel.com>
> > > > ---
> > > > lib/igt_aux.c | 4 ++++
> > > > 1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > > index 578f857933f0..31c01624a651 100644
> > > > --- a/lib/igt_aux.c
> > > > +++ b/lib/igt_aux.c
> > > > @@ -864,6 +864,10 @@ void igt_system_suspend_autoresume(enum
> > > igt_suspend_state state,
> > > > igt_require(test == SUSPEND_TEST_NONE ||
> > > > faccessat(power_dir, "pm_test", R_OK | W_OK, 0) == 0);
> > > >
> > > > + if (state == SUSPEND_STATE_DISK)
> > > > + igt_require_f(intel_get_total_swap_mb() > 0,
> > >
> > > igt_skip_f(state == SUSPEND_STATE_DISK &&
> > > !intel_get_total_swap_mb(
> ),
> > >
> > > > + "Suspend to disk requires swap space.\n");
> > > > +
> > > > orig_test = get_suspend_test(power_dir);
> > > > set_suspend_test(power_dir, test);
> > > >
> >
> > Ahh! Thanks, Chris! I'll submit another one. Thank you!
> >
>
> Hi Chris, sorry, I don't see any igt_skip_f(), sorry if I'm missing something.
igt_skip_on_f()
-Chris
More information about the igt-dev
mailing list