diff options
author | Konstantin Khlebnikov <khlebnikov@openvz.org> | 2011-12-08 14:33:54 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-09 07:50:27 -0800 |
commit | 83aeeada7c69f35e5100b27ec354335597a7a488 (patch) | |
tree | 44644e68f303368feba7c8ba3e0e0991d6238ada /include/linux/shrinker.h | |
parent | 635697c663f38106063d5659f0cf2e45afcd4bb5 (diff) | |
download | linux-stable-83aeeada7c69f35e5100b27ec354335597a7a488.tar.gz linux-stable-83aeeada7c69f35e5100b27ec354335597a7a488.tar.bz2 linux-stable-83aeeada7c69f35e5100b27ec354335597a7a488.zip |
vmscan: use atomic-long for shrinker batching
Use atomic-long operations instead of looping around cmpxchg().
[akpm@linux-foundation.org: massage atomic.h inclusions]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/shrinker.h')
-rw-r--r-- | include/linux/shrinker.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h index a83833a1f7a2..07ceb97d53fa 100644 --- a/include/linux/shrinker.h +++ b/include/linux/shrinker.h @@ -35,7 +35,7 @@ struct shrinker { /* These are for internal use */ struct list_head list; - long nr; /* objs pending delete */ + atomic_long_t nr_in_batch; /* objs pending delete */ }; #define DEFAULT_SEEKS 2 /* A good number if you don't know better. */ extern void register_shrinker(struct shrinker *); |