diff options
author | jimharris <jimharris@FreeBSD.org> | 2012-10-31 17:12:12 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2012-10-31 17:12:12 +0000 |
commit | 8fbe05091504259bdb07f38b21e970c6f172b8cd (patch) | |
tree | 4ac6620cbd0e0fb7a58de65a02a6c12b6d67411d /sys/kern/kern_timeout.c | |
parent | 87941a0e19a2d8e48edefab400086d706d00c0cd (diff) | |
download | FreeBSD-src-8fbe05091504259bdb07f38b21e970c6f172b8cd.zip FreeBSD-src-8fbe05091504259bdb07f38b21e970c6f172b8cd.tar.gz |
Pad and align the callout_cpu mtx to its own cacheline to reduce false
sharing especially on the default CPU 0 callout_cpu structure.
This will be followed up by attilio@ with a conversion to the new struct
mtx_padalign but doing this manual conversion first gives an easy MFC
candidate since mtx_padalign is a more extensive system change.
Sponsored by: Intel
Reviewed by: jeff, attilio
MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r-- | sys/kern/kern_timeout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 967d4e0..a120bd5 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -119,8 +119,8 @@ struct cc_mig_ent { * when the callout should be served. */ struct callout_cpu { - struct cc_mig_ent cc_migrating_entity; struct mtx cc_lock; + struct cc_mig_ent cc_migrating_entity __aligned(CACHE_LINE_SIZE); struct callout *cc_callout; struct callout_tailq *cc_callwheel; struct callout_list cc_callfree; |