Page MenuHomeFreeBSD

Further reorganize pmap_invalidate TLB code.
ClosedPublic

Authored by kib on Sep 21 2018, 8:48 PM.

Details

Summary

Split calculation of mask for shootdown IPI and local invalidation. Reorder IPI before local.

Test Plan

Peter, could you, please, test this, same as D17184.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Sep 21 2018, 8:48 PM
markj accepted this revision.Sep 21 2018, 8:53 PM
This revision is now accepted and ready to land.Sep 21 2018, 8:53 PM
alc added inline comments.Sep 21 2018, 9:38 PM
sys/amd64/amd64/pmap.c
1810 ↗(On Diff #48327)

Is there a reason that you're now doing the remote invalidations before the local one? Two of the functions are now doing remote invalidations first, and one is doing local invalidations first.

kib updated this revision to Diff 48333.Sep 21 2018, 10:09 PM

Move all IPIs before local, as advertised.

This revision now requires review to proceed.Sep 21 2018, 10:09 PM
alc accepted this revision.Sep 21 2018, 10:14 PM
This revision is now accepted and ready to land.Sep 21 2018, 10:14 PM
markj accepted this revision.Sep 21 2018, 10:28 PM
pho added a comment.Sep 22 2018, 1:52 PM

I ran tests with vm.pmap.pcid_enabled set to 0 and 1. The tests included all threaded tests and all of the mmap() tests.
No problems seen.

This revision was automatically updated to reflect the committed changes.
mjg reopened this revision.Sep 28 2018, 10:56 AM
mjg added a subscriber: mjg.

I started getting semi-reliable tinderbox failures which I bisected to this change.

The box in question is a 4-socket broadwell with:
vm.pmap.invpcid_works: 1
vm.pmap.pcid_enabled: 1
vm.pmap.pg_ps_enabled: 1
vm.pmap.pat_works: 1

Most of the time the bug can be reproduced while building i386 LINT kernels and manifests itself with objcopy complaining about passed files (objcopy: file format not recognized, files change at random).

head r338993 with this change reverted works fine.

kib added a comment.Sep 28 2018, 12:06 PM

Try this please P225

mjg added a comment.Sep 28 2018, 12:38 PM

the patch works

markj added a comment.Oct 23 2018, 2:24 PM

This revision can be closed. (I'd do it, but phabricator doesn't give me the option.)

kib accepted this revision.Oct 23 2018, 2:42 PM
This revision is now accepted and ready to land.Oct 23 2018, 2:42 PM
kib closed this revision.Oct 23 2018, 2:42 PM