aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vmpressure.h
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2013-07-31 13:53:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-31 14:41:03 -0700
commit22f2020f84c6da2dd0acb2dce12e39e59ff7c8be (patch)
tree34188bc4df41de78fbbc4c45c8b913ea8f7f7761 /include/linux/vmpressure.h
parentprintk: rename struct log to struct printk_log (diff)
downloadlinux-dev-22f2020f84c6da2dd0acb2dce12e39e59ff7c8be.tar.xz
linux-dev-22f2020f84c6da2dd0acb2dce12e39e59ff7c8be.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 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/linux/vmpressure.h')
-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 76be077340ea..2081680e015d 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;