Skip to contentSkip to conversation

tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

PATCH Superseded Marta Lofstedt 5 participants 20 messages Jun 28, 2017 – Sep 4, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -1
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)
 {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
 }
 
 static bool psr_wait_until_enabled(void)
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

+Paolo

Quoted 34 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Wednesday, June 28, 2017 2:17 PM
To: [email protected]
Cc: Latvala, Petri <[email protected]>; Lofstedt, Marta <[email protected]>
Subject: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw*
has non-consistent results, pending between fail and pass.
The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -2
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)  {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
 }
 
 static bool psr_wait_until_enabled(void)
--
Quoted 1 line

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Acked-by
#2 lore raw

Em Sex, 2017-08-04 às 09:47 +0000, Lofstedt, Marta escreveu:

Quoted 17 lines

+Paolo

Quoted 15 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Wednesday, June 28, 2017 2:17 PM
To: [email protected]
Cc: Latvala, Petri <[email protected]>; Lofstedt, Marta <[email protected]>
Subject: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait
timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:

64590c7b768dc8d8dd962f812d5ff5a39e7e8b54
    kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s

(but there's no need to make it a full revert if you don't need)

It would be nice to investigate why we're needing 5 seconds instead of 2 now, the document it in the commit message. Also document that this is a partial revert.

Quoted 14 lines
Quoted 14 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
Quoted 10 lines
Quoted 8 lines
tests/kms_frontbuffer_tracking.c +1 -2
  static bool fbc_wait_until_enabled(void)  {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
  }
 
  static bool psr_wait_until_enabled(void)
--

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 31 lines

-----Original Message-----
From: Zanoni, Paulo R
Sent: Friday, August 4, 2017 9:56 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

Em Sex, 2017-08-04 às 09:47 +0000, Lofstedt, Marta escreveu:

Quoted 16 lines

+Paolo

Quoted 14 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Wednesday, June 28, 2017 2:17 PM
To: [email protected]
Cc: Latvala, Petri <[email protected]>; Lofstedt, Marta <[email protected]>
Subject: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:

Quoted 8 lines

64590c7b768dc8d8dd962f812d5ff5a39e7e8b54
    kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s

(but there's no need to make it a full revert if you don't need)

It would be nice to investigate why we're needing 5 seconds instead of 2 now, the document it in the commit message. Also document that this is a partial revert.

Paulo, do you have data backing up that 2 seconds was ever OK, I fail ~1/10 on various fbc subtests.

/Marta

Quoted 3 lines

Thanks,

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -1
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
  static bool fbc_wait_until_enabled(void)  {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
  }
 
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
tests/kms_frontbuffer_tracking.c +0 -1
  static bool psr_wait_until_enabled(void)
--

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Em Seg, 2017-08-07 às 06:51 +0000, Lofstedt, Marta escreveu:

Quoted 37 lines
Quoted 37 lines

-----Original Message-----
From: Zanoni, Paulo R
Sent: Friday, August 4, 2017 9:56 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait
timeout to 5s

Em Sex, 2017-08-04 às 09:47 +0000, Lofstedt, Marta escreveu:

Quoted 18 lines

+Paolo

Quoted 16 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Wednesday, June 28, 2017 2:17 PM
To: [email protected]
Cc: Latvala, Petri <[email protected]>; Lofstedt, Marta <[email protected]>
Subject: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC
wait timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer
reproducible.

This is a partial revert of:

64590c7b768dc8d8dd962f812d5ff5a39e7e8b54
    kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s

(but there's no need to make it a full revert if you don't need)

Quoted 8 lines
Quoted 5 lines

It would be nice to investigate why we're needing 5 seconds instead of
2 now, the document it in the commit message. Also document that this is a
partial revert.

Paulo, do you have data backing up that 2 seconds was ever OK, I fail ~1/10 on various fbc subtests.

All the data I have is the commit message of 64590c7b and the testing I did. I would imagine something changed in the upstream tree since then, causing this to need a longer timeout, that's why I suggested investigating.

Quoted 32 lines

/Marta

Quoted 3 lines

Thanks,

Quoted 24 lines
Quoted 24 lines
Quoted 22 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -2
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
  static bool fbc_wait_until_enabled(void)  {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
  }
 
  static bool psr_wait_until_enabled(void)
--

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
Quoted 51 lines

-----Original Message-----
From: Zanoni, Paulo R
Sent: Monday, August 7, 2017 5:54 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

Em Seg, 2017-08-07 às 06:51 +0000, Lofstedt, Marta escreveu:

Quoted 39 lines
Quoted 38 lines

-----Original Message-----
From: Zanoni, Paulo R
Sent: Friday, August 4, 2017 9:56 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

Em Sex, 2017-08-04 às 09:47 +0000, Lofstedt, Marta escreveu:

Quoted 16 lines

+Paolo

Quoted 14 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Wednesday, June 28, 2017 2:17 PM
To: [email protected]
Cc: Latvala, Petri <[email protected]>; Lofstedt, Marta <[email protected]>
Subject: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:

64590c7b768dc8d8dd962f812d5ff5a39e7e8b54
    kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s

(but there's no need to make it a full revert if you don't need)

It would be nice to investigate why we're needing 5 seconds instead of
2 now, the document it in the commit message. Also document that this is a partial revert.

Quoted 7 lines
Quoted 2 lines

Paulo, do you have data backing up that 2 seconds was ever OK, I fail ~1/10 on various fbc subtests.

All the data I have is the commit message of 64590c7b and the testing I did. I would imagine something changed in the upstream tree since then, causing this to need a longer timeout, that's why I suggested investigating.

If I run current IGT with Kernel 4.2.0, which was released 30 august 2015, that should be around the time when the 64590c7b was done, all kms_frontbuffer_tracking tests fail. If I reset IGT to 64590c7b half of the flip-flopping tests consistently fail the rest consistently pass over 10 runs. If I run IGT@64590c7b on 4.13-rc3+ all kms_fronbuffer_tracking fail. So, indeed some of these tests appear to actually have passed 2 years ago, but it also seem that both the tests and the i915 have change a lot during 2 years. Anyways, I will do some timing analyze to investigate what is really going on here.

/Marta

Quoted 27 lines
Quoted 27 lines

/Marta

Quoted 3 lines

Thanks,

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -1
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
  static bool fbc_wait_until_enabled(void)  {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
  }
 
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
tests/kms_frontbuffer_tracking.c +0 -1
  static bool psr_wait_until_enabled(void)
--

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

Paulo, my currently conclusion in https://bugs.freedesktop.org/show_bug.cgi?id=101623 is that the more than 2 second wait for enable_fbs only occurs when changing between draw domains, typically between blt and mmap_cpu. To me this appear to be way too long time, but I am no expert here.
I don't think that the objective of this test is performance of domain changes, but if we have no other way to explore that issue, I guess we should not change the timeout.

/Marta

Quoted 79 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Tuesday, August 8, 2017 2:15 PM
To: Zanoni, Paulo R <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: RE: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

Quoted 49 lines

-----Original Message-----
From: Zanoni, Paulo R
Sent: Monday, August 7, 2017 5:54 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

Em Seg, 2017-08-07 às 06:51 +0000, Lofstedt, Marta escreveu:

Quoted 39 lines
Quoted 38 lines

-----Original Message-----
From: Zanoni, Paulo R
Sent: Friday, August 4, 2017 9:56 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Cc: Latvala, Petri <[email protected]>
Subject: Re: [PATCH i-g-t] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Em Sex, 2017-08-04 às 09:47 +0000, Lofstedt, Marta escreveu:

Quoted 16 lines

+Paolo

Quoted 14 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Wednesday, June 28, 2017 2:17 PM
To: [email protected]
Cc: Latvala, Petri <[email protected]>; Lofstedt, Marta <[email protected]>
Subject: [PATCH i-g-t] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:

64590c7b768dc8d8dd962f812d5ff5a39e7e8b54
    kms_frontbuffer_tracking: reduce the FBC wait timeout to 2s

(but there's no need to make it a full revert if you don't need)

It would be nice to investigate why we're needing 5 seconds instead of
2 now, the document it in the commit message. Also document that this is a partial revert.

Quoted 7 lines
Quoted 3 lines

Paulo, do you have data backing up that 2 seconds was ever OK, I fail
~1/10 on various fbc subtests.

All the data I have is the commit message of 64590c7b and the testing I did. I would imagine something changed in the upstream tree since then, causing this to need a longer timeout, that's why I suggested

investigating.

Quoted 1 line

