Monday, October 29, 2018

PDS 0.99c release

PDS 0.99c is released with the following changes

1. Fix and sync-up reset on fork handling. In some cases, reset on fork will not work proper. This fixed the issue.
2. Unified time slice for FIFO tasks. Now every task(except for the idle) has the rr interval as time slice.
3. Handle SCHED_BATCH as SCHED_IDLE. Consider the fact that BATCH tasks is more like the IDLE policy task but compete cpu with NORMAL tasks. This commit handle BATCH tasks as IDLE policy and leave NORMAL policy tasks at NORMAL priority alone.
4. Enable SCHED_DEADLINE support. Mainline has SCHED_DEADLINE policy and PDS has to support it, no matter in kernel space or user space. PDS support it by squash it as priority 1 FIFO task.
5.  Optimize ISO branch in normal_prio(). An minor optimization in normal_prio().

This release includes the first part of task policy support review in PDS, and plus some minor optimization. The rest parts of the review, including the rework of ISO policy will be out in next release.

Enjoy PDS 0.99c for v4.19 kernel, :)

Code are available at
All-in-one patch is available too.


  1. Also building and running fine here.

  2. Works for me on i7@work and Ryzen @ home.

  3. This comment has been removed by the author.

  4. Builds and works ok on AMD A8-7410 APU with AMD Radeon R5 Graphics. Many thanks!

  5. Finally got a chance to build this now that we're back from Poland; no problem with x64 but x86-UP fails with:
    kernel/sched/pds.c: In function ‘update_rq_clock_task’:
    kernel/sched/pds.c:344:2: error: ‘irq_delta’ undeclared (first use in this function); did you mean ‘irq_data’?
    irq_delta = irq_time_read(cpu_of(rq)) - rq->prev_irq_time;
    kernel/sched/pds.c:344:2: note: each undeclared identifier is reported only once for each function it appears in

    1. How come you have CONFIG_IRQ_TIME_ACCOUNTING, but HAVE_SCHED_AVG_IRQ is not defined (check kernel/sched/pds_sched.h:73)? Have you edited config files manually?

    2. I definitely have heavily edited the build config, since this netbook has limited embedded storage. I haven't edited it in a long time though, other than the incremental linux release updates. It wasn't an issue until moving to 4.19; I'll take a look at the IRQ configs.

    3. Oh, `#define HAVE_SCHED_AVG_IRQ` is part of the pds patch; I have not modified that.

      Perhaps this s64 is an issue on a x86 system (total guess)...?
      +#ifdef HAVE_SCHED_AVG_IRQ
      + s64 steal = 0, irq_delta = 0;

    4. HAVE_SCHED_AVG_IRQ is surround by SMP, that's why it doesn't work for UP.
      I'll cross-check with mainline code and come with a fix for it, it should not be a big problem.
      And sorry for that I don't have UP system anymore, so PDS is not be tested on UP before release.