Re: [PATCH 2/4] KVM: Avoid checking huge page mappings inget_dirty_log()
From: Takuya Yoshikawa
Date: Tue Mar 13 2012 - 20:58:09 EST
Marcelo Tosatti <mtosatti@xxxxxxxxxx> wrote:
>
> This is a race with hugetlbfs which is not an issue ATM (it is
> hidden by the removal of huge sptes in get_dirty).
Thank you!
I did not notice this possibility at all.
...
> It can be fixed with a preceding patch that checks whether
> slot->dirty_bitmap value changes between mapping_level and after
> mmu_lock acquision, similarly to mmu_seq. Also please add a
> WARN_ON in mmu_set_spte if(slot->dirty_bitmap && level > 1).
> And document it clearly.
We may also be able to change the "if (slot->dirty_bitmap)" check to
use another flag so that we can delay the start of logging until
mmu_lock acquisition in kvm_set_memory_region().
Looking dirty_bitmap directly should be limited to when we are in
get_dirty functions.
Takuya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/