• Kubernetes Submit Queue's avatar
    Merge pull request #63975 from godliness/lock-optimization · b8dff0b4
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 63434, 64172, 63975, 64180, 63755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Optimize the lock which in the RunPredicate
    
    **What this PR does / why we need it**:
    
    
    Enhance the performance of scheduler
    
    -  Change the lock in the RunPredicate from lock to rlock
    
    
    
    
    **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
    
    Could solve part of #63784 
    
    **Special notes for your reviewer**:
    
    _Run benchmark test by scheduler_perf_:
    `Before`  BenchmarkScheduling/1000Nodes/0Pods-32     1000    11689758 ns/op
    `After`     BenchmarkScheduling/1000Nodes/0Pods-32     1000    5951510 ns/op
    
    _Run integration (density) test by scheduler_perf_:
    Schedule 3000 Pods On 3000 Nodes
    `Before`  rate  19 per second on average
    `After`     rate  58 per second on average
    
    _Cpu profile test result_:
    `Before`  [click](https://cdn.rawgit.com/godliness/files/master/63784_before.svg)
    `After`     [click](https://cdn.rawgit.com/godliness/files/master/63784_after.svg)
    
    **Release note**:
    
    ```release-note
    `None`
    ```
    
    /sig scheduling
    
    /cc @misterikkit 
    /cc @bsalamat
    /cc @ravisantoshgudimetla 
    /cc @resouer
    b8dff0b4
Name
Last commit
Last update
..
BUILD Loading commit data...
equivalence_cache.go Loading commit data...
equivalence_cache_test.go Loading commit data...
extender.go Loading commit data...
extender_test.go Loading commit data...
generic_scheduler.go Loading commit data...
generic_scheduler_test.go Loading commit data...
scheduling_queue.go Loading commit data...
scheduling_queue_test.go Loading commit data...