[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1411731209.1733.51.camel@ale.ozlabs.ibm.com>
Date: Fri, 26 Sep 2014 21:33:29 +1000
From: Michael Neuling <mikey@...ling.org>
To: Anton Blanchard <anton@...ba.org>
Cc: greg@...ah.com, arnd@...db.de, mpe@...erman.id.au,
benh@...nel.crashing.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...abs.org, jk@...abs.org, imunsie@...ibm.com,
cbe-oss-dev@...ts.ozlabs.org
Subject: Re: [PATCH 10/15] powerpc/mm: Add hooks for cxl
On Fri, 2014-09-26 at 14:33 +1000, Anton Blanchard wrote:
> > From: Ian Munsie <imunsie@....ibm.com>
> >
> > This add a hook into tlbie() so that we use global invalidations when
> > there are cxl contexts active.
> >
> > Normally cxl snoops broadcast tlbie. cxl can have TLB entries
> > invalidated via MMIO, but we aren't doing that yet. So for now we
> > are just disabling local tlbies when cxl contexts are active. In
> > future we can make tlbie() local mode smarter so that it invalidates
> > cxl contexts explicitly when it needs to.
> >
> > This also adds a hooks for when SLBs are invalidated to ensure any
> > corresponding SLBs in cxl are also invalidated at the same time.
> >
> > Signed-off-by: Ian Munsie <imunsie@....ibm.com>
> > Signed-off-by: Michael Neuling <mikey@...ling.org>
>
> > + use_local = local && mmu_has_feature(MMU_FTR_TLBIEL) && !cxl_ctx_in_use();
>
> Seems reasonable until we can get the MMIO based optimisation in.
>
> Will all CAPI cached translations be invalidated before we finish using
> a CAPI context?
I'm not sure I understand. Can you elaborate?
> And conversely, could CAPI cache any translations when a
> context isn't active?
The kernel invalidates all translations when the file descriptor is
closed. So no, unless the PSL was badly behaving and ignoring the
invalidations.... but if we can't trust the PSL we're screwed.
> I'm mostly concerned that we can't have a
> situation where badly behaving userspace could result in a stale
> translation.
We only map what a user processes maps and we tear it down when the
process is teared down (on the file descriptor release). So I think we
are ok.
Unless there's some lazy teardown you're alluding to that I'm missing?
>
> > spu_flush_all_slbs(mm);
> > #endif
> > + cxl_slbia(mm);
>
> > spu_flush_all_slbs(mm);
> > #endif
> > + cxl_slbia(mm);
>
> > spu_flush_all_slbs(mm);
> > #endif
> > + cxl_slbia(mm);
>
> > spu_flush_all_slbs(mm);
> > #endif
> > + cxl_slbia(mm);
>
> Should we combine the SPU vs CXL callouts into something common -
> perhaps copro_flush_all_slbs()?
Sounds good. I'll update.
Mikey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists