Re: arch_flush_lazy_mmu_mode() in arch/x86/mm/highmem_32.c

From: Zachary Amsden
Date: Mon Nov 17 2008 - 14:00:22 EST


On Mon, 2008-11-17 at 10:40 -0800, Jeremy Fitzhardinge wrote:

> Yes. The Xen code only disables interrupts temporarily while actually
> constructing a new multicall list member, to stop a half-constructed
> multicall from being issued by a nested flush. But that's very brief,
> and cheap under Xen.

We have truly magical ways of doing the same thing.

> You could do the flush in the fault handler itself, rather than
> vmalloc_sync_one. If you enter the handler with outstanding updates,
> then flush them and return. Hm, but that only works if you're always
> going from NP->P; if you're doing P->P updates then you may just end up
> with stale mappings.

vmalloc_sync_one really is just the fault handler, factored out to look
nice... in any case, the faults here will aways be NP->P; once created,
the page tables handling the vmalloc area will never be released, so the
PDE never transitions from P->P or P->NP (the PTEs do).

> The Novell kernel tree. Jan's been doggedly forward-porting the old Xen
> patches.

Okay, that explains it... the patch sequence here contains a bit of
"fun" IIRC.

--
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/