Page MenuHomeFreeBSD

smartpqi: Change alignment for dma tags
ClosedPublic

Authored by john.hall_microchip.com on Aug 28 2023, 5:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 14, 11:46 AM
Unknown Object (File)
Mon, Oct 14, 11:46 AM
Unknown Object (File)
Mon, Oct 14, 11:45 AM
Unknown Object (File)
Mon, Oct 14, 11:33 AM
Unknown Object (File)
Sep 24 2024, 5:15 AM
Unknown Object (File)
Sep 10 2024, 12:19 PM
Unknown Object (File)
Aug 1 2024, 8:11 PM
Unknown Object (File)
Jul 30 2024, 11:59 PM

Details

Summary

Problem: Under certain I/O conditions, a program doing large block disk reads can cause a controller to crash.

Root Cause: The SCSI read request and destination address in the BDMA descriptor is incorrect, causing the BDMA engine in the controller to assert.

Fix: Change the alignment for creating bus_dma_tags in the driver from PAGE_SIZE (4k) to 1, which allows the controller to manage it's own address range for BDMA transactions.

Risk: Medium

Exposure: This reverts a change first made to support NVMe drives on
Excalibur. At that time a 4k alignment was necessary. This no longer seems to be the case.

PR: 259541
Reported by: Ka Ho Ng <khng@freebsd.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I have testesd 14.0-BETA4 amd64 with and without this patch. dd'ing 100GB of /dev/random to a file on the SATA-booted drive works with both. This was definitely a problem with previous releases.

I will try this with ZFS, which appears to have been problematic with a previous 14.0-CURRENT snapshot.

I have tested this with root-on-ZFS using a memstick installer build from my patched /usr/src

The system appears to be stable with both patched and unpatched 14.0-BETA4.

Could this have been resolved elsewhere?

Thanks for looking at the code. We are able to see sporadic problems when running "diskinfo -i /dev/daX" doing large asynchronous random reads (1024 kbytes) . The patch resolves the problem.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 19 2023, 3:25 AM
This revision was automatically updated to reflect the committed changes.