Re: [PATCH v2 03/11] iommu/arm-smmu-v3: Add arm_smmu_drain_queue_for_iopf() helper
From: Nicolin Chen
Date: Wed Jul 29 2026 - 01:27:12 EST
On Wed, Jul 29, 2026 at 05:15:43AM +0000, Pranjal Shrivastava wrote:
> For PRIQ/EVTQ, my only worry was the HW producing more events,
> say Device A is detached (we call drain from attach_release) but Device B
> (still attached) starts an agressive DMA with multiple PRI requests/evts.
>
> Maybe we should go back to snapshot based polling for that?
If you look closely, "pending" is the snapshot, regardless of the
growing prod.
* With @until_empty == false (for EVTQ/PRIQ), exit once "drained" reaches its
* target: "pending" (i.e. prod0 - cons0, frozen at the entry time):
*
* cons0 cons prod0 (prod)
* |<---- drained ---->| | |
* ---+###################+=====================+=============+--->
* |<--------------- pending --------------->|
Nicolin