If I run current IGT with Kernel 4.2.0, which was released 30 august 2015, that should be around the time when the 64590c7b was done, all kms_frontbuffer_tracking tests fail. If I reset IGT to 64590c7b half of the flip- flopping tests consistently fail the rest consistently pass over 10 runs. If I run IGT@64590c7b on 4.13-rc3+ all kms_fronbuffer_tracking fail. So, indeed some of these tests appear to actually have passed 2 years ago, but it also seem that both the tests and the i915 have change a lot during 2 years. Anyways, I will do some timing analyze to investigate what is really going on here.

Quoted 34 lines

/Marta

Quoted 32 lines
Quoted 32 lines

/Marta

Quoted 3 lines

Thanks,

Quoted 24 lines
Quoted 24 lines
Quoted 22 lines

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -2
index c24e4a81..8bec5d5a 100644
@@ -923,7 +923,7 @@ static bool fbc_stride_not_supported(void)
 
  static bool fbc_wait_until_enabled(void)  {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
  }
 
  static bool psr_wait_until_enabled(void)
--

2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

PATCH v2 1/1 tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s

In reply to Marta Lofstedt

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +1 -1
index e03524f1..2538450c 100644
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)
 {
-	return igt_wait(fbc_is_enabled(), 2000, 1);
+	return igt_wait(fbc_is_enabled(), 5000, 1);
 }
 
 static bool psr_wait_until_enabled(void)
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw
Quoted 5 lines · Marta Lofstedt

After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

Can this explanation be added to the code as a comment too?

Signature · 6 lines
Petri Latvala

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw
In reply to Marta Lofstedt

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 31 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644

tests/kms_frontbuffer_tracking.c static bool fbc_stride_not_supported(void) · line 926

Quoted 3 lines
tests/kms_frontbuffer_tracking.c +0 -0
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)
 {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the timeout.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw
Quoted 44 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 33 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu.
The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
Quoted 5 lines

tests/kms_frontbuffer_tracking.c static bool fbc_stride_not_supported(void) · line 925

Quoted 1 line
tests/kms_frontbuffer_tracking.c +0 -0
 static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the timeout.
-Chris

OK, I will test that and do a V3 if it works!
/Marta
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#11 lore raw
In reply to Chris Wilson
Quoted 53 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>; [email protected]
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoted 42 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 33 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu.
The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
Quoted 8 lines
Quoted 5 lines

tests/kms_frontbuffer_tracking.c static bool fbc_stride_not_supported(void) · line 925

Quoted 1 line
tests/kms_frontbuffer_tracking.c +0 -0
 static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the timeout.
-Chris

OK, I will test that and do a V3 if it works!
/Marta

I did some initial testing with igt_drop_caches_set inside fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the runtime of the tests quite a bit. So, maybe the igt_drop_caches_set should be placed somewhere else so it will give runtime improvements not only for the FBC related sub-tests. /Marta
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

Quoting Lofstedt, Marta (2017-08-25 13:50:16)

Quoted 59 lines
Quoted 59 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>; [email protected]
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoted 47 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 32 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu.
The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644

tests/kms_frontbuffer_tracking.c static bool fbc_stride_not_supported(void) · line 925

Quoted 2 lines
tests/kms_frontbuffer_tracking.c +0 -0
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the timeout.
-Chris

Quoted 4 lines
Quoted 2 lines

OK, I will test that and do a V3 if it works!
/Marta

I did some initial testing with igt_drop_caches_set inside fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the runtime of the tests quite a bit. So, maybe the igt_drop_caches_set should be placed somewhere else so it will give runtime improvements not only for the FBC related sub-tests.

Sure, all the waits can do with the retire first, give it a common function and a comment for the rationale (which should pretty much the same as given in the changelog). Anytime we use the GPU to invalidate the frontbuffer tracking, we have to wait for a retire to do the flush. Retirement is lazy, and is normally driven by GPU activity but we have a background kworker to make sure we notice when the system becomes idle independent of userspace - except it's low frequency.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#13 lore raw

+paulo

Quoted 80 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 4:12 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Lofstedt, Marta (2017-08-25 13:50:16)

Quoted 12 lines
Quoted 12 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>; [email protected]
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2]

tests/kms_frontbuffer_tracking:

Quoted 42 lines
Quoted 42 lines
Quoted 41 lines

increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 32 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644

