10 Sep, 2010
1 commit
-
lg_lock_global() currently only acquires spinlocks for online CPUs, but
it's meant to lock all possible CPUs. Lglock-protected resources may be
associated with removed CPUs - and, indeed, that could happen with the
per-superblock open files lists.At Nick's suggestion, change for_each_online_cpu() to
for_each_possible_cpu() to protect accesses to those resources.Cc: Al Viro
Acked-by: Nick Piggin
Signed-off-by: Jonathan Corbet
Signed-off-by: Linus Torvalds
18 Aug, 2010
1 commit
-
lglock: introduce special lglock and brlock spin locks
This patch introduces "local-global" locks (lglocks). These can be used to:
- Provide fast exclusive access to per-CPU data, with exclusive access to
another CPU's data allowed but possibly subject to contention, and to provide
very slow exclusive access to all per-CPU data.
- Or to provide very fast and scalable read serialisation, and to provide
very slow exclusive serialisation of data (not necessarily per-CPU data).Brlocks are also implemented as a short-hand notation for the latter use
case.Thanks to Paul for local/global naming convention.
Cc: linux-kernel@vger.kernel.org
Cc: Al Viro
Cc: "Paul E. McKenney"
Signed-off-by: Nick Piggin
Signed-off-by: Al Viro