Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2014 12:49:52 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   pmc pmc_processhash_mtx - increasing lock contention as context switch rate increases
Message-ID:  <CAJ-VmokA=Wbmcy_7EAS9_TuVCg63fP5a57VM2mkz5jnkHnJwtw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokA=Wbmcy_7EAS9_TuVCg63fP5a57VM2mkz5jnkHnJwtw>