tests/kms_frontbuffer_tracking.c static bool fbc_stride_not_supported(void) · line 925

Quoted 2 lines
tests/kms_frontbuffer_tracking.c +0 -0
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the timeout.
-Chris

Quoted 4 lines
Quoted 2 lines

OK, I will test that and do a V3 if it works!
/Marta

I did some initial testing with igt_drop_caches_set inside

fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the runtime of the tests quite a bit. So, maybe the igt_drop_caches_set should be placed somewhere else so it will give runtime improvements not only for the FBC related sub- tests.

Quoted 8 lines

Sure, all the waits can do with the retire first, give it a common function and a comment for the rationale (which should pretty much the same as given in the changelog). Anytime we use the GPU to invalidate the frontbuffer tracking, we have to wait for a retire to do the flush.
Retirement is lazy, and is normally driven by GPU activity but we have a background kworker to make sure we notice when the system becomes idle independent of userspace - except it's low frequency.
-Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw

I can no longer reproduce the flip/flopping "FBC disabled" on the kms_frontbuffer_tracking tests. Instead I hit:

WARNING: CPU: 2 PID: 25732 at drivers/gpu/drm/i915/intel_fbc.c:1173
WARNING: CPU: 2 PID: 25732 at drivers/gpu/drm/i915/intel_fbc.c:1141

/Marta

Quoted 21 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 4:34 PM
To: Chris Wilson <[email protected]>; [email protected]
Cc: Zanoni, Paulo R <[email protected]>
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

+paulo

Quoted 11 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 4:12 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Lofstedt, Marta (2017-08-25 13:50:16)

Quoted 2 lines
Quoted 78 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>;
[email protected]
Subject: RE: [Intel-gfx] [PATCH i-g-t v2]

tests/kms_frontbuffer_tracking:

Quoted 71 lines
Quoted 10 lines
Quoted 10 lines

increase FBC wait timeout to 5s

Quoted 6 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2]

tests/kms_frontbuffer_tracking:

Quoted 42 lines
Quoted 42 lines
Quoted 41 lines

increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 32 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s.
After investigating the timeout needed, the conclusion is that the longer timeout is only needed when the test swaps between some specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644

tests/kms_frontbuffer_tracking.c static bool fbc_stride_not_supported(void) · line 925

Quoted 2 lines
tests/kms_frontbuffer_tracking.c +0 -0
@@ -924,7 +924,7 @@ static bool fbc_stride_not_supported(void)
 
 static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the timeout.
-Chris

Quoted 4 lines
Quoted 2 lines

OK, I will test that and do a V3 if it works!
/Marta

I did some initial testing with igt_drop_caches_set inside

fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the runtime of the tests quite a bit. So, maybe the igt_drop_caches_set should be placed somewhere else so it will give runtime improvements not only for the FBC related sub- tests.

Sure, all the waits can do with the retire first, give it a common function and a comment for the rationale (which should pretty much the same as given in the changelog). Anytime we use the GPU to invalidate the frontbuffer tracking, we have to wait for a retire to do the flush. Retirement is lazy, and is normally driven by GPU activity but we have a background kworker to make sure we notice when the system becomes idle independent of userspace - except it's low frequency. -Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#15 lore raw
In reply to Chris Wilson

Em Sex, 2017-08-25 às 14:11 +0100, Chris Wilson escreveu:

Quoted 79 lines

Quoting Lofstedt, Marta (2017-08-25 13:50:16)

Quoted 71 lines
Quoted 68 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>; [email protected] eedesktop.org
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoted 48 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 38 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer
reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s. After investigating the timeout needed, the conclusion is that the
longer timeout is only needed when the test swaps between some
specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw
domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644
@@ -924,7 +924,7 @@ static bool
 fbc_stride_not_supported(void)
 
Quoted 6 lines

tests/kms_frontbuffer_tracking.c static bool · line 926

Quoted 1 line
tests/kms_frontbuffer_tracking.c +0 -0
  static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the
timeout.
-Chris

Quoted 2 lines

OK, I will test that and do a V3 if it works!
/Marta

Quoted 6 lines

I did some initial testing with igt_drop_caches_set inside fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the runtime of the tests quite a bit. So, maybe the igt_drop_caches_set should be placed somewhere else so it will give runtime improvements not only for the FBC related sub-tests.

Quoted 4 lines

