fsl booke MM vs. SMP questions

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon May 28 20:00:21 EST 2007


On Mon, 2007-05-28 at 17:37 +0800, Liu Dave-r63238 wrote:
> 
> BTW, if the x86 processor support the broadcast tlb operation to
> system?
> If it can,  why we adopt the IPI mechanism for x86? what is the
> concern?

I don't think it supports them but then, I don't know for sure.

Part of the problem is what your workload is. if you have a lot of small
and short lived processes, such as CGI's on a web server, they are
fairly unlikely to exist on more than one processor, maybe two, during
their lifetime (there is a strong optimisation to only do a local
invalidate when the process only ever existed on one processor).

If you have a massively threaded workload, that is, a given process is
likely to exist on all processors, then it's also fairly unlikely that
you start doing a lot of fork()'s or to have that processes be short
lived... so it's less of an issue unless you start abusing mmap/munmap
or mprotect.

Also, when you have a large number of processors, having broadcast tlb
invalidations on the bus might become a bottleneck if, at the end of the
day, you really only want to invalidate one or two siblings. In that
case, targetted IPIs are probably a better option.

In the end, it's very difficult to "guess" what is better. If you add
all the above, plus the race between tlb invalidations and SW TLB
reload, it makes sense to start with IPIs and try to optimize that code
path as much as you can to avoid hitting more CPUs than necessary for
example).

Ben.





More information about the Linuxppc-dev mailing list