All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-22  0:43 [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk don.hiatt
@ 2019-11-22  0:36 ` Chris Wilson
  2019-11-22  0:40   ` Hiatt, Don
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2019-11-22  0:36 UTC (permalink / raw)
  To: don.hiatt, igt-dev

Quoting don.hiatt@intel.com (2019-11-22 00:43:53)
> From: Don Hiatt <don.hiatt@intel.com>
> 
> Suspending to disk requires swap space, make sure it exists
> before attempting to suspend to disk.
> 
> Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> Signed-off-by: Don Hiatt <don.hiatt@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);
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-22  0:36 ` Chris Wilson
@ 2019-11-22  0:40   ` Hiatt, Don
  2019-11-22  0:52     ` Hiatt, Don
  0 siblings, 1 reply; 11+ messages in thread
From: Hiatt, Don @ 2019-11-22  0:40 UTC (permalink / raw)
  To: Chris Wilson, igt-dev

> From: Chris Wilson <chris@chris-wilson.co.uk>
> Sent: Thursday, November 21, 2019 4:36 PM
> To: Hiatt, Don <don.hiatt@intel.com>; igt-dev@lists.freedesktop.org
> Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend
> to disk
> 
> Quoting don.hiatt@intel.com (2019-11-22 00:43:53)
> > From: Don Hiatt <don.hiatt@intel.com>
> >
> > Suspending to disk requires swap space, make sure it exists
> > before attempting to suspend to disk.
> >
> > Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> > Signed-off-by: Don Hiatt <don.hiatt@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!

> > --
> > 2.17.1
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
@ 2019-11-22  0:43 don.hiatt
  2019-11-22  0:36 ` Chris Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: don.hiatt @ 2019-11-22  0:43 UTC (permalink / raw)
  To: igt-dev

From: Don Hiatt <don.hiatt@intel.com>

Suspending to disk requires swap space, make sure it exists
before attempting to suspend to disk.

Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Signed-off-by: Don Hiatt <don.hiatt@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,
+			      "Suspend to disk requires swap space.\n");
+
 	orig_test = get_suspend_test(power_dir);
 	set_suspend_test(power_dir, test);
 
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-22  0:40   ` Hiatt, Don
@ 2019-11-22  0:52     ` Hiatt, Don
  2019-11-22  0:55       ` Chris Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Hiatt, Don @ 2019-11-22  0:52 UTC (permalink / raw)
  To: Chris Wilson, igt-dev



> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Hiatt, Don
> Sent: Thursday, November 21, 2019 4:41 PM
> To: Chris Wilson <chris@chris-wilson.co.uk>; igt-dev@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@chris-wilson.co.uk>
> > Sent: Thursday, November 21, 2019 4:36 PM
> > To: Hiatt, Don <don.hiatt@intel.com>; igt-dev@lists.freedesktop.org
> > Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend
> > to disk
> >
> > Quoting don.hiatt@intel.com (2019-11-22 00:43:53)
> > > From: Don Hiatt <don.hiatt@intel.com>
> > >
> > > Suspending to disk requires swap space, make sure it exists
> > > before attempting to suspend to disk.
> > >
> > > Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> > > Signed-off-by: Don Hiatt <don.hiatt@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.

> > > --
> > > 2.17.1
> > >
> > > _______________________________________________
> > > igt-dev mailing list
> > > igt-dev@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-22  0:52     ` Hiatt, Don
@ 2019-11-22  0:55       ` Chris Wilson
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2019-11-22  0:55 UTC (permalink / raw)
  To: Hiatt, Don, igt-dev

Quoting Hiatt, Don (2019-11-22 00:52:53)
> 
> 
> > From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Hiatt, Don
> > Sent: Thursday, November 21, 2019 4:41 PM
> > To: Chris Wilson <chris@chris-wilson.co.uk>; igt-dev@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@chris-wilson.co.uk>
> > > Sent: Thursday, November 21, 2019 4:36 PM
> > > To: Hiatt, Don <don.hiatt@intel.com>; igt-dev@lists.freedesktop.org
> > > Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend
> > > to disk
> > >
> > > Quoting don.hiatt@intel.com (2019-11-22 00:43:53)
> > > > From: Don Hiatt <don.hiatt@intel.com>
> > > >
> > > > Suspending to disk requires swap space, make sure it exists
> > > > before attempting to suspend to disk.
> > > >
> > > > Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> > > > Signed-off-by: Don Hiatt <don.hiatt@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
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-26  0:49 ` Sujaritha
  2019-11-26  9:52   ` Petri Latvala
@ 2019-11-28 13:30   ` Petri Latvala
  1 sibling, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2019-11-28 13:30 UTC (permalink / raw)
  To: Sujaritha; +Cc: igt-dev

