lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v2 5/5] KVM: Unmap pages only when it's indeed protected for NUMA migration
From
On Wed, Aug 16, 2023, bibo mao wrote:
>
>
> 在 2023/8/16 15:18, Yan Zhao 写道:
> > On Wed, Aug 16, 2023 at 03:29:22PM +0800, bibo mao wrote:
> >>> Flush must be done before kvm->mmu_lock is unlocked, otherwise,
> >>> confusion will be caused when multiple threads trying to update the
> >>> secondary MMU.
> >> Since tlb flush is delayed after all pte entries are cleared, and currently
> >> there is no tlb flush range supported for secondary mmu. I do know why there
> >> is confusion before or after kvm->mmu_lock.
> >
> > Oh, do you mean only do kvm_unmap_gfn_range() in .invalidate_range_end()?
> yes, it is just sketchy thought for numa balance scenery,
> do kvm_unmap_gfn_range() in invalidate_range_end rather than
> invalidate_range_start.

That is not an option, it's a direction violation of the mmu_notifier contract.
Secondary MMUs must drop all references before returning from invalidate_range_start().

\
 
 \ /
  Last update: 2023-08-16 15:40    [W:0.116 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site