Re: [PATCH 26/31] sched, numa, mm: Add fault driven placement andmigration policy

From: Ingo Molnar
Date: Fri Oct 26 2012 - 10:14:27 EST



* Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:

> On Fri, 2012-10-26 at 15:50 +0200, Ingo Molnar wrote:
> >
> > Oh, just found the reason:
> >
> > the ptep_modify_prot_start()/modify()/commit() sequence is
> > SMP-unsafe - it has to be done under the mmap_sem
> > write-locked.
> >
> > It is safe against *hardware* updates to the PTE, but not
> > safe against itself.
>
> Shouldn't the pte_lock serialize all that still? All sites
> that modify PTE contents should hold the pte_lock (and do
> afaict).

Hm, indeed.

Is there no code under down_read() (in the page fault path) that
modifies the pte via just pure atomics?

Thanks,

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