summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2013-07-31 13:53:48 -0700
committerMarek Szyprowski <m.szyprowski@samsung.com>2014-05-15 07:28:15 +0200
commitd03c2034ef2855d713d9fa1f4a38e9a4b861ce12 (patch)
treee637f1eef770c6c6cd5677db95817ba73b111060 /include
parent6adea3dc7cebbfeb203547240892d8ac263fb1a3 (diff)
downloadlinux-3.10-d03c2034ef2855d713d9fa1f4a38e9a4b861ce12.tar.gz
linux-3.10-d03c2034ef2855d713d9fa1f4a38e9a4b861ce12.tar.bz2
linux-3.10-d03c2034ef2855d713d9fa1f4a38e9a4b861ce12.zip
vmpressure: change vmpressure::sr_lock to spinlock
There is nothing that can sleep inside critical sections protected by this lock and those sections are really small so there doesn't make much sense to use mutex for them. Change the log to a spinlock Change-Id: I54c8361a88ec810676cf631f3754c5b860d54b01 Signed-off-by: Michal Hocko <mhocko@suse.cz> Reported-by: Tejun Heo <tj@kernel.org> Cc: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Li Zefan <lizefan@huawei.com> Reviewed-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/vmpressure.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/vmpressure.h b/include/linux/vmpressure.h
index 76be077340e..2081680e015 100644
--- a/include/linux/vmpressure.h
+++ b/include/linux/vmpressure.h
@@ -12,7 +12,7 @@ struct vmpressure {
unsigned long scanned;
unsigned long reclaimed;
/* The lock is used to keep the scanned/reclaimed above in sync. */
- struct mutex sr_lock;
+ struct spinlock sr_lock;
/* The list of vmpressure_event structs. */
struct list_head events;