[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C9F446B.1030902@redhat.com>
Date: Sun, 26 Sep 2010 15:02:35 +0200
From: Avi Kivity <avi@...hat.com>
To: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
CC: Marcelo Tosatti <mtosatti@...hat.com>,
LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH 2/4] KVM: MMU: support unsync sp out of the protection
of 'mmu_lock'
On 09/23/2010 05:05 AM, Xiao Guangrong wrote:
> >
> > How can you drop an active unsync page?
> >
> > I'm missing something here.
> >
>
> Umm, this feature is used like this:
>
> hold mmu_lock
> increase sp->active_count
> release mmu_lock
> ......
> hold mmu_lock
> increase sp->active_count
> if (!sp->active_count&& sp->invalid)
> kvm_mmu_free_page(sp);
> ......
> release mmu_lock
>
>
Well, the implementation is confusing. Maybe we should have
mmu_ref_sp() and mmu_drop_sp() wrappers to manage the reference counts
and call mmu_free_page() automatically.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists