[SPR] performance: Remove operations to mm_struct out of file mapping lock's critical section

Bug #2058488 reported by Thibf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Unassigned
Jammy
New
Undecided
Unassigned

Bug Description

This is a public version of https://bugs.launchpad.net/bugs/2034985

Backport: 6852c46c783d mm/mmap: move vma operations to mm_struct out of the critical section of file mapping lock (merged upstream in 6.6) to jammy

[Impact]
The msg_bytes and msg_hdrs atomic counters are frequently updated when IPC msg queue is in heavy use, causing heavy cache bounce and overhead. Change them to percpu_counter greatly improve the performance. Since there is one percpu struct per namespace, additional memory cost is minimal. Reading of the count done in msgctl call, which is infrequent. So the need to sum up the counts in each CPU is infrequent.

[Fix]
Backport:
  6852c46c783d mm/mmap: move vma operations to mm_struct out of the critical section of file mapping lock

[Test]
I have tested this code.

[Where problems could occur]
TODO

Thibf (thibf)
no longer affects: intel
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.