RE: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-06 Thread yf.wang--- via iommu
On Fri, 2022-03-04 at 14:03 +, Robin Murphy wrote: > > OK, so either there's a mystery bug where IOVAs somehow get freed on > offline CPUs, or the hotplug notifier isn't working correctly, or > you've > contrived a situation where alloc_iova_fast() is actually racing > against > iova_cpuhp_

RE: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-06 Thread yf.wang--- via iommu
On Fri, 2022-03-04 at 14:03 +, Robin Murphy wrote: > > OK, so either there's a mystery bug where IOVAs somehow get freed on > offline CPUs, or the hotplug notifier isn't working correctly, or > you've > contrived a situation where alloc_iova_fast() is actually racing > against > iova_cpuhp_

RE: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-06 Thread yf.wang--- via iommu
On 2022-03-04 9:22, John Garry wrote: > On 04/03/2022 04:46, yf.wang--- via iommu wrote: > > * MEDIATEK Confidentiality Notice > > The > > information contained in this e-mail message (including any > > attachments) may be confidential, proprietary, privileged, or

Re: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-04 Thread Robin Murphy
On 2022-03-04 04:46, yf.wang--- via iommu wrote: From: Yunfei Wang In alloc_iova_fast function, if an iova alloc request fail, it will free the iova ranges present in the percpu iova rcaches and free global iova rcache and then retry, but flushing CPU iova rcaches only for each online CPU, whic

Re: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-04 Thread John Garry via iommu
On 04/03/2022 04:46, yf.wang--- via iommu wrote: * MEDIATEK Confidentiality Notice The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws.

Re: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-03 Thread yf.wang--- via iommu
On Fri, 2022-03-04 at 12:46 +0800, yf.w...@mediatek.com wrote: > From: Yunfei Wang > > In alloc_iova_fast function, if an iova alloc request fail, > it will free the iova ranges present in the percpu iova > rcaches and free global iova rcache and then retry, but > flushing CPU iova rcaches only f

[PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure

2022-03-03 Thread yf.wang--- via iommu
From: Yunfei Wang In alloc_iova_fast function, if an iova alloc request fail, it will free the iova ranges present in the percpu iova rcaches and free global iova rcache and then retry, but flushing CPU iova rcaches only for each online CPU, which will cause incomplete rcache cleaning, and iova r