BKL- BIG kernel lock + smp
Hi all, I have an smp linux redhat kernel running on many cpu cores. I know that one process running on one of cpu has tried for Big kernel lock . I am finding that another process on another CPU is trying for BKL. My question is :- ------------------------- Being on different processors , can they both try and acquire BKL ? Can two processes running on different CPUs, acquire BKL , at same time? Another doubt (for same infrastructure) *BKL and preemption and spinlock* 1) If i find from core for a process task struct that *lock_depth = 0 *, *does that ensure this process has acquired BKL ?* as without taking lock it remain -1 ?? 2) If i get preempt_count as non negative but *not 1*, instead a very big number 67174400 , does that ensure that *kernel preemption has been disabled by this process and its running in atomic context ?* 3) If a process has taken BKL , kernel premption is disabled from that point of time, now same process if tries to acquire another spinlock , thats held by some other process... will it cause a deadlock ? i assume, other process if gets to run on other cpu, will run and release the lock and hence will be acquired by this process.. is it right ? Thanks Nidhi
On Mon, 12 Aug 2013 15:38:09 +0530, nidhi mittal hada said:
I have an smp linux redhat kernel running on many cpu cores.
I know that one process running on one of cpu has tried for Big kernel lock
Lock contention was one of the reasons why the BKL went away back in 2.6.39: https://www.linux.com/learn/tutorials/447301:whats-new-in-linux-2639-ding-do... Use a kernel that's less than 2 years old and you won't have that problem. And if you're stuck with a kernel that's older than that, you can still fix your locking to not use the BLK.
participants (2)
-
nidhi mittal hada -
Valdis.Kletnieks@vt.edu