]> Zhao Yanbai Git Server - minix.git/commit
Kernel: per-state CPU accounting 39/3239/2
authorDavid van Moolenbroek <david@minix3.org>
Sat, 7 Nov 2015 14:42:40 +0000 (14:42 +0000)
committerLionel Sambuc <lionel.sambuc@gmail.com>
Wed, 13 Jan 2016 19:32:38 +0000 (20:32 +0100)
commit366d18b2b85b51f93b2a90700336b4a150a9149d
treec9660382d02a94a0165bfe0a4806e771b7fccfe5
parente4e21ee1b2710f3d411514741ce10d80156f4b5d
Kernel: per-state CPU accounting

This functionality is required for BSD top(1), as exposed through
the CTL_KERN KERN_CP_TIME sysctl(2) call.  The idea is that the
overall time spent in the system is divided into five categories.
While NetBSD uses a separate category for the kernel ("system") and
interrupts, we redefine "system" to mean userspace system services
and "interrupts" to mean time spent in the kernel, thereby providing
the same categories as MINIX3's own top(1), while adding the "nice"
category which, like on NetBSD, is used for time spent by processes
with a priority lowered by the system administrator.

Change-Id: I2114148d1e07d9635055ceca7b163f337c53c43a
15 files changed:
minix/include/minix/com.h
minix/include/minix/const.h
minix/include/minix/ipc.h
minix/include/minix/syslib.h
minix/kernel/arch/earm/arch_clock.c
minix/kernel/arch/i386/arch_clock.c
minix/kernel/main.c
minix/kernel/proc.h
minix/kernel/proto.h
minix/kernel/system.c
minix/kernel/system/do_getinfo.c
minix/kernel/system/do_schedctl.c
minix/kernel/system/do_schedule.c
minix/lib/libsys/sys_schedule.c
minix/servers/sched/schedule.c