1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:27:43 +00:00

Kernel: Avoid allocating under spinlock in ProcessGroup::find_or_create

Avoid allocating while holding the g_process_groups_lock spinlock, it's
a pattern that has a negative effect on performance and scalability,
especially given that it is a global lock, reachable by all processes.
This commit is contained in:
Brian Gianforcaro 2021-05-19 22:16:41 -07:00 committed by Andreas Kling
parent bb91bed576
commit e95eb7a51d
2 changed files with 17 additions and 2 deletions

View file

@ -40,6 +40,8 @@ private:
{
}
static RefPtr<ProcessGroup> from_pgid_nolock(ProcessGroupID);
ProcessGroup* m_prev { nullptr };
ProcessGroup* m_next { nullptr };