All of lore.kernel.org
 help / color / mirror / Atom feed
* BKL- BIG kernel lock + smp
@ 2013-08-12 10:08 nidhi mittal hada
  2013-08-12 14:46 ` Valdis.Kletnieks at vt.edu
  0 siblings, 1 reply; 2+ messages in thread
From: nidhi mittal hada @ 2013-08-12 10:08 UTC (permalink / raw)
  To: kernelnewbies

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130812/0fa1b2cf/attachment.html 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* BKL- BIG kernel lock + smp
  2013-08-12 10:08 BKL- BIG kernel lock + smp nidhi mittal hada
@ 2013-08-12 14:46 ` Valdis.Kletnieks at vt.edu
  0 siblings, 0 replies; 2+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2013-08-12 14:46 UTC (permalink / raw)
  To: kernelnewbies

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-dong-the-big-kernel-lock-is-dead

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130812/75954238/attachment.bin 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-12 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12 10:08 BKL- BIG kernel lock + smp nidhi mittal hada
2013-08-12 14:46 ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.