]> err.no Git - linux-2.6/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)
commit145ca25eb2fbd20d4faf1bad4628c7650332058f
treeee5bebd5b7b1f0ced5e30c8f29f1ff5301aa9d0a
parent69cb51d18c1ed593009d9a620cac49d0dcf15dc8
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]