Page MenuHomeFreeBSD

Add options to dmb() and dsb() macros
ClosedPublic

Authored by zbb on Jun 1 2015, 12:14 AM.

Details

Summary

Using plain dsb()/dmb() as full system barriers is usually to much.
Adding proper options to those barriers (instead of full system - sy)
will most likely reduce the cost of the instructions and will benefit
in performance improvement.
This commit adds options to barrier macro definitions.

Obtained from: Semihalf
Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

zbb updated this revision to Diff 5849.Jun 1 2015, 12:14 AM
zbb retitled this revision from to Add options to dmb() and dsb() macros.
zbb updated this object.
zbb edited the test plan for this revision. (Show Details)
zbb added reviewers: andrew, emaste, imp, ian.
zbb set the repository for this revision to rS FreeBSD src repository.
zbb added a subscriber: Unknown Object (MLST).
andrew edited edge metadata.Jun 2 2015, 9:18 AM

Given you are changing these can you also mark them as with ish*?

sys/arm64/arm64/db_interface.c
164–165

Are these needed? The cache handling functions already have dsb and isb instructions.

sys/arm64/include/atomic.h
32

This should be #define<tab>isb()...

49–54

And these

zbb updated this revision to Diff 5973.Jun 5 2015, 10:08 PM
zbb updated this object.
zbb edited edge metadata.
zbb removed rS FreeBSD src repository as the repository for this revision.
zbb marked 3 inline comments as done.
ian accepted this revision.Jun 6 2015, 8:05 PM
ian edited edge metadata.

Is this really all the instances of dmb() and dsb() in the code? I guess most of them must be in asm and inline-asm code.

This revision is now accepted and ready to land.Jun 6 2015, 8:05 PM
eadler added a subscriber: eadler.Jun 6 2015, 11:00 PM

Thank you!

zbb added a comment.Jun 9 2015, 11:39 PM
In D2701#52274, @ian wrote:

Is this really all the instances of dmb() and dsb() in the code? I guess most of them must be in asm and inline-asm code.

Yes, however there will be some more in the ITS code.

zbb closed this revision.Jun 9 2015, 11:56 PM

Thank you very much. Committed to r284196.
https://svnweb.freebsd.org/changeset/base/284196