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)
Apr 17 2024, 5:58 AM
Unknown Object (File)
Apr 17 2024, 5:53 AM
Unknown Object (File)
Jan 5 2024, 5:40 PM
Unknown Object (File)
Dec 31 2023, 9:49 AM
Unknown Object (File)
Dec 31 2023, 9:49 AM
Unknown Object (File)
Dec 25 2023, 9:43 AM
Unknown Object (File)
Nov 11 2023, 3:47 AM
Unknown Object (File)
Nov 4 2023, 11:55 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).