Sunday, August 12, 2018

PDS 0.98u release

PDS 0.98u is released with the following changes

1. Sync up mainline scheduler changes in 4.18

This is the first PDS-mq release for kernel 4.18. As usual, it just a sync-up release, it all goes well. The next PDS-mq release will be arrived at the weekend, 10+ commits are pending.

Enjoy PDS 0.98u for v4.18 kernel, :)

Code are available at https://gitlab.com/alfredchen/linux-pds
(Say good-bye to github)

All-in-one patch is available too.

Edit: Fix all-in-one patch link.

Sunday, July 15, 2018

PDS 0.98t release

PDS 0.98t is released with the following changes

1. Rework pds_load_balance() based on current implementation. It's the main feature of this release.
2. Minor optimization in task_preemptible_rq().

This is the last release for 4.17, with the rework of balance code path as promise. The sanity test shows there are minor improvement over all workload due to balance overhead cutting. So far, I'd like to call it for the balance overhead cutting work and move on for next main line sync up and investigation of other potential improvement.

Enjoy PDS 0.98t for v4.17 kernel, :)

Code are available at
https://github.com/cchalpha/linux-gc/commits/linux-4.17.y-pds
and also
https://gitlab.com/alfredchen/linux-pds

All-in-one patch is available too.

PS: Here is the updated patch for v4.17.12+ kernel

https://gitlab.com/alfredchen/PDS-mq/raw/master/4.17/v4.17.12+_pds098t.patch
 

Monday, July 9, 2018

PDS 0.98s release

PDS 0.98s is released with the following changes

1. Fix compilation issue on raspberry pi.
2. Minor rework and optimization on balance code path.
3. Fix wrong nr_max_tries in migrate_pending_tasks.

This is mainly a bug fix and minor optimization release for 4.17. The rework of balance code doesn't go well, it actually make more overhead than current implement. Another rework which based on current implement is still on going, hopefully be included in next release.

Enjoy PDS 0.98s for v4.17 kernel, :)

Code are available at
https://github.com/cchalpha/linux-gc/commits/linux-4.17.y-pds
and also
https://gitlab.com/alfredchen/linux-pds

All-in-one patch is available too.

Monday, June 11, 2018

PDS 0.98r release

PDS 0.98r is released with the following changes

1. Fix compilation error when build CFS.
2. Optimization here and there.
3. Pick one more remaining sync-up from mainline.

This is the second PDS release for 4.17. It's mainly for bug fix, continue sync-up pick-up and minor optimization. After this, I'm reworking the balance, hopefully helping reducing the overhead.

Enjoy PDS 0.98r for v4.17 kernel, :)

Code are available at
https://github.com/cchalpha/linux-gc/commits/linux-4.17.y-pds
and also
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.17.y-pds (Will be deprecated soon)

All-in-one patch is available too.(Now the link is from github PDS-mq repository, although MS has bought github which make uncertain future of github, but moving from bitbucket is certain, all-in-one patch will not be uploaded to download page of bitbucket repository from this release)

Monday, June 4, 2018

PDS 0.98q release

PDS 0.98q is released with the following changes

1.Sync up with 4.17 mainline scheduler changes.

This is the first PDS release in 4.17. Because there are head files related code changes from mainline, so there may be chances compilation doesn't work under given combination of kernel config(scheduler related), please report back when it happens. Two "last minute" scheduler changes haven't been pick up from mainline, need more time to see how it apply upon PDS, because it happens on critical code path.

Known issue, but not PDS related, chromebook pixel failed to suspend(same on mainline CFS).

Enjoy PDS 0.98q for v4.17 kernel, :)

Code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.17.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.17.y-pds

All-in-one patch is available too.

Sunday, May 13, 2018

PDS 0.98p release

PDS 0.98p is released with the following changes

1. Minor code optimization here and there.
2. Balance optimization. This fix regression in 098n when workload % < core number.
3. 32ms balance interval.

This is the last PDS release in 4.16 kernel, thanks for the benchmark testing by Predo and Manuel, a regression in 098n release is identified and fix. In this release, the balance interval also increase to 32ms, this will help with throughput, let's test this setting before there is new way to do balance later(maybe next kernel release).

Enjoy PDS 0.98p for v4.16 kernel, :)

Code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.16.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.16.y-pds

All-in-one patch is available too.


PS, please apply the below patch if you don't have SMT enabled in kernel config, or if you don't know what's in your kernel config, you'd better have it. Thanks manuel for reporting.

 https://bitbucket.org/alfredchen/linux-gc/downloads/v4.16_pda098p_non_smt_fix.patch

Wednesday, May 2, 2018

PDS 0.98o release

PDS 0.98o is released with the following changes

1. Minor code cleanup and optimization here and there.
2. Fix a bug in get_nohz_timer_target().

Although there is no improvement can be observed in sanity tests, but there should be no regression too. Code cleanup and optimization will be continued in next release(in two or three weeks) then some features will add in next kernel release.

Enjoy PDS 0.98o for v4.16 kernel, :)

Code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.16.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.16.y-pds

All-in-one patch is available too.

Tuesday, April 17, 2018

PDS 0.98n release

PDS 0.98n is released with the following changes

1. Migrate max SCHED_RQ_NR_MIGRATION tasks to empty rq at a time. This will help with burst situation.
2. Code cleanup.
3. Optimize scheduler_tick(), pds_sg_balance() and pds_load_balance(). This helps with overhead reduction.

With the help of optimization in this release, improvement can be observed in sanity tests(for all kinds of workload). PS, there will be no cachehot patch coming, as there is  overhead cutting in ttwu code path in 0.98m, and leave no improvement space for the cachehot patch.
Enjoy PDS 0.98n for v4.16 kernel, :)