Sure, all the waits can do with the retire first, give it a common function and a comment for the rationale (which should pretty much the
same as given in the changelog).

We can do that, sure, especially if it makes the tests faster...

Quoted 8 lines

Anytime we use the GPU to invalidate
the frontbuffer tracking, we have to wait for a retire to do the flush.
Retirement is lazy, and is normally driven by GPU activity but we have a
background kworker to make sure we notice when the system becomes idle
independent of userspace - except it's low frequency.

... but our current 2s timeout should have been enough for that, shouldn't it? If I'm looking at the right part of the code, retirement should be once per second, so 2s should have been enough. But it looks like it's not enough

Unless I'm misinterpreting the round_up part, which could convert the 1s to 2s, which would still probably be fine...

Anyway, 3s looks like as definitely safe even in this case. Maybe we could go with 3s?

We can both increase the timeout *and* do cache dropping. Although I think not doing the cache dropping is definitely something that needs to be tested, so doing the cache dropping every time may not be a good idea.

Quoted 5 lines

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#16 lore raw

Quoting Paulo Zanoni (2017-09-01 20:12:01)

Quoted 96 lines

Em Sex, 2017-08-25 às 14:11 +0100, Chris Wilson escreveu:

Quoted 79 lines

Quoting Lofstedt, Marta (2017-08-25 13:50:16)

Quoted 71 lines
Quoted 68 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>; [email protected] eedesktop.org
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoted 48 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 38 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass. The fails are always due to "FBC disabled".
With this increase in timeout the flip-flop behavior is no longer
reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s. After investigating the timeout needed, the conclusion is that the
longer timeout is only needed when the test swaps between some
specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw
domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644
@@ -924,7 +924,7 @@ static bool
 fbc_stride_not_supported(void)
 
Quoted 6 lines

tests/kms_frontbuffer_tracking.c static bool · line 926

Quoted 1 line
tests/kms_frontbuffer_tracking.c +0 -0
  static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the
timeout.
-Chris

Quoted 2 lines

OK, I will test that and do a V3 if it works!
/Marta

Quoted 6 lines

I did some initial testing with igt_drop_caches_set inside fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the runtime of the tests quite a bit. So, maybe the igt_drop_caches_set should be placed somewhere else so it will give runtime improvements not only for the FBC related sub-tests.

Quoted 4 lines

Sure, all the waits can do with the retire first, give it a common function and a comment for the rationale (which should pretty much the
same as given in the changelog).

We can do that, sure, especially if it makes the tests faster...

Quoted 8 lines

Anytime we use the GPU to invalidate
the frontbuffer tracking, we have to wait for a retire to do the flush.
Retirement is lazy, and is normally driven by GPU activity but we have a
background kworker to make sure we notice when the system becomes idle
independent of userspace - except it's low frequency.

Quoted 7 lines

... but our current 2s timeout should have been enough for that, shouldn't it? If I'm looking at the right part of the code, retirement should be once per second, so 2s should have been enough. But it looks like it's not enough

Unless I'm misinterpreting the round_up part, which could convert the 1s to 2s, which would still probably be fine...

It can bump the wait by upto a second (it tries to align wakeups on second boundaries). And we may skip the work if the device is busy elsewhere.

Quoted 7 lines

Anyway, 3s looks like as definitely safe even in this case. Maybe we could go with 3s?

We can both increase the timeout *and* do cache dropping. Although I think not doing the cache dropping is definitely something that needs to be tested, so doing the cache dropping every time may not be a good idea.

You are not dropping the caches, it is just doing a retire.

The real question is what is the expectation? If we want the test to simply state that when ready FBC et al will be re-enabled, then just add a synchronous debugfs that establishes the condition in the driver that FBC should be ready (atm that is DROP_RETIRE, but you will probably want a better specified knob). If the test is to make sure that FBC is reenabled automatically, then we need to think some more. In a normal workload, this should be the case (since the retire worker you rely on is for hostile userspace). If you simply look at the hostile userspace (and you already are for the frontbuffer writes), then a longer timeout is definitely acceptable, but how long? What is that limit?

If you define an upper bound for how long you allow fbc et al to remain off, then we will need an explicit timer to match.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#17 lore raw

Em Seg, 2017-09-04 às 11:45 +0100, Chris Wilson escreveu:

Quoted 112 lines

Quoting Paulo Zanoni (2017-09-01 20:12:01)

