Re: [PATCH v5 2/2] iommu/arm-smmu-v3: Default queue depths to one page in a kdump kernel

From: Nicolin Chen

Date: Mon Sep 07 2026 - 18:03:59 EST


On Mon, Sep 07, 2026 at 10:58:35AM +0100, Kiryl Shutsemau (Meta) wrote:
> All three queues are sized from the maxima the hardware advertises in IDR1
> and allocated at probe, up to 4 MB each on a 4K-page kernel. The capture
> kernel already disables two of them: arm_smmu_device_reset() drops
> CR0_EVTQEN and CR0_PRIQEN. It still allocates both at full size.
>
> A kdump capture kernel runs from a small crashkernel reservation, and every
> SMMUv3 instance pays that cost again, up to 12 MB apiece. It goes to queues
> that either serve the handful of devices used to save the dump or are
> switched off outright, and it is memory the dump itself needs.
>
> Default all three depths to one page worth of entries when
> is_kdump_kernel(). The queues carry commands and fault records rather than
> DMA data, so dump throughput is unaffected. A shallower command queue only
> bounds how many commands may be in flight before a sync, which does not
> matter for the few devices that save the dump.
>
> An explicit cmdq_max_entries still wins, so a capture kernel that wants a
> deeper command queue can ask for one on the command line.
>
> Suggested-by: Kyle McMartin <jkkm@xxxxxxxx>
> Signed-off-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
> Assisted-by: Claude-Code:claude-opus-5

Reviewed-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
Tested-by: Nicolin Chen <nicolinc@xxxxxxxxxx>