]> git.baikalelectronics.ru Git - kernel.git/commit
lib: floating proportions
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 17 Oct 2007 06:25:49 +0000 (23:25 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:45 +0000 (08:42 -0700)
commitb630b059c756115b6061bb534775fafe3381b94e
treeee5bebd5b7b1f0ced5e30c8f29f1ff5301aa9d0a
parent725c2f2d7e10e680f60fc5db60df2e45621dce23
lib: floating proportions

Given a set of objects, floating proportions aims to efficiently give the
proportional 'activity' of a single item as compared to the whole set. Where
'activity' is a measure of a temporal property of the items.

It is efficient in that it need not inspect any other items of the set
in order to provide the answer. It is not even needed to know how many
other items there are.

It has one parameter, and that is the period of 'time' over which the
'activity' is measured.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/proportions.h [new file with mode: 0644]
lib/Makefile
lib/proportions.c [new file with mode: 0644]