Page MenuHomeFreeBSD

sfxge: add barriers to BAR write macros
ClosedPublic

Authored by arybchik on Mar 16 2015, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 7:57 PM
Unknown Object (File)
Sat, Dec 21, 9:59 AM
Unknown Object (File)
Nov 28 2024, 9:57 AM
Unknown Object (File)
Nov 23 2024, 10:06 PM
Unknown Object (File)
Nov 14 2024, 4:56 PM
Unknown Object (File)
Sep 23 2024, 4:36 PM
Unknown Object (File)
Sep 9 2024, 2:36 AM
Unknown Object (File)
Sep 8 2024, 3:43 AM
Subscribers

Details

Summary

In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):

  1. Before the first write to guarantee that previous writes to the region have been done
  2. Before the last write to guarantee that write to the last dword/qword is done after previous writes

Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).

On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.

Sponsored by: Solarflare Communications, Inc.

Test Plan

Build tested
Throughput is not affected. CPU load is not affected.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

arybchik retitled this revision from to sfxge: add barriers to BAR write macros.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added a reviewer: gnn.
arybchik updated this revision to Diff 4349.

Closed by commit rS280375 (authored by @arybchik).