1 main thread + 2 work thread
 
 
------------------ Original ------------------
From:  "wang.hui56"<wang.hu...@zte.com.cn>;
Date:  Thu, Jun 22, 2017 03:06 PM
To:  "fortitude.zhang"<fortitude.zh...@gmail.com>; 
Cc:  "leiyanzhang"<leiyanzh...@raydonetworks.com>; 
"vpp-dev"<vpp-dev@lists.fd.io>; 
Subject:  答复:Re: [vpp-dev] 答复: 【vpp-dev】delay is error in ping with multi 
worker thread

 
stage2, how many your worker threads? 
i remembered it is normal when 1main thread+1 worker thread. 
 
 
 
发自我的zMail 
 
      原始邮件     
                    发件人:      张东亚;      
           收件人:雷彦章;      
           抄送:王辉10067165; vpp-dev;      
           日期:      2017-06-22 11:09:18     
           主题:Re: [vpp-dev] 答复: 【vpp-dev】delay is error in ping with multi 
worker thread     
    
    

         Hi List,           
     
           I am colleague of Leiyanzhang, let me describe share the issues and 
investigations found when we test the ping command under multiple worker thread 
case.     
           
     
           Stage1:      
           
     
           Issue: Ping does not work under multiple worker thread case.     
           Version: Vanilla vpp 17.04     
           (vanilla vp)     
           
     
           
     
           Stage2:     
           Issue: Ping got > 1s delay result under multiple worker thread case, 
1s is the default ping interval, if we specify 10s interval, the delay will be 
10s delay.     
           Version: Vanilla vpp 17.04 + VPP-844 patch.     
           Our Solution:       
           as Lei pointed out, we think it's not correct for the worker thread 
to directly using the ping_run_t's cli_process_id to notify the main thread 
because the vlib_process_signal_event is using work thread vlib_main structure, 
however since process is shared by main thread and worker, when cli process in 
main thread timeout waiting event, it can still fetch the event, but the delay 
will be the interval.     
           
     
           State3:     
           Issue: Ping delay is not related with interval, but got 10ms+ delay 
randomly.     
           Version: Vanilla vpp 17.04 + VPP-844 Patch + change to using 
vl_api_rpc_call_main_thread to notify cli process in main thread.     
           Our solution:     
           After read vpp code, we think worker thread should use 
vl_api_rpc_call_main_thread to notify cli process in main thread, after will 
made the fix, the ping command works as expected most time with only random 
10ms+ delay.     
           
     
           For this problem, we found the reason is related to 
vl_api_rpc_call_main_thread only put then event to master thread 
vl_input_queue, but does not notify and wake up master thread timely, the main 
thread can only process this when       linux_epoll_input returns, while it 
will randomly sleep 10e3, if we change this value, the random ping delay will 
change too.     
           
     
           We want to hear feedback from the list and hope we can find a better 
way to fix this.
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to