HomeFreeBSD

When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of

Description

When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of
the first cacheline if the buffer start address is not on a cacheline
boundary. Normally a buffer which is not cacheline-aligned is bounced,
but a special rule applies for mbufs, which are always misaligned due to
the header. We know the cpu will not write to the header while dma is in
progress (so we've been told anyway), but it may have written to the
header shortly before starting a read, so we need to flush that write out
to memory before invalidating the whole buffer.

In collaboration with Mical Meloun and Svata Kraus.

Details

Provenance
ianAuthored on
Parents
rS274838: Strengthen vdsk_open:
Branches
Unknown
Tags
Unknown

Event Timeline