4 ms·
Thanks for this article. LWN articles are good quality. I think locks, parallelism, multithreading, async is difficult. I would like some visualisations to vis
by samsquire 3y ago
Thanks for this article. LWN articles are good quality.
I think locks, parallelism, multithreading, async is difficult. I would like some visualisations to visualise locking behaviours and obvious bottlenecks. Being able to visually see a lock convoy or priority inversion would be helpful.
The kernel-userspace transition seems to be expensive and if you have 90 threads all contending for the same resource, then you cannot scale memory write/mutation access by 90 times by locking.
If the holder of the lock is not scheduled and is preempted then the lock attempter shall spin, potentially preventing the holder of the lock from being scheduled.
I wonder if there's lessons from static and dynamic scheduling here? If you know the lock hierarchy in the kernel, couldn't you intelligently schedule? I read a really good comment on HN by jcranmer about VLIW architecture recently. [1]
[1]: https://news.ycombinator.com/item?id=38118441 https://news.ycombinator.com/item?id=38118441