Handle percpu synchronization

This should go into a separate commit.