Fix head/tail false sharing issues.