• Alfred Chen's avatar
    PDS-mq 0.99a · cc956dd4
    Alfred Chen authored
    Priority and Deadline based Skiplist multiple queue Scheduler
    Detail document at Documentation/scheduler/sched-PDS-mq.txt
    
    Project git repository at https://gitlab.com/alfredchen/linux-pds
    
    *Updated for Kernel 4.20
    
    -Alfred Chen
    
    pds: select_task_rq() optimization.
    
    pds: pds_load_balance() optimization.
    
    pds: Remove unnecessary code.
    
    pds: pds_sg_balance() optimization.
    
    pds: task_preemptible_rq() optimization.
    
    pds: [Sync] 175f0e25 sched/core: Fix rules for running on online && !active CPUs
    
    Tag PDS 0.98r
    
    pds: Fix compilation issue on raspberry pi.
    
    pds: Rework pds_sg_balance()
    
    Remove sched_cpu_sb_suppress_mask, the first cpu in the smt group will
    not do smt group balance.
    
    pds: Optimize pds_load_balance().
    
    pds: Remove sched_nr_rq_pending.
    
    pds: Fix wrong nr_max_tries in migrate_pending_tasks.
    
    Tag PDS 0.98s
    
    pds: Rework pds_load_balance().
    
    Introduce sched_balance_mask and sched_balance_shift, replaced
    rq->next_balance and rq->balance_inc.
    
    Re-schedule the rq when RQ balance happens, this help with balance
    convergence.
    
    pds: Minor optimization in task_preemptible_rq().
    
    Tag PDS 0.98t
    
    pds: Fix possibe kernel warning in pds_load_balance().
    
    pds: [Sync] c3442697 softirq: Eliminate unused cond_resched_softirq() macro
    
    pds: [Sync] d7822b1e rseq: Introduce restartable sequences system call
    
    pds: [Sync] 0ed557aa sched/core / kcov: avoid kcov_area during task switch
    
    pds: [Sync] d9c0ffca sched/nohz: Skip remote tick on idle task entirely
    
    pds: [Sync] 1cef1150 kthread, sched/core: Fix kthread_parkme() (again...)
    
    Tag PDS 0.98u
    
    pds: Instroduce __update_cpumasks_bitmap()
    
    pds: Instroduce rq nr_running_level.
    
    pds: Use trylock when pick tasks from other rq.
    
    pds: CPU affinity check start from llc in take_other_rq_task()
    
    Instroduce sched_cpu_llc_start_mask, which take_other_rq_task() start
    affinity check from.
    The sched_cpu_affinity_chk_masks for coregroup now also include the smt
    cpu.
    
    pds: Batch tasks don't preempt.
    
    Batch tasks don't try to preempt any NORMAL/BATCH tasks but only IDLE policy
    tasks.
    
    pds: Rework check_preempt_curr()
    
    1. Reschedule if rq->curr is idle tasks.
    2. Batch&Idle policy tasks doesn't preempt rq->curr
    3. Otherwise, reschedule rq->curr if p has higher priority and deadline
    
    pds: Remove wake_flags that no longer be used.
    
    Tag PDS 0.98v
    
    pds: Rework rq->sl_header data structure.
    
    pds: Fix possible task lost in migrate_tasks().
    
    After rq data structure changed, it's possible a running task be losted
    in migrate_tasks().
    This commit change migrate_tasks() logic to what mainline kernel is
    using.
    
    pds: Policy based task_preemptible_rq().
    
    pds: Rewrok take_other_rq_task() code path.
    
    migrate_pending_tasks() now skip running tasks, migrate the first
    non-running task which allowed to run on dest-cpu then repeat every two
    tasks.
    Max attempt of migration is the min of (rq->nr_running + 1) /2 and
    SCHED_RQ_NR_MIGRATIONSCHED_RQ_NR_MIGRATION, this allow tasks on a
    suspended rq(which has tasks in run queue but unable to run for scheduler
    reason) to be migrated to other run queues.
    A filter priority has been introduced, the migration will be stopped
    when reach task at this priority.
    
    pds: Change per cpu cpu_has_smt_sibling to sched_sibling_cpu.
    
    pds: try to take tasks from other rq when prio downgrade.
    
    pds: Introduce sched_rq_pending_masks.
    
    Introduce sched_rq_pending_masks, which just like sched_rq_queued_maks,
    which represent the second task running level of cpus.
    The rq which has two or more tasks in queue now is
    ~sched_rq_pending_masks[SCHED_RQ_EMPTY]
    
    The origin sched_rq_nr_running_masks has been removed.
    
    pds: Fix UP/non-SMT compilation warning.
    
    Tag PDS 0.98w
    
    pds: cgroup stub.
    
    pds: Revert "Rework rq->sl_header data structure"
    
    Tag PDS 0.98x
    
    pds: Enable SMT_NICE scheduling.
    
    Firstly, look at the kernel compilation test result without(-j4) and with SMT(-j8).
    
    Without SMT(-j4)	With SMT(-j8)
    4m30s			3m40s
    
    In the scenario IDLE and NORMAL(BATCH,ISO,RT) policy tasks run together,
    IDLE tasks can be supressed to run on SMT sibling cpus and let the other
    policy tasks run without SMT. In this way, tasks with other policy will
    take high priority and completed sooner than run with IDLE tasks on SMT
    sibling cpus. This is called the SMT_NICE scheduling.
    
    Below is the test results of SMT_NICE disabled and SMT_NICE enabled.
    
    		SMT_NICE disabled	SMT_NICE enabled
    NORMAL(-j4)	6m56s			5m3s
    IDLE(-j4)	7m10s			8m30s
    
    Tag PDS 0.98y
    
    pds: Replace task_queued() by task_on_rq_queued().
    
    pds: Don't balance on an idle task.
    
    pds: Improve idle task SMT_NICE handling in ttwu.
    
    pds: Re-mapping SCHED_DEADLINE to SCHED_FIFO
    
    Tag PDS 0.98z
    
    pds: Fix sugov_kthread_create fail to set policy.
    
    Fix issue in sugov_kthread_create(), faile to set SHCED_DEADLINE.
    
    "cpufreq_schedutil: sugov_kthread_create: failed to set SCHED_DEADLINE"
    
    pds: Fix task burst fairness issue.
    
    In task burst creation scinario, frame drops are observed in mpv.
    New created tasks occupied more time slices than the parent has.
    
    Tag PDS 0.99a
    cc956dd4
base.c 86.6 KB