npu2-opencapi: reduce number of retries to train the link

Message ID 20180605102732.5507-1-fbarrat@linux.ibm.com
State Accepted
Headers show
Series
  • npu2-opencapi: reduce number of retries to train the link
Related show

Commit Message

Frederic Barrat June 5, 2018, 10:27 a.m.
We've been reliably training the opencapi link on the first attempt
for quite a while. Furthermore, if it doesn't train on the first
attempt, retries haven't been that useful. So let's reduce the number
of attempts we do to train the link.

2 retries = 3 attempts to train.

Each (failed) training sequence costs about 3 seconds.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
 hw/npu2-opencapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Donnellan June 6, 2018, 12:30 a.m. | #1
On 05/06/18 20:27, Frederic Barrat wrote:
> We've been reliably training the opencapi link on the first attempt
> for quite a while. Furthermore, if it doesn't train on the first
> attempt, retries haven't been that useful. So let's reduce the number
> of attempts we do to train the link.
> 
> 2 retries = 3 attempts to train.
> 
> Each (failed) training sequence costs about 3 seconds.
> 
> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>

Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
>   hw/npu2-opencapi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
> index 3465d70c..d085cd15 100644
> --- a/hw/npu2-opencapi.c
> +++ b/hw/npu2-opencapi.c
> @@ -78,7 +78,7 @@
>   #define   OCAPI_SLOT_FRESET_DEASSERT_DELAY  (OCAPI_SLOT_FRESET + 4)
>   #define   OCAPI_SLOT_FRESET_INIT_DELAY      (OCAPI_SLOT_FRESET + 5)
>   
> -#define OCAPI_LINK_TRAINING_RETRIES	5
> +#define OCAPI_LINK_TRAINING_RETRIES	2
>   #define OCAPI_LINK_TRAINING_TIMEOUT	3000 /* ms */
>   #define OCAPI_LINK_STATE_TRAINED        0x7
>   
>
Stewart Smith June 19, 2018, 5:31 a.m. | #2
Frederic Barrat <fbarrat@linux.ibm.com> writes:
> We've been reliably training the opencapi link on the first attempt
> for quite a while. Furthermore, if it doesn't train on the first
> attempt, retries haven't been that useful. So let's reduce the number
> of attempts we do to train the link.
>
> 2 retries = 3 attempts to train.
>
> Each (failed) training sequence costs about 3 seconds.
>
> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
> ---
>  hw/npu2-opencapi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, merged to master as of 94140dbc6a9cafd868609567f944349a1ed5cfe4

Patch

diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
index 3465d70c..d085cd15 100644
--- a/hw/npu2-opencapi.c
+++ b/hw/npu2-opencapi.c
@@ -78,7 +78,7 @@ 
 #define   OCAPI_SLOT_FRESET_DEASSERT_DELAY  (OCAPI_SLOT_FRESET + 4)
 #define   OCAPI_SLOT_FRESET_INIT_DELAY      (OCAPI_SLOT_FRESET + 5)
 
-#define OCAPI_LINK_TRAINING_RETRIES	5
+#define OCAPI_LINK_TRAINING_RETRIES	2
 #define OCAPI_LINK_TRAINING_TIMEOUT	3000 /* ms */
 #define OCAPI_LINK_STATE_TRAINED        0x7