lock_kernel in 2.2.0pre4

lock_kernel in 2.2.0pre4

Post by David Groth » Fri, 08 Jan 1999 04:00:00



With SMP set I notice that the lock_kernel function in
include/asm/smplock.h actually performs a lock acquisition.  I also
notice that every system call that I have looked at has a lock_kernel at
the beginning.

This is the so-called "bit kernel lock".

I thought that in the 2.2 kernels there was a finer grain of locking.
This locking implies that there is only one CPU allowed to execute in
the kernel at any one time.

I am I misreading this?  If so, how so?  If not, what is the story?

-- Dave

 
 
 

lock_kernel in 2.2.0pre4

Post by Martin Recktenwal » Tue, 12 Jan 1999 04:00:00



> Most of 2.2 still runs inside the giant lock. There are still
> big SMP improvements over 2.0: the scheduler and the interrupt/bottom half
> system are fine grained locked, interrupts may be processed on another
> CPU if the current CPU is busy in the kernel (and it'll even be forwarded
> to this CPU if it is a hardware interrupt).

Does this mean that the same interrupt could be serviced by two
different CPUs at the same time (when the first CPU is not yet
finished with its interrupt handler while the same interrupt happens
again)?

Quote:> Bottom halves only still run
> one at a time though, because that is a fundamental property of them ("
> bhs are atomic to themselves")

One at a time in the sense "one bottomhalf will never be executed by
more than one CPU at the same moment" or in the sense of "there is
always only one bottomhalf active, not even two different bottom
halves on two different CPUs"?

To summarize the critical situation I think I know about (scenario:
driver which registered one interrupt and uses several bottom halves):

(- interrupt could be running on more than one CPU at once?)
- bottom half could be interrupted by an interrupt
(- bottom half could be running on more than one CPU at once?)
- syscalls could be interrupted by interrupts
- syscalls could be interrupted by bottom halves
- syscalls could be running on more than one CPU at once

Anything I forgot?

   Martin.

 
 
 

1. lock_kernel in 2.2.0pre4 w/o typo

With SMP set I notice that the lock_kernel function in
include/asm/smplock.h actually performs a lock acquisition.  I also
notice that every system call that I have looked at has a lock_kernel at
the beginning.

This is the so-called "big kernel lock".

I thought that in the 2.2 kernels there was a finer grain of locking.
This locking implies that there is only one CPU allowed to execute in
the kernel at any one time.

I am I misreading this?  If so, how so?  If not, what is the story?

-- Dave

2. PPP as non-root question

3. 2.2.0pre4 lockups

4. Iomega atapi zip patch

5. Persistent sound hangs (2.0.0 - 2.2.0pre4 tested)

6. Error whilst running "tune2fs -j"

7. current->files 2.2.0pre4

8. HP-UX -> shl_load() question

9. 2.2.0pre4 dual boot with 2.0.36 question

10. smbmount 2.0.0beta5 and linux 2.2.0pre4

11. Kernel 2.0.35 and 2.2.0Pre4 with modules on same machine

12. Upgraded from 2.2-GAMMA to 2.2-RELEASE: problems...

13. broken 2.2 IDE CD-RW (was Re: plain 2.2.X: no ide CD-RW?)