Quoted 111 lines

Em Sex, 2017-08-25 às 14:11 +0100, Chris Wilson escreveu:

Quoted 85 lines

Quoting Lofstedt, Marta (2017-08-25 13:50:16)

Quoted 75 lines
Quoted 72 lines

-----Original Message-----
From: Lofstedt, Marta
Sent: Friday, August 25, 2017 2:54 PM
To: 'Chris Wilson' <[email protected]>; intel-gfx@list s.fr
eedesktop.org
Subject: RE: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoted 51 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Friday, August 25, 2017 1:47 PM
To: Lofstedt, Marta <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking:
increase FBC wait timeout to 5s

Quoting Marta Lofstedt (2017-08-25 11:40:29)

Quoted 41 lines

From: "Lofstedt, Marta" <[email protected]>

The subtests: igt@kms_frontbuffer_tracking@fbc-*draw* has non-consistent results, pending between fail and pass.
The fails are always due to "FBC disabled". With this increase in timeout the flip-flop behavior is no
longer
reproducible.

This is a partial revert of:
64590c7b768dc8d8dd962f812d5ff5a39e7e8b54,
where the timeout was decreased from 5s to 2s. After investigating the timeout needed, the conclusion is that the
longer timeout is only needed when the test swaps between some
specific draw domains, typically blt vs. mmap_cpu. The objective of the FBC part of the tests is not to benchmark draw
domain changes, it is to check that FBC was (re-)enabled.

V2: Added documentation

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=10
1623

---
 tests/kms_frontbuffer_tracking.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +0 -0
index e03524f1..2538450c 100644
@@ -924,7 +924,7 @@ static bool
 fbc_stride_not_supported(void)
 
Quoted 6 lines

tests/kms_frontbuffer_tracking.c static bool · line 926

