k3s/pkg/scheduler
Kubernetes Submit Queue b8dff0b4f1
Merge pull request #63975 from godliness/lock-optimization
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
2018-05-24 12:18:17 -07:00
..
algorithm remove unused code of (pkg/scheduler) 2018-05-18 23:48:43 +08:00
algorithmprovider update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
api Add Ignorable flag to extender 2018-03-30 15:10:31 -07:00
core Merge pull request #63975 from godliness/lock-optimization 2018-05-24 12:18:17 -07:00
factory Add warnings about cache invalidation. 2018-05-22 15:15:37 -07:00
metrics Fix golint errors in `pkg/scheduler` based on golint check 2018-02-08 15:22:47 +08:00
schedulercache remove unused code of (pkg/scheduler) 2018-05-18 23:48:43 +08:00
testing update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
util run make update 2018-04-28 15:43:09 +00:00
volumebinder Use provided node object in volume binding predicate 2018-04-05 14:35:55 -07:00
BUILD run make update 2018-04-28 15:43:09 +00:00
OWNERS Update OWNERS labels for cluster-lifecycle and scheduling 2018-04-05 16:25:04 -05:00
scheduler.go Add warnings about cache invalidation. 2018-05-22 15:15:37 -07:00
scheduler_test.go move pkg/scheduler/util/testutil.go to pkg/scheduler/testing 2018-04-28 02:36:04 +00:00
testutil.go remove unused func in FakeConfigurator of scheduler 2018-01-25 16:08:13 +08:00