pmc pmc_processhash_mtx - increasing lock contention as context switch rate increases
Adrian Chadd
adrian at freebsd.org
Fri Jan 10 20:49:53 UTC 2014
Hiya,
Here's another gem that has surfaced during my lab tests.
There's a single lock over the PMC descriptor list that gets acquired
during pmc_find_process_descriptor() and
pmc_remove_process_descriptor().
Trouble is, the find function is called during context switch in and
context switch out. This means that as the context switch rate goes
up, the contention on that lock also goes up. For some erm,
disk/network IO intensive workloads where the context switch rate
rises to above 500,000 context switches a second, it can get a little
ridiculous.
I'm re-reviewing the code to see if I can see an obvious way to remove
the contention on this lock in a non-racy way.
Does anyone have any ideas?
Thanks!
-a
More information about the freebsd-arch
mailing list