Hmm. The new version is released.;-)
The RIFS SCHEDULER is a scheduler for a low latency desktop. It is
implemented base on the concept of simple.It lets the interactive task
run first than the cpu bound task.
First , RIFS is based on the multiple feedback queue algorithm. That
means it will let the high priority process run first. After the task
has run out of timeslice or it sleeps for waiting something RIFS will
determine whether we should increase the prio or not.For.preemption we
just need to compare the prio to determine whether it can preempt or
not.
If a task run out of time_sluce we.will.decrease it 's prio.
If a task run half of the time_slice and sleep we will increase it's prio
In the other case we will save the time_slice.
If a task that has a higher prio than his static_prio run out of
time_slice, we will drop it's priority to the static_prio.
If a task run out of time_slice and it's prio has become 140 already,
we will raise it's prio to static_prio.
Chen
On Sat, May 12, 2012 at 1:06 AM, mou Chen <[email protected]> wrote:
> Hmm. The new version is released.;-)
>
> The RIFS SCHEDULER is a scheduler for a low latency desktop. It is
> implemented base on the concept of simple.It lets the interactive task
> run first than the cpu bound task.
>
> First , RIFS is based on the multiple feedback queue algorithm. That
> means it will let the high priority process run first. After the task
> has run out of timeslice or it sleeps for waiting something RIFS will
> determine whether we should increase the prio or not.For.preemption we
> just need to compare the prio to determine whether it can preempt or
> not.
>
> If a task run out of time_sluce we.will.decrease it 's prio.
> If a task run half of the time_slice and sleep we will increase it's prio
> In the other case we will save the time_slice.
> If a task that has a higher prio than his static_prio run out of
> time_slice, we will drop it's priority to the static_prio.
> If a task run out of time_slice and it's prio has become 140 already,
> we will raise it's prio to static_prio.
>
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? Chen
Actually the scheduler use these 5 method to prevent the happen of
starveness and enhance the interactivity and responsiveness. Making
the end user feeling smooth is the goal of RIFS.
This is the benchmark given by "latt":
Parameters: min_wait=100ms, max_wait=500ms, clients=1
-=-=-=-=-=-=-=-=-=-=-=-BFS-=-=-=-=-=-=-=-=-=-=-=-
Wakeup averages
-------------------------------------
Max 23 usec
Avg 8 usec
Stdev 3 usec
Stdev mean 0 usec
Work averages
-------------------------------------
Max 22469 usec
Avg 20069 usec
Stdev 286 usec
Stdev mean 28 usec
-=-=-=-=-=-=-=-=-=-=-=-RIFS-=-=-=-=-=-=-=-=-=-=-=-
Wakeup averages
-------------------------------------
Max 13 usec
Avg 4 usec
Stdev 1 usec
Stdev mean 0 usec
Work averages
-------------------------------------
Max 20086 usec
Avg 19706 usec
Stdev 82 usec
Stdev mean 8 usec
It seems that RIFS has a even lower scheduling latency on an full idle box.
Actually the difference between RIFS and BFS also CFS will become
significant under a heavy workload for example make -j256 or even make
-j512. Firefox is still smooth even make -j512 on a 3.3.x kernel with
RIFS.
Hi!
Please create a nice series of patches and follow
Documentation/SubmittingPatches.
Otherwise nobody is able to review your scheduler.
BTW: Your patch touches lots of other files, why that?
$ grep rifs-patch-v2 -e "^diff"
diff -ruN linux-3.3.1/arch/powerpc/platforms/cell/spufs/sched.c
linux-3.3.1-RIFS/arch/powerpc/platforms/cell/spufs/sched.c
diff -ruN linux-3.3.1/arch/x86/Kconfig linux-3.3.1-RIFS/arch/x86/Kconfig
diff -ruN linux-3.3.1/arch/x86/kernel/cpu/proc.c
linux-3.3.1-RIFS/arch/x86/kernel/cpu/proc.c
diff -ruN linux-3.3.1/arch/x86/kernel/smpboot.c
linux-3.3.1-RIFS/arch/x86/kernel/smpboot.c
diff -ruN linux-3.3.1/Documentation/sysctl/kernel.txt
linux-3.3.1-RIFS/Documentation/sysctl/kernel.txt
diff -ruN linux-3.3.1/drivers/cpufreq/cpufreq.c
linux-3.3.1-RIFS/drivers/cpufreq/cpufreq.c
diff -ruN linux-3.3.1/drivers/cpufreq/cpufreq_conservative.c
linux-3.3.1-RIFS/drivers/cpufreq/cpufreq_conservative.c
diff -ruN linux-3.3.1/drivers/cpufreq/cpufreq_ondemand.c
linux-3.3.1-RIFS/drivers/cpufreq/cpufreq_ondemand.c
diff -ruN linux-3.3.1/fs/ext2/super.c~ linux-3.3.1-RIFS/fs/ext2/super.c~
diff -ruN linux-3.3.1/fs/proc/base.c linux-3.3.1-RIFS/fs/proc/base.c
diff -ruN linux-3.3.1/include/linux/init_task.h
linux-3.3.1-RIFS/include/linux/init_task.h
diff -ruN linux-3.3.1/include/linux/init_task.h~
linux-3.3.1-RIFS/include/linux/init_task.h~
diff -ruN linux-3.3.1/include/linux/jiffies.h
linux-3.3.1-RIFS/include/linux/jiffies.h
diff -ruN linux-3.3.1/include/linux/nfsd/stats.h
linux-3.3.1-RIFS/include/linux/nfsd/stats.h
diff -ruN linux-3.3.1/include/linux/sched.h
linux-3.3.1-RIFS/include/linux/sched.h
diff -ruN linux-3.3.1/include/linux/swap.h linux-3.3.1-RIFS/include/linux/swap.h
diff -ruN linux-3.3.1/include/net/inet_timewait_sock.h
linux-3.3.1-RIFS/include/net/inet_timewait_sock.h
diff -ruN linux-3.3.1/init/calibrate.c linux-3.3.1-RIFS/init/calibrate.c
diff -ruN linux-3.3.1/init/Kconfig linux-3.3.1-RIFS/init/Kconfig
diff -ruN linux-3.3.1/init/Kconfig~ linux-3.3.1-RIFS/init/Kconfig~
diff -ruN linux-3.3.1/init/main.c linux-3.3.1-RIFS/init/main.c
diff -ruN linux-3.3.1/kernel/delayacct.c linux-3.3.1-RIFS/kernel/delayacct.c
diff -ruN linux-3.3.1/kernel/exit.c linux-3.3.1-RIFS/kernel/exit.c
diff -ruN linux-3.3.1/kernel/Kconfig.hz linux-3.3.1-RIFS/kernel/Kconfig.hz
diff -ruN linux-3.3.1/kernel/Kconfig.preempt
linux-3.3.1-RIFS/kernel/Kconfig.preempt
diff -ruN linux-3.3.1/kernel/posix-cpu-timers.c
linux-3.3.1-RIFS/kernel/posix-cpu-timers.c
diff -ruN linux-3.3.1/kernel/sched/Makefile
linux-3.3.1-RIFS/kernel/sched/Makefile
diff -ruN linux-3.3.1/kernel/sched/rifs.c linux-3.3.1-RIFS/kernel/sched/rifs.c
diff -ruN linux-3.3.1/kernel/sysctl.c linux-3.3.1-RIFS/kernel/sysctl.c
diff -ruN linux-3.3.1/kernel/sysctl.c~ linux-3.3.1-RIFS/kernel/sysctl.c~
diff -ruN linux-3.3.1/lib/Kconfig.debug linux-3.3.1-RIFS/lib/Kconfig.debug
diff -ruN linux-3.3.1/Makefile linux-3.3.1-RIFS/Makefile
diff -ruN linux-3.3.1/mm/memory.c linux-3.3.1-RIFS/mm/memory.c
diff -ruN linux-3.3.1/mm/memory.c.orig linux-3.3.1-RIFS/mm/memory.c.orig
diff -ruN linux-3.3.1/mm/page-writeback.c linux-3.3.1-RIFS/mm/page-writeback.c
diff -ruN linux-3.3.1/mm/swapfile.c linux-3.3.1-RIFS/mm/swapfile.c
diff -ruN linux-3.3.1/mm/vmscan.c linux-3.3.1-RIFS/mm/vmscan.c
diff -ruN linux-3.3.1/mm/vmscan.c.orig linux-3.3.1-RIFS/mm/vmscan.c.orig
--
Thanks,
//richard
On 5/12/12, mou Chen <[email protected]> wrote:
> 在 2012-5-12 下午6:23,"richard -rw- weinberger" <[email protected]
>>写道:
>>
>> Hi!
>>
>> Please create a nice series of patches and follow
>> Documentation/SubmittingPatches.
>> Otherwise nobody is able to review your scheduler.
>>
>> BTW: Your patch touches lots of other files, why that?
>>
>> $ grep rifs-patch-v2 -e "^diff"
>> diff -ruN linux-3.3.1/arch/powerpc/platforms/cell/spufs/sched.c
>> linux-3.3.1-RIFS/arch/powerpc/platforms/cell/spufs/sched.c
>> diff -ruN linux-3.3.1/arch/x86/Kconfig linux-3.3.1-RIFS/arch/x86/Kconfig
>> diff -ruN linux-3.3.1/arch/x86/kernel/cpu/proc.c
>> linux-3.3.1-RIFS/arch/x86/kernel/cpu/proc.c
>> diff -ruN linux-3.3.1/arch/x86/kernel/smpboot.c
>> linux-3.3.1-RIFS/arch/x86/kernel/smpboot.c
>> diff -ruN linux-3.3.1/Documentation/sysctl/kernel.txt
>> linux-3.3.1-RIFS/Documentation/sysctl/kernel.txt
>> diff -ruN linux-3.3.1/drivers/cpufreq/cpufreq.c
>> linux-3.3.1-RIFS/drivers/cpufreq/cpufreq.c
>> diff -ruN linux-3.3.1/drivers/cpufreq/cpufreq_conservative.c
>> linux-3.3.1-RIFS/drivers/cpufreq/cpufreq_conservative.c
>> diff -ruN linux-3.3.1/drivers/cpufreq/cpufreq_ondemand.c
>> linux-3.3.1-RIFS/drivers/cpufreq/cpufreq_ondemand.c
>> diff -ruN linux-3.3.1/fs/ext2/super.c~ linux-3.3.1-RIFS/fs/ext2/super.c~
>> diff -ruN linux-3.3.1/fs/proc/base.c linux-3.3.1-RIFS/fs/proc/base.c
>> diff -ruN linux-3.3.1/include/linux/init_task.h
>> linux-3.3.1-RIFS/include/linux/init_task.h
>> diff -ruN linux-3.3.1/include/linux/init_task.h~
>> linux-3.3.1-RIFS/include/linux/init_task.h~
>> diff -ruN linux-3.3.1/include/linux/jiffies.h
>> linux-3.3.1-RIFS/include/linux/jiffies.h
>> diff -ruN linux-3.3.1/include/linux/nfsd/stats.h
>> linux-3.3.1-RIFS/include/linux/nfsd/stats.h
>> diff -ruN linux-3.3.1/include/linux/sched.h
>> linux-3.3.1-RIFS/include/linux/sched.h
>> diff -ruN linux-3.3.1/include/linux/swap.h
> linux-3.3.1-RIFS/include/linux/swap.h
>> diff -ruN linux-3.3.1/include/net/inet_timewait_sock.h
>> linux-3.3.1-RIFS/include/net/inet_timewait_sock.h
>> diff -ruN linux-3.3.1/init/calibrate.c linux-3.3.1-RIFS/init/calibrate.c
>> diff -ruN linux-3.3.1/init/Kconfig linux-3.3.1-RIFS/init/Kconfig
>> diff -ruN linux-3.3.1/init/Kconfig~ linux-3.3.1-RIFS/init/Kconfig~
>> diff -ruN linux-3.3.1/init/main.c linux-3.3.1-RIFS/init/main.c
>> diff -ruN linux-3.3.1/kernel/delayacct.c
> linux-3.3.1-RIFS/kernel/delayacct.c
>> diff -ruN linux-3.3.1/kernel/exit.c linux-3.3.1-RIFS/kernel/exit.c
>> diff -ruN linux-3.3.1/kernel/Kconfig.hz
>> linux-3.3.1-RIFS/kernel/Kconfig.hz
>> diff -ruN linux-3.3.1/kernel/Kconfig.preempt
>> linux-3.3.1-RIFS/kernel/Kconfig.preempt
>> diff -ruN linux-3.3.1/kernel/posix-cpu-timers.c
>> linux-3.3.1-RIFS/kernel/posix-cpu-timers.c
>> diff -ruN linux-3.3.1/kernel/sched/Makefile
>> linux-3.3.1-RIFS/kernel/sched/Makefile
>> diff -ruN linux-3.3.1/kernel/sched/rifs.c
> linux-3.3.1-RIFS/kernel/sched/rifs.c
>> diff -ruN linux-3.3.1/kernel/sysctl.c linux-3.3.1-RIFS/kernel/sysctl.c
>> diff -ruN linux-3.3.1/kernel/sysctl.c~ linux-3.3.1-RIFS/kernel/sysctl.c~
>> diff -ruN linux-3.3.1/lib/Kconfig.debug
>> linux-3.3.1-RIFS/lib/Kconfig.debug
>> diff -ruN linux-3.3.1/Makefile linux-3.3.1-RIFS/Makefile
>> diff -ruN linux-3.3.1/mm/memory.c linux-3.3.1-RIFS/mm/memory.c
>> diff -ruN linux-3.3.1/mm/memory.c.orig linux-3.3.1-RIFS/mm/memory.c.orig
>> diff -ruN linux-3.3.1/mm/page-writeback.c
> linux-3.3.1-RIFS/mm/page-writeback.c
>> diff -ruN linux-3.3.1/mm/swapfile.c linux-3.3.1-RIFS/mm/swapfile.c
>> diff -ruN linux-3.3.1/mm/vmscan.c linux-3.3.1-RIFS/mm/vmscan.c
>> diff -ruN linux-3.3.1/mm/vmscan.c.orig linux-3.3.1-RIFS/mm/vmscan.c.orig
>>
>> --
>> Thanks,
>> //richard
> Hmm the patch is a little bit dirty.I 'll clean it up.Can you now try to
> patch it to a 3.3.x kernel and give me a review.Testing it with high
> workload is a good choice and you can test the smoothness of your desktop
> under high workload. ;-)
> Thanks,
> Chen
>