Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpuset: Provide lockdep check for cpuset lock held

cpuset modifies partitions, including isolated, while holding the cpuset
mutex.

This means that holding the cpuset mutex is safe to synchronize against
housekeeping cpumask changes.

Provide a lockdep check to validate that.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: "Michal Koutný" <mkoutny@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Marco Crivellari <marco.crivellari@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Cc: cgroups@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

+9
+2
include/linux/cpuset.h
··· 18 18 #include <linux/mmu_context.h> 19 19 #include <linux/jump_label.h> 20 20 21 + extern bool lockdep_is_cpuset_held(void); 22 + 21 23 #ifdef CONFIG_CPUSETS 22 24 23 25 /*
+7
kernel/cgroup/cpuset.c
··· 283 283 cpus_read_unlock(); 284 284 } 285 285 286 + #ifdef CONFIG_LOCKDEP 287 + bool lockdep_is_cpuset_held(void) 288 + { 289 + return lockdep_is_held(&cpuset_mutex); 290 + } 291 + #endif 292 + 286 293 static DEFINE_SPINLOCK(callback_lock); 287 294 288 295 void cpuset_callback_lock_irq(void)