Skip to content

Commit

Permalink
swss: flush g_asicState after each event is done (sonic-net#570)
Browse files Browse the repository at this point in the history
* swss: flush g_asicState after each event is done
* add flush() after event is handled in case some entries are still in buffer, don't wait
* with the changes in sairedis and swss-common, route performance improved by 200~300 routes/sec
* swss-common: remove unnecessary flush() in timeout case and update comment
* remove unnecessary flush() in timeout case and update comment
  • Loading branch information
dzhangalibaba authored and qiluo-msft committed Aug 11, 2018
1 parent c429ddb commit fa7008f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,6 @@ void OrchDaemon::start()

if (ret == Select::TIMEOUT)
{
/* Let sairedis to flush all SAI function call to ASIC DB.
* Normally the redis pipeline will flush when enough request
* accumulated. Still it is possible that small amount of
* requests live in it. When the daemon has nothing to do, it
* is a good chance to flush the pipeline */
flush();
continue;
}

Expand All @@ -319,5 +313,12 @@ void OrchDaemon::start()
for (Orch *o : m_orchList)
o->doTask();

/* Let sairedis to flush all SAI function call to ASIC DB.
* Normally the redis pipeline will flush when enough request
* accumulated. Still it is possible that small amount of
* requests live in it. When the daemon has finished events/tasks, it
* is a good chance to flush the pipeline before next select happened.
*/
flush();
}
}

0 comments on commit fa7008f

Please sign in to comment.