Skip to content

Tune consumer order in BufferOrch::doTask() based on dependency for warm start#590

Merged
qiluo-msft merged 5 commits intosonic-net:masterfrom
qiluo-msft:qiluo/warmbuff
Aug 24, 2018
Merged

Tune consumer order in BufferOrch::doTask() based on dependency for warm start#590
qiluo-msft merged 5 commits intosonic-net:masterfrom
qiluo-msft:qiluo/warmbuff

Conversation

@qiluo-msft
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft commented Aug 23, 2018

Tested in VS:

  1. cold start
  2. change config DB
127.0.0.1:6379[4]> hset WARM_RESTART|swss enable true
  1. restart orchagent process only
  2. observe syslog about "There are pending consumer tasks after restore". There will be no buffer related tasks.

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@qiluo-msft qiluo-msft changed the title initBufferReadyLists will pops consumers, so warm start will not redo Tune consumer order in BufferOrch::doTask() based on dependency for warm start Aug 23, 2018
if (!suc)
{
return false;
}
Copy link
Copy Markdown
Contributor

@stcheng stcheng Aug 23, 2018

Choose a reason for hiding this comment

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

from line 265 - 274 it could be ine one line return !WarmStart::isWarmStart || warmRestoreAndSyncUp(); #Resolved

Copy link
Copy Markdown
Contributor Author

@qiluo-msft qiluo-msft Aug 23, 2018

Choose a reason for hiding this comment

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

It is equivalent. I prefer no change for easy reading. #Closed

if (consumer == pool_consumer)
continue;
consumer->drain();
}
Copy link
Copy Markdown
Contributor

@jipanyang jipanyang Aug 24, 2018

Choose a reason for hiding this comment

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

Do you mean the configuration for other buffer tables like CFG_BUFFER_QUEUE_TABLE_NAME, CFG_BUFFER_PG_TABLE_NAME, CFG_BUFFER_PORT_INGRESS_PROFILE_LIST_NAME and CFG_BUFFER_PORT_EGRESS_PROFILE_LIST_NAME have dependency on CFG_BUFFER_PROFILE_TABLE_NAME & CFG_BUFFER_POOL_TABLE_NAME? CFG_BUFFER_PROFILE_TABLE_NAME has dependency on CFG_BUFFER_POOL_TABLE_NAME?

I didn't see existing code checking that dependency. #Resolved

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exactly, so I added comments. The ground truth is inside SAI design doc.
For code, task_process_status::task_need_retry possibly indicates a dependency missing. They don't show the dependency relationship as specific as SAI design doc.


In reply to: 212513136 [](ancestors = 212513136)

Copy link
Copy Markdown
Contributor

@jipanyang jipanyang Aug 24, 2018

Choose a reason for hiding this comment

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

If there is dependency, the exact dependency chain should be clarified and the problem should be fixed in normal code logic which applies to cold boot too.

#Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it is difficult to do this in the normal boot since the input sequence is unknown. we need to get the dependency at the entry level and then dispatched to task. in warmboot, since we have all the data, we can just solve the dependency at the table level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

During cold start, the task_process_status::task_need_retry handles dependency correctly, ie. anything missing will postpone task processing. So there is no problem to fix.
I agree this code is not explicit in dependency relationship. This should be improved in future.


In reply to: 212527615 [](ancestors = 212527615)

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
// 3.1 Ingress priority group (PG) configuration
// 3.2.1 Buffer profile configuration
//
// buffer poll
Copy link
Copy Markdown
Contributor

@lguohan lguohan Aug 24, 2018

Choose a reason for hiding this comment

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

buffer pool #Resolved

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@qiluo-msft qiluo-msft merged commit 836e10a into sonic-net:master Aug 24, 2018
@qiluo-msft qiluo-msft deleted the qiluo/warmbuff branch August 24, 2018 17:54
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
…arm start (sonic-net#590)

* initBufferReadyLists will pops consumers, so warm start will not redo
* revert initBufferReadyLists()
* (comment)
* (typo)
jianyuewu pushed a commit to jianyuewu/sonic-swss that referenced this pull request Dec 24, 2025
[PINS] Fix bit width of MAC address in SAI ACL schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants