Add couple memory barries to serialize tdq_cpu_idle and tdq_load accesses.
authormav <mav@FreeBSD.org>
Sun, 14 Sep 2014 22:13:19 +0000 (22:13 +0000)
committermav <mav@FreeBSD.org>
Sun, 14 Sep 2014 22:13:19 +0000 (22:13 +0000)
commit1cfaa7d62ba4ad88a87e3d3c7d9b1c7fc51059a0
treecb7a2bdd13fd7cc0cd6fd16bce82d4b95a22a7c5
parent80ccb248ca5a4784c12f1eb4893ff05034603733
Add couple memory barries to serialize tdq_cpu_idle and tdq_load accesses.

This change fixes transient performance drops in some of my benchmarks,
vanishing as soon as I am trying to collect any stats from the scheduler.
It looks like reordered access to those variables sometimes caused loss of
IPI_PREEMPT, that delayed thread execution until some later interrupt.

MFC after: 3 days
sys/kern/sched_ule.c