[PATCH v2] iommu/arm-smmu-v3: Shrink command/event/PRI queues in kdump kernel
Pranjal Shrivastava
praan at google.com
Thu Jul 2 08:05:12 PDT 2026
On Thu, Jul 02, 2026 at 12:28:25PM +0100, Kiryl Shutsemau (Meta) wrote:
> The command, event and PRI queues are sized from the maxima the hardware
A minor note here is PRI & EVT queues are disabled for the kdump kernel
(see arm_smmu_device_reset). We could just mention all SMMU queues are
sized [...] in the commit message.
> advertises in IDR1, which can be several megabytes each. On systems with
> many SMMUv3 instances that cost is paid per instance and adds up to tens
> of megabytes of coherent DMA in the capture kernel.
>
> A kdump capture kernel runs from a small crashkernel reservation and only
> has to drive the few devices used to save the dump, so deep queues serve
> no purpose. The queues carry invalidation commands and fault records, not
> DMA data, so dump throughput is unaffected; a shallower queue only bounds
> how many commands may be in flight before a sync, which does not matter for
> the capture kernel's small device count and modest I/O.
>
> Clamp every queue to a single page when is_kdump_kernel() is true. Doing
> it in arm_smmu_init_one_queue() covers the command, event and PRI queues
> in one place. The command queue still holds at least one batch plus a sync
> (256 entries on a 4K-page kernel, well above CMDQ_BATCH_ENTRIES), so
> command batching keeps working.
>
> Suggested-by: Kyle McMartin <jkkm at meta.com>
> Signed-off-by: Kiryl Shutsemau (Meta) <kas at kernel.org>
> Reviewed-by: Breno Leitao <leitao at debian.org>
> ---
Apart from that.
Reviewed-by: Pranjal Shrivastava <praan at google.com>
Thanks,
Praan
More information about the linux-arm-kernel
mailing list