code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.16.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.16.y-pds

 All-in-one patch is available too.

Wednesday, April 4, 2018

PDS 0.98m release

PDS 0.98m is released with the following changes

1. Unify 32/64bits handing in task_preemptible_rq(). This makes 32/64bits system has the same code base(again). Personally, I'd love to see my raspberry pi running same scheduler code with my laptop.
2. Remove cpu scaling interfaces. Based on recent testing, there is no regression to drop these interfaces. Removing these also cut of overhead.
3. Accurate preempt for RT tasks. Before this release, RT tasks wake up on 32bits system is not fully based on their priority(kind of a bug).
4. Refines and code clean-up in several functions.
5. Fix some wrong likely/unlikely usage in PDS code.

These changes are inspired by the experimental cachehot patch. Aim to reduce the overhead in the existed code path and make the design simple. Another obvious change is in the patch size, -5KB!(No one cares, right?) For the sanity tests, there is slight improvement, no regression was found so far.

Enjoy PDS 0.98m for v4.16 kernel, :)

code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.16.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.16.y-pds

 All-in-one patch is available too.

PS, PDS-mq patch repository is created, which will be used to category all pds-mq patch since 4. 13. I am thinking about migrate the source code/patch repository from bitbucket to github, because bitbucket used to have limit repository size(2G), but it looks like that they remove such limitation recently, what about your thought?

Sunday, April 1, 2018

PDS 0.98l release

PDS 0.98l is released with the following changes

1. Sync up with mainline 4.16 scheduler code changes.

This is just a sync up release for 4.16 kernel. If all goes well, there will be another release this weekend with some "solid" PDS feature code changes.

Enjoy PDS 0.98l for v4.16 kernel, :)

code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.16.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.16.y-pds

 All-in-one patch is available too.

Thursday, March 1, 2018

CacheHot experimental patch for PDS

Overview


In modern computer system design, cpu cache plays an important rule in performance but it "becomes a resource which is transparently used and administered by the processors.", which make it like a "black whole" and hard to be measured, especially from per task aspect in the kernel point of view. Despite of the difficulty and limitation, it is worthy to give it a shot based on recent test result of a prototype cache hot patch for PDS scheduler.

The Cache-Hot prototype patch here is trying to determine a task is cache hot or not when it is waking up, then choose different method to select a cpu to run on based on this cache hot information. If the task is cache hot, then it can use the accurate but complicated method to choose a cpu be affinity with the cache which the task resides in. If the task is cache cool, then it can simply choose any cpu it can run on. In this way, the overhead of selecting a cpu to run on is reduced.

The test result of kernel compilation result can be download from here. It shows that overhead is reduced in heavy workload, and the overhead cutting should be able to been seem in light workload if advance the measure model in the feature.

Limitation

1. The prefer setting/formula in this patch may just work for x86 arch.
2. The prefer setting/formula in this patch may just work for certain workload(linux kernel compilation)

Consider these limitations and this version is still a prototype patch, it will be better not official put into PDS and provide it as an experimental patch to try it out.

Try out the patch

The patch can be download from here, apply it upon pds098k.

Then adjust the SCHED_CACHE_HOT_SWITCHES_TH in pds.c to the reference value in the below formula according to your cpu topology

SCHED_CACHE_HOT_SWITCHES_TH = 8  * (LLC_SIZE / 3) * (1.8 / CPU_SPEED) * (4 / NUM_CPUS)

LLC_SIZE is last level cache size in MB
CPU_SPEED is the cpu speed in GHz
NUM_CPUS is the numbers of logical cpu(HT counts in)

Feel free to try other value than the reference one, and on different kind of workload. Your feedback will be welcome.

What's next

Don't worry about too much of the SCHED_CACHE_HOT_SWITCHES_TH, it's just a simple measurement in the prototype. Another model is working in progress and will be available in next version.

Thursday, February 15, 2018

PDS 0.98k release

PDS 0.98k is released with the following changes

1. Several code cleanup changes.

This is just a code cleanup release for 4.15 kernel, before the incoming feature release(hopefully in 2 or 3 weeks).

Enjoy PDS 0.98k for v4.15 kernel, and "Happy CNY", :)

code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.15.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.15.y-pds

 All-in-one patch is available too.

Wednesday, January 17, 2018

PDS 0.98j release (respinned)

PDS 0.98j is released with the following changes

1. Sync up with mainline 4.15 scheduler code changes. (Updated to sync with official 4.15 mainline)

This is just a sync up release for 4.15 kernel. I will be on a trip and may not able to release new PDS code for kernel 4.15 when it comes out next week. So it is released earlier this week, the sync up changes should be completed if there is no last minute scheduler changes from mainline. Git repositories will be updated later.

Enjoy PDS 0.98j for v4.15 kernel, :)

code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.15.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.15.y-pds

 All-in-one patch is available too.

Monday, January 15, 2018

PDS 0.98i release

PDS 0.98i is released with the following changes


1. Revert "pds: Remove yield support."
2. Set default yeild_type to 1 and remove yield_to() support.
3. 16ms dispersed balance interval.

This is the last release on 4.14 kernel and the first release in 2018, which brings back the yield_type support, users needs to adjust the value to their own requirement, now default is 1. And there is balance overhead cut-off feature which will help in all kinds of workload.

Enjoy PDS 0.98i for v4.14 kernel, :)

code are available at
https://bitbucket.org/alfredchen/linux-gc/commits/branch/linux-4.14.y-pds
and also
https://github.com/cchalpha/linux-gc/commits/linux-4.14.y-pds

 All-in-one patch is available too.