lkml.org 
[lkml]   [2020]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 07/22] kvm: mmu: Support zapping SPTEs in the TDP MMU
From
Date
On 25/09/20 23:22, Ben Gardon wrote:
> +/*
> + * If the MMU lock is contended or this thread needs to yield, flushes
> + * the TLBs, releases, the MMU lock, yields, reacquires the MMU lock,
> + * restarts the tdp_iter's walk from the root, and returns true.
> + * If no yield is needed, returns false.
> + */

The comment is not really necessary. :)

Paolo

> +static bool tdp_mmu_iter_cond_resched(struct kvm *kvm, struct tdp_iter *iter)
> +{
> + if (need_resched() || spin_needbreak(&kvm->mmu_lock)) {
> + kvm_flush_remote_tlbs(kvm);
> + cond_resched_lock(&kvm->mmu_lock);
> + tdp_iter_refresh_walk(iter);
> + return true;
> + } else {
> + return false;
> + }

\
 
 \ /
  Last update: 2020-09-26 02:15    [W:0.512 / U:29.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site