On Mon, Nov 25, 2019 at 04:49:47PM -0800, Sujaritha wrote:
> 
> On 11/21/19 5:10 PM, don.hiatt@intel.com wrote:
> > From: Don Hiatt <don.hiatt@intel.com>
> > 
> > Suspending to disk requires swap space, make sure it exists
> > before attempting to suspend to disk.
> > 
> > v2: Use igt_skip() [Thanks, Chris!]
> > v3: Use igt_skip_on_f()
> > 
> > Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Don Hiatt <don.hiatt@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..a6b114ed7e65 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);
> > +	igt_skip_on_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);
> 
> 
> This should help fix part of the reason for the suspend tests failing on CI.
> 
> Reviewed-by : Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>

Almost accidentally dropped this R-b, patchwork didn't automatically add it due to the extra space before :


This patch is merged, thanks.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-26  9:52   ` Petri Latvala
@ 2019-11-26 17:05     ` Hiatt, Don
  0 siblings, 0 replies; 11+ messages in thread
From: Hiatt, Don @ 2019-11-26 17:05 UTC (permalink / raw)
  To: Latvala, Petri, Sundaresan, Sujaritha; +Cc: igt-dev

> From: Latvala, Petri <petri.latvala@intel.com>
> Sent: Tuesday, November 26, 2019 1:53 AM
> To: Sundaresan, Sujaritha <sujaritha.sundaresan@intel.com>
> Cc: Hiatt, Don <don.hiatt@intel.com>; igt-dev@lists.freedesktop.org
> Subject: Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend
> to disk
> 
> On Mon, Nov 25, 2019 at 04:49:47PM -0800, Sujaritha wrote:
> >
> > On 11/21/19 5:10 PM, don.hiatt@intel.com wrote:
> > > From: Don Hiatt <don.hiatt@intel.com>
> > >
> > > Suspending to disk requires swap space, make sure it exists
> > > before attempting to suspend to disk.
> > >
> > > v2: Use igt_skip() [Thanks, Chris!]
> > > v3: Use igt_skip_on_f()
> > >
> > > Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Signed-off-by: Don Hiatt <don.hiatt@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..a6b114ed7e65 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);
> > > +	igt_skip_on_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);
> >
> >
> > This should help fix part of the reason for the suspend tests failing on CI.
> 
> 
> If your goal is to enable s4 tests on CI, you still have quite a bit
> of work ahead of you.
> 
> CI uses swap _files_. Suspending to swap files does work, if your
> system is configured for the location of the swap space within the
> block device (the resume_offset command line parameter). That hasn't
> been configured at this time.
> 
> Possible further complications can arise from CI not using an initrd,
> which presumably rules out using uswsusp to automate a lot of the
> resume setup.
> 
> 

Hi Petri,

That's not the current goal. I mostly want the warning on systems (e.g. RIL) that
don't have any swap at all setup as I keep getting stung by it. 😊

Thanks!

don


> --
> Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-26  0:49 ` Sujaritha
@ 2019-11-26  9:52   ` Petri Latvala
  2019-11-26 17:05     ` Hiatt, Don
  2019-11-28 13:30   ` Petri Latvala
  1 sibling, 1 reply; 11+ messages in thread
