Thread (33 messages) flat view 33 messages, 5 authors, 2017-08-25

Re: [PATCH 5/6] powerpc/mm: Optimize detection of thread local mm's

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-08-22 04:28:39

Frederic Barrat [off-list ref] writes:
Hi Ben,

Le 24/07/2017 =C3=A0 06:28, Benjamin Herrenschmidt a =C3=A9crit :
quoted
Instead of comparing the whole CPU mask every time, let's
keep a counter of how many bits are set in the mask. Thus
testing for a local mm only requires testing if that counter
is 1 and the current CPU bit is set in the mask.

I'm trying to see if we could merge this patch with what I'm trying to=20
do to mark a context as requiring global TLBIs.
In http://patchwork.ozlabs.org/patch/796775/
I'm introducing a 'flags' per memory context, using one bit to say if=20
the context needs global TLBIs.
The 2 could co-exist, just checking... Do you think about using the=20
actual active_cpus count down the road, or is it just a matter of=20
knowing if there are more than one active cpus?
Currently it's just an optimisation to save comparing the full cpumask
every time to detect if we can go local vs broadcast.

So if you increment it then it will mean we do broadcast, which is what
you need.

It's possible in future we might try to do something more complicated,
like send targeted IPIs etc. But if we ever do that we can adapt CXL
then.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help