On 06/14, Oleg Nesterov wrote:
>
> So, unless you are going to remove pgd_lock altogether perhaps we can
> rely on it the same way
>
> mb();
> spin_unlock_wait(&pgd_lock);
> rmb();
>
>
> Avoids the barriers (and comments) on another side, but I can't say
> I really like this...
>
On 06/14, Ingo Molnar wrote:
>
> So since we have a spin_lock() there already,
Yes, I thought about task_lock() or pgd_lock too.
> Also, since this is x86 specific code we could rely on the fact that
> spinlock-acquire is a full memory barrier?
we do not really need the full barrier if we re
* Oleg Nesterov wrote:
> On 06/13, Ingo Molnar wrote:
> >
> > * Ingo Molnar wrote:
> >
> > > * Oleg Nesterov wrote:
> > >
> > > >
> > > > Afaics, we need to ensure that:
> > > >
> > > > > + if (pgd_val(*pgd_src))
> > > > > + WRITE_ONCE(*pgd_dst,
On 06/13, Ingo Molnar wrote:
>
> * Ingo Molnar wrote:
>
> > * Oleg Nesterov wrote:
> >
> > >
> > > Afaics, we need to ensure that:
> > >
> > > > + if (pgd_val(*pgd_src))
> > > > + WRITE_ONCE(*pgd_dst, *pgd_src);
> > >
> > > either we notice the
Prepare for lockless PGD init: enable the arch_pgd_init_late() callback
and add a 'careful' implementation of PGD init to it: only copy over
non-zero entries.
Since PGD entries only ever get added, this method catches any updates
to swapper_pg_dir[] that might have occurred between early PGD init
* Ingo Molnar wrote:
> * Oleg Nesterov wrote:
>
> > On 06/11, Ingo Molnar wrote:
> > >
> > > +void arch_pgd_init_late(struct mm_struct *mm, pgd_t *pgd)
> > > +{
> > > + /*
> > > + * This is called after a new MM has been made visible
> > > + * in fork() or exec().
> > > + *
> > > + * This
* Oleg Nesterov wrote:
> On 06/13, Oleg Nesterov wrote:
> >
> > Afaics, we need to ensure that:
> >
> > > + if (pgd_val(*pgd_src))
> > > + WRITE_ONCE(*pgd_dst, *pgd_src);
> >
> > either we notice the recent update of this PGD, or (say) the subsequent
> > s
* Oleg Nesterov wrote:
> On 06/11, Ingo Molnar wrote:
> >
> > +void arch_pgd_init_late(struct mm_struct *mm, pgd_t *pgd)
> > +{
> > + /*
> > +* This is called after a new MM has been made visible
> > +* in fork() or exec().
> > +*
> > +* This barrier makes sure the MM is visibl
On 06/13, Oleg Nesterov wrote:
>
> Afaics, we need to ensure that:
>
> > + if (pgd_val(*pgd_src))
> > + WRITE_ONCE(*pgd_dst, *pgd_src);
>
> either we notice the recent update of this PGD, or (say) the subsequent
> sync_global_pgds() can miss the child.
a
On 06/11, Ingo Molnar wrote:
>
> +void arch_pgd_init_late(struct mm_struct *mm, pgd_t *pgd)
> +{
> + /*
> + * This is called after a new MM has been made visible
> + * in fork() or exec().
> + *
> + * This barrier makes sure the MM is visible to new RCU
> + * walkers be
* Boris Ostrovsky wrote:
> On 06/11/2015 10:07 AM, Ingo Molnar wrote:
>
> >diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
> >index fb0a9dd1d6e4..e0bf90470d70 100644
> >--- a/arch/x86/mm/pgtable.c
> >+++ b/arch/x86/mm/pgtable.c
> >@@ -391,6 +391,63 @@ pgd_t *pgd_alloc(struct mm_struc
On 06/11/2015 10:07 AM, Ingo Molnar wrote:
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index fb0a9dd1d6e4..e0bf90470d70 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -391,6 +391,63 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
return NULL;
}
+/*
+ * Init
Prepare for lockless PGD init: enable the arch_pgd_init_late() callback
and add a 'careful' implementation of PGD init to it: only copy over
non-zero entries.
Since PGD entries only ever get added, this method catches any updates
to swapper_pg_dir[] that might have occured between early PGD init
a
13 matches
Mail list logo