From: Xiao Guangrong on


Marcelo Tosatti wrote:

>>>>
>>>> It reads the 16 aligned items around sptep's corresponding gpte and this gpte
>>>> is also in this area. :-)
>>> But you removed that in patch 8?
>>>
>> Oh, i just want it good for review, you mean it's better let patch 7 and 8 in one patch?
>
> I mean patch 7 is wrong because it removes rereading of gpte, with
> mmu_lock held, in the prefetch patch.
>

Marcelo,

Sorry, i don't understand it clearly.

In the patch 7, we read gpte like this:

hold mmu_lock
atomic read gpte during guest mapping's checking in 'fetch' path
atomic read 16 aligned items chunk (include gpte) in pte_prefetch path
release mmu_lock

And in the patch 8, we do it like this:
hold mmu_lock

atomic read 16 aligned items chunk (include gpte) in 'fetch' path, and
saved this chunk to gw->prefetch_ptes

get gptes form gw->prefetch_ptes in pte_prefetch path

release mmu_lock

Could you please tell me where is wrong?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Marcelo Tosatti on
On Wed, Jul 07, 2010 at 10:10:04PM +0800, Xiao Guangrong wrote:
>
>
> Marcelo Tosatti wrote:
>
> >>>>
> >>>> It reads the 16 aligned items around sptep's corresponding gpte and this gpte
> >>>> is also in this area. :-)
> >>> But you removed that in patch 8?
> >>>
> >> Oh, i just want it good for review, you mean it's better let patch 7 and 8 in one patch?
> >
> > I mean patch 7 is wrong because it removes rereading of gpte, with
> > mmu_lock held, in the prefetch patch.
> >
>
> Marcelo,
>
> Sorry, i don't understand it clearly.
>
> In the patch 7, we read gpte like this:
>
> hold mmu_lock
> atomic read gpte during guest mapping's checking in 'fetch' path
> atomic read 16 aligned items chunk (include gpte) in pte_prefetch path
> release mmu_lock
>
> And in the patch 8, we do it like this:
> hold mmu_lock
>
> atomic read 16 aligned items chunk (include gpte) in 'fetch' path, and
> saved this chunk to gw->prefetch_ptes
>
> get gptes form gw->prefetch_ptes in pte_prefetch path
>
> release mmu_lock
>
> Could you please tell me where is wrong?

You're right. Patchset looks good to me.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/