Re: [PATCH] mm/autonuma: don't use set_pte_at when updating protnone ptes

From: Andrew Morton
Date: Tue Feb 14 2017 - 19:05:31 EST


On Tue, 14 Feb 2017 19:41:17 +0530 "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> wrote:

> "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> writes:
>
> > Architectures like ppc64, use privilege access bit to mark pte non accessible.
> > This implies that kernel can do a copy_to_user to an address marked for numa fault.
> > This also implies that there can be a parallel hardware update for the pte.
> > set_pte_at cannot be used in such scenarios. Hence switch the pte
> > update to use ptep_get_and_clear and set_pte_at combination.
> >
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
>
> With this and other patches a kvm guest is giving me
>
> ...
>
> Reverting this patch gets rid of the above hang. But I am running into segfault
> with systemd in guest. It could be some other patches in my local tree.
>
> Maybe we should hold merging this to 4.11 and wait for this to get more
> testing ?

Shall do. Please let me know the outcome...