lkml.org 
[lkml]   [2011]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mmu_notifier, kvm: Introduce dirty bit tracking in spte and mmu notifier to help KSM dirty bit tracking
    On 06/22/2011 02:05 PM, Izik Eidus wrote:
    >>> + spte = rmap_next(kvm, rmapp, NULL);
    >>> + while (spte) {
    >>> + int _dirty;
    >>> + u64 _spte = *spte;
    >>> + BUG_ON(!(_spte& PT_PRESENT_MASK));
    >>> + _dirty = _spte& PT_DIRTY_MASK;
    >>> + if (_dirty) {
    >>> + dirty = 1;
    >>> + clear_bit(PT_DIRTY_SHIFT, (unsigned long *)spte);
    >>> + }
    >>
    >> Racy. Also, needs a tlb flush eventually.
    > +
    >
    > Hi, one of the issues is that the whole point of this patch is not do
    > tlb flush eventually,
    > But I see your point, because other users will not expect such
    > behavior, so maybe there is need into a parameter
    > flush_tlb=?, or add another mmu notifier call?
    >

    If you don't flush the tlb, a subsequent write will not see that spte.d
    is clear and the write will happen. So you'll see the page as clean
    even though it's dirty. That's not acceptable.

    --
    error compiling committee.c: too many arguments to function



    \
     
     \ /
      Last update: 2011-06-22 13:13    [W:0.020 / U:31.852 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site