[PATCH/RFC] Rework ptep_set_access_flags and fix sun4c
Hugh Dickins
hugh at veritas.com
Wed May 23 14:03:38 EST 2007
On Wed, 23 May 2007, Benjamin Herrenschmidt wrote:
>
> > Would the "__changed && __dirty" architectures (x86, x86_64, ia64)
> > be better off saying __changed = __dirty && pte_same? I doubt it's
> > worth bothering about.
>
> I'd say let gcc figure it out :-)
No, I wasn't meaning the optimization, but the significance of the
boolean __changed that's returned. If ptep_set_access_flags does
not change the pte (because !dirty or !safely_writable or whatever
that arch calls it), then ideally it ought to return false.
But it doesn't affect correctness if it sometimes says true not
false, and these arches happen to have an empty update_mmu_cache
(with lazy_mmu_prot_update currently under separate review), and
what you have follows what was already being done, and sun4c
already has to "lie": so it's rather theoretical.
Hugh
More information about the Linuxppc-dev
mailing list