Page MenuHomeFreeBSD

replace locking in swap reservation with fetchadd
AbandonedPublic

Authored by kmacy on Apr 30 2018, 7:25 AM.
Tags
None
Referenced Files
F83517959: D15232.id.diff
Sat, May 11, 3:14 PM
Unknown Object (File)
Thu, May 9, 11:56 PM
Unknown Object (File)
Sun, Apr 28, 2:58 PM
Unknown Object (File)
Mon, Apr 15, 4:32 AM
Unknown Object (File)
Apr 11 2024, 12:44 PM
Unknown Object (File)
Dec 11 2023, 9:45 PM
Unknown Object (File)
Nov 24 2023, 3:31 AM
Unknown Object (File)
Nov 23 2023, 2:41 PM
Subscribers

Details

Reviewers
jeff
kib
markj
Summary

This is a straightforward conversion of the locking around swap_reservation and ui_vmsize to use atomic_fetchadd. This gives a 40% speedup on brk1_processes in will-it-scale. Moving the bottleneck to the invl_gen_mtx. The atomics again become bottlenecks if D15231 is put in place and so ultimately a more sophisticated pcpu scheme is warranted.

I realized I may have to keep the locked version around for ppc32 and MIPS. Suggestions welcome, otherwise I'll abandon.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 16349

Event Timeline

sys/vm/swap_pager.c
208

I would not call this variable 'new'.

Also, I do not believe that the patch compiles on 32bit architectures.

295

This does not compole for kernels without RACCT.