lkml.org 
[lkml]   [2022]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] iommu/iova: Free all CPU rcache for retry when iova alloc failure
Date
On Fri, 2022-03-04 at 14:03 +0000, 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_dead(). In the latter case, the solution is "don't do
> that".
>
> This change should not be necessary.
>
> Thanks,
> Robin.

Hi Robin,

1.As long as iova domain is not destroyed, the cached iovas will always
exist, the only chance to free the cache is the retry flushing
mechanism when alloc fail, but not free cached iova of not online CPU.

2.Iova rcache mechanism is by cpu, but there is no free rcache
mechanism when the CPU state switch.

3.iova.c does not know about CPU state switching, eg.online <--> offline.

Based on the above basic information, this is not a user bug, it is
more like a defect of the iova rcache mechanism.

Thanks,
Yunfei.

\
 
 \ /
  Last update: 2022-03-07 04:39    [W:1.174 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site