From: Petri Latvala @ 2019-11-26  9:52 UTC (permalink / raw)
  To: Sujaritha; +Cc: igt-dev

On Mon, Nov 25, 2019 at 04:49:47PM -0800, Sujaritha wrote:
> 
> On 11/21/19 5:10 PM, don.hiatt@intel.com wrote:
> > From: Don Hiatt <don.hiatt@intel.com>
> > 
> > Suspending to disk requires swap space, make sure it exists
> > before attempting to suspend to disk.
> > 
> > v2: Use igt_skip() [Thanks, Chris!]
> > v3: Use igt_skip_on_f()
> > 
> > Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Don Hiatt <don.hiatt@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..a6b114ed7e65 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);
> > +	igt_skip_on_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);
> 
> 
> This should help fix part of the reason for the suspend tests failing on CI.


If your goal is to enable s4 tests on CI, you still have quite a bit
of work ahead of you.

CI uses swap _files_. Suspending to swap files does work, if your
system is configured for the location of the swap space within the
block device (the resume_offset command line parameter). That hasn't
been configured at this time.

Possible further complications can arise from CI not using an initrd,
which presumably rules out using uswsusp to automate a lot of the
resume setup.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
  2019-11-22  1:10 don.hiatt
@ 2019-11-26  0:49 ` Sujaritha
  2019-11-26  9:52   ` Petri Latvala
  2019-11-28 13:30   ` Petri Latvala
  0 siblings, 2 replies; 11+ messages in thread
From: Sujaritha @ 2019-11-26  0:49 UTC (permalink / raw)
  To: don.hiatt, igt-dev


On 11/21/19 5:10 PM, don.hiatt@intel.com wrote:
> From: Don Hiatt <don.hiatt@intel.com>
>
> Suspending to disk requires swap space, make sure it exists
> before attempting to suspend to disk.
>
> v2: Use igt_skip() [Thanks, Chris!]
> v3: Use igt_skip_on_f()
>
> Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Don Hiatt <don.hiatt@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..a6b114ed7e65 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);
>   
> +	igt_skip_on_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);
>   


This should help fix part of the reason for the suspend tests failing on CI.

Reviewed-by : Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
@ 2019-11-22  1:10 don.hiatt
  2019-11-26  0:49 ` Sujaritha
  0 siblings, 1 reply; 11+ messages in thread
From: don.hiatt @ 2019-11-22  1:10 UTC (permalink / raw)
  To: igt-dev

From: Don Hiatt <don.hiatt@intel.com>

Suspending to disk requires swap space, make sure it exists
before attempting to suspend to disk.

v2: Use igt_skip() [Thanks, Chris!]
v3: Use igt_skip_on_f()

Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Don Hiatt <don.hiatt@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..a6b114ed7e65 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);
 
+	igt_skip_on_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);
 
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk
@ 2019-11-22  1:08 don.hiatt
  0 siblings, 0 replies; 11+ messages in thread
From: don.hiatt @ 2019-11-22  1:08 UTC (permalink / raw)
  To: igt-dev

From: Don Hiatt <don.hiatt@intel.com>

Suspending to disk requires swap space, make sure it exists
before attempting to suspend to disk.

v2: Use igt_skip() [Thanks, Chris!]

Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Don Hiatt <don.hiatt@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..f2a5bd71a110 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);
 
+	igt_skip(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);
 
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-11-28 13:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22  0:43 [igt-dev] [PATCH i-g-t] lib/aux: Ensure swap space prior to suspend to disk don.hiatt
2019-11-22  0:36 ` Chris Wilson
2019-11-22  0:40   ` Hiatt, Don
2019-11-22  0:52     ` Hiatt, Don
2019-11-22  0:55       ` Chris Wilson
2019-11-22  1:08 don.hiatt
2019-11-22  1:10 don.hiatt
2019-11-26  0:49 ` Sujaritha
2019-11-26  9:52   ` Petri Latvala
2019-11-26 17:05     ` Hiatt, Don
2019-11-28 13:30   ` Petri Latvala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.