Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Mellanox] Add a configuration to delay start xcvrd for fast-reboot #5643

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Oct 16, 2020

- Why I did it

Delay start xcvrd on mellanox platform to save CPU cost during fast-reboot. With this change, fast-reboot saves about 8~9 seconds.

- How I did it

Add a sleep before xcvrd start in pmon supervisor.conf

- How to verify it

Manual test

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@Junchao-Mellanox
Copy link
Collaborator Author

retest vs please

@@ -1,5 +1,6 @@
{
"skip_ledd": true,
"skip_fancontrol": true
"skip_fancontrol": true,
"delay_xcvrd": true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be configurable, or should we simply always delay the xcvrd start?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should simply always delay, like it is done with counters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I heard that there are vendors that depend on the xcvrd to finish their fast-reboot, I am not so sure about that, I was not in that loop before. But if there is no vendor need that, we can simply always delay it. @jleveque any suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with the requirements of fast-reboot on various platforms. @yxieca, @lguohan: are you aware of any platforms which depend on xcvrd to finish fast-reboot?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jleveque As we discussed last time, besides of just monitoring xcvrd dynamically tunes transceivers on some platforms. Thus, if not, on fast-reboot there might be port operationally down longer time.
Guohan can correct me if this is the case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lguohan: My question is do we need to make this customizable, or should we simply delay it on all platforms? If delaying on all platforms will cause no harm with fast-reboot, then I think it should be delayed on all platforms to make things more universal and also to prevent adding extra complexity.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jleveque In our platforms xcvrd is used to program pre-emphasis and thus a delay would might even lead to ports not coming up. Moreover ins 400G platforms complex initializations need to be done to bring port up and delaying xcvrd there would affect fastboot. Hence we prefer having a platform knob and by default there should be no delay.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @dgsudharsan. Then we will proceed with this approach, adding a new delay_xcvrd parameter.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this means we can sign off it and have it taken to 201911 as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have signed off.

@liat-grozovik
Copy link
Collaborator

@lguohan could you please refer to the open issue above?
this fix is important to fastboot in order to be able to meet the req and make the cpu faster at that period same as we do for counters.

@@ -79,7 +79,11 @@ dependent_startup_wait_for=start:exited

{% if not skip_xcvrd %}
[program:xcvrd]
{% if delay_xcvrd %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if delay_xrcvd is not defined? will this throw exception?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just did a quick check. It won't throw exception if delay_xcvrd is not defined.

@liat-grozovik
Copy link
Collaborator

@lguohan how can we proceed with this PR? we would like to have it in 201911 to ensure fastboot req are met.

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Dec 2, 2020 via email

@liat-grozovik liat-grozovik merged commit 6846438 into sonic-net:master Dec 2, 2020
abdosi pushed a commit to abdosi/sonic-buildimage that referenced this pull request Dec 4, 2020
@Junchao-Mellanox Junchao-Mellanox deleted the delay_xcvrd branch December 15, 2020 01:42
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants