summaryrefslogtreecommitdiffstats
path: root/fs/pnode.h
diff options
context:
space:
mode:
authorTim Chen <tim.c.chen@linux.intel.com>2010-08-10 02:19:04 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 05:44:58 +0200
commit27f5e0f694fd0600274a76854636c0749e3bb1f6 (patch)
tree0d3a0387b42eb0a830fa5ba896a205b2a3807b8b /fs/pnode.h
parentgcc-4.6: mm: fix unused but set warnings (diff)
downloadlinux-27f5e0f694fd0600274a76854636c0749e3bb1f6.tar.xz
linux-27f5e0f694fd0600274a76854636c0749e3bb1f6.zip
tmpfs: add accurate compare function to percpu_counter library
Add percpu_counter_compare that allows for a quick but accurate comparison of percpu_counter with a given value. A rough count is provided by the count field in percpu_counter structure, without accounting for the other values stored in individual cpu counters. The actual count is a sum of count and the cpu counters. However, count field is never different from the actual value by a factor of batch*num_online_cpu. We do not need to get actual count for comparison if count is different from the given value by this factor and allows for quick comparison without summing up all the per cpu counters. Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/pnode.h')
0 files changed, 0 insertions, 0 deletions