If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

iam not native english, i already reed giant lock, but dont understand anything [nothing seems to be more clear]

both, benchmarks and explanations

A lock is a synchronization primitive. Basically you place it around blocks of code, and then it becomes impossible for 1 thread to enter the block until the first has exited. The idea is to keep 1 thread from deleting or modifying some shared data before another thread has finished using it. In a userspace program that is only an issue for multi-threaded applications. In the kernel, there are all sorts of threads, events, and hardware interrupts that can cause an issue.

A long time ago, devs originally create 1 large lock and used it everywhere in the kernel. That was simple to do, because essentially grabbing the lock switched all the code inside into a single-threaded mode. But it has issues with scalability - you want as many different threads as possible able to work. There's no reason the memory subsystem and the Ext4 filesystem should both be blocking each other. So the solution is to create 2 locks, one for each section. The complication is that so much complicated code had come to rely on the single lock that it was almost impossible to predict the behavior of the kernel when you messed with that global lock. So people have been slowly going through section by section of the kernel to try and factor out what codes needs to share the same lock and what code can be separated out. A lot of the code under the global lock didn't even need to be, and was just there because the original coder thought it might be an issue.

So I'm not really sure how benchmarks will change. It will definitely increase the scalability of anything that likes to hit a bunch of kernel code. But on the other hand, this has been going on piece by piece for many years. So a lot of the benefits were already done and in previous kernels.