Quoted 1 line
tests/kms_frontbuffer_tracking.c +0 -0
  static bool fbc_wait_until_enabled(void)  {

Try igt_drop_caches_set(device, DROP_RETIRE); instead of relaxing the
timeout.
-Chris

Quoted 2 lines

OK, I will test that and do a V3 if it works!
/Marta

Quoted 8 lines

I did some initial testing with igt_drop_caches_set inside fbc_wait_until_enabled and it looks good, I will add this to my weekend tests to get more results. This also appear to improve the
runtime of the tests quite a bit. So, maybe the igt_drop_caches_set
should be placed somewhere else so it will give runtime improvements not only for the FBC related sub-tests.

Quoted 6 lines

Sure, all the waits can do with the retire first, give it a common
function and a comment for the rationale (which should pretty much
the
same as given in the changelog).

We can do that, sure, especially if it makes the tests faster...

Quoted 8 lines

Anytime we use the GPU to invalidate
the frontbuffer tracking, we have to wait for a retire to do the flush.
Retirement is lazy, and is normally driven by GPU activity but we have a
background kworker to make sure we notice when the system becomes idle
independent of userspace - except it's low frequency.

... but our current 2s timeout should have been enough for that, shouldn't it? If I'm looking at the right part of the code, retirement
should be once per second, so 2s should have been enough. But it looks
like it's not enough

Quoted 7 lines
Quoted 3 lines

Unless I'm misinterpreting the round_up part, which could convert the
1s to 2s, which would still probably be fine...

It can bump the wait by upto a second (it tries to align wakeups on second boundaries). And we may skip the work if the device is busy elsewhere.

Okay, so you're saying that there's no amount of seconds we can wait that will guarantee the retire handler will run, even in IGT's limited environment where the only DRM client running is kms_frontbuffer_tracking? If the answer is yes, then we definitely need to patch kms_frontbuffer_tracking and do something about it. My assumption was that 2s (or 5s here) would be enough.

Of course, since this is CI we need a 100% guarantee, 99.99999% is unacceptable.

Quoted 15 lines
Quoted 5 lines

Anyway, 3s looks like as definitely safe even in this case. Maybe we
could go with 3s?

Quoted 7 lines

We can both increase the timeout *and* do cache dropping. Although I
think not doing the cache dropping is definitely something that needs
to be tested, so doing the cache dropping every time may not be a good
idea.

You are not dropping the caches, it is just doing a retire.

Quoted 8 lines

The real question is what is the expectation? If we want the test to simply state that when ready FBC et al will be re-enabled, then just add
a synchronous debugfs that establishes the condition in the driver that
FBC should be ready (atm that is DROP_RETIRE, but you will probably want
a better specified knob).

As much as that's a valid option, I'd prefer to do something that didn't require adding more complex non-standard interactions between kms_frontbuffer_tracking and the Kernel.

Quoted 2 lines

If the test is to make sure that FBC is
reenabled automatically,

We definitely want to check that. A bug in how we receive/treat the frontbuffer invalidate/flush calls can lead FBC to never get enabled again.

Quoted 9 lines

then we need to think some more. In a normal
workload, this should be the case (since the retire worker you rely on
is for hostile userspace). If you simply look at the hostile userspace
(and you already are for the frontbuffer writes), then a longer timeout
is definitely acceptable, but how long? What is that limit?

Quoted 3 lines

If you define an upper bound for how long you allow fbc et al to remain
off, then we will need an explicit timer to match.

See above. I thought there existed an amount of time that we could wait which would guarantee the retire handler would have run.

Quoted 1 line

-Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#18 lore raw

✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s (rev2)

In reply to Marta Lofstedt
== Series Details ==

== Series Details ==

Series: tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s (rev2)
URL : https://patchwork.freedesktop.org/series/26479/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 29d488034a50cd6fbad792cae61321995f0ab51c aubdump: Log some information about the execbuf calls

with latest DRM-Tip kernel build CI_DRM_3003
f22dadc265b3 drm-tip: 2017y-08m-25d-11h-48m-56s UTC integration manifest

Test kms_cursor_legacy:

        Subgroup basic-busy-flip-before-cursor-atomic:
                fail       -> PASS       (fi-snb-2600) fdo#100215
Test kms_frontbuffer_tracking:
        Subgroup basic:
                dmesg-warn -> PASS       (fi-bdw-5557u)

fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215

fi-bdw-5557u     total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:463s
fi-bdw-gvtdvm    total:279  pass:265  dwarn:0   dfail:0   fail:0   skip:14  time:446s
fi-blb-e6850     total:279  pass:224  dwarn:1   dfail:0   fail:0   skip:54  time:363s
fi-bsw-n3050     total:279  pass:243  dwarn:0   dfail:0   fail:0   skip:36  time:564s
fi-bwr-2160      total:279  pass:184  dwarn:0   dfail:0   fail:0   skip:95  time:255s
fi-bxt-j4205     total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:527s
fi-byt-j1900     total:279  pass:254  dwarn:1   dfail:0   fail:0   skip:24  time:528s
fi-byt-n2820     total:279  pass:250  dwarn:1   dfail:0   fail:0   skip:28  time:521s
fi-elk-e7500     total:279  pass:230  dwarn:0   dfail:0   fail:0   skip:49  time:437s
fi-glk-2a        total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:617s
fi-hsw-4770      total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:447s
fi-hsw-4770r     total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:424s
fi-ilk-650       total:279  pass:229  dwarn:0   dfail:0   fail:0   skip:50  time:430s
fi-ivb-3520m     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:510s
fi-ivb-3770      total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:470s
fi-kbl-7500u     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:476s
fi-kbl-7560u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:602s
fi-kbl-r         total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:595s
fi-skl-6260u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:467s
fi-skl-6700k     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:482s
fi-skl-6770hq    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:487s
fi-skl-gvtdvm    total:279  pass:266  dwarn:0   dfail:0   fail:0   skip:13  time:437s
fi-skl-x1585l    total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:483s
fi-snb-2520m     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:549s
fi-snb-2600      total:279  pass:249  dwarn:0   dfail:0   fail:1   skip:29  time:404s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_99/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#19 lore raw

✓ Fi.CI.IGT: success for tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s (rev2)

In reply to Marta Lofstedt
== Series Details ==

== Series Details ==

Series: tests/kms_frontbuffer_tracking: increase FBC wait timeout to 5s (rev2)
URL : https://patchwork.freedesktop.org/series/26479/
State : success

== Summary ==

Test kms_setmode:

        Subgroup basic:
                pass       -> FAIL       (shard-hsw) fdo#99912
Test perf:
        Subgroup polling:
                fail       -> PASS       (shard-hsw) fdo#102252

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hsw total:2230 pass:1230 dwarn:0 dfail:0 fail:18 skip:982 time:9668s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_99/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx