yanglimingcn opened a new pull request, #3331:
URL: https://github.com/apache/brpc/pull/3331

   Previously --cpu_set accepted a single CPU list (e.g. "0-3,5,7") that was 
applied uniformly to all bthread worker threads regardless of their bthread_tag.
   
   This change extends the flag to accept a per-tag format:
   
     --cpu_set="0:0-3,5,7;1:6-9,4"
   
   where each semicolon-separated segment is "<tag>:<cpu-list>".  Tags not 
mentioned in the string get no CPU binding.  The legacy single-list format 
continues to work unchanged and binds all tags to the same set.
   
   Implementation:
   - Replace _cpus (vector<unsigned>) with _tag_cpus 
(vector<vector<unsigned>>), sized to FLAGS_task_group_ntags in the constructor.
   - Add parse_one_cpuset() (static helper) for the existing range-list parsing 
logic; parse_cpuset() now dispatches between legacy and per-tag formats based 
on the presence of ':' or ';'.
   - worker_thread() looks up _tag_cpus[tag] and round-robins over the per-tag 
CPU list using the global _next_worker_id counter.
   
   ### What problem does this PR solve?
   
   Issue Number: resolve 
   
   Problem Summary:
   
   ### What is changed and the side effects?
   
   Changed:
   
   Side effects:
   - Performance effects:
   
   - Breaking backward compatibility: 
   
   ---
   ### Check List:
   - Please make sure your changes are compilable.
   - When providing us with a new feature, it is best to add related tests.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to