Le 30/08/2017 à 23:01, Benjamin Herrenschmidt a écrit :
On Wed, 2017-08-30 at 15:59 +0200, Frederic Barrat wrote:
It's not clear why it makes sense for these to be empty. Either for the
general idea of the "flush_all_mm()" API, or for your intended use by
CXL.

I was not too sure what to do for hash, but the idea is that the new
flush_all_mm() is really the equivalent of the old flush_tlb_mm() from
before Ben's optimizations for radix, and that was/still is an empty
operation on hash, so I kept it that way.

We don't support hash for capi2 yet. Adding it will definitely require
some work in that area, as the current approach (use count on the driver
and all TLBIs becoming global when the driver is in use) won't hold much
longer.

Why not ? It would work fine on hash, but you do need a way to flush
the TLB when decreasing the count indeed and that's missing for hash.

For the future support of hash, the problem is actually not for capi2, but for opencapi, where we can have more than one driver. So the driver use count approach would need to be reworked (today the use count is in the driver itself). What we do for radix is better, since we make the TLBI global only when required, per context. But it is not trivial to do the same for hash, as we typically don't have the context handy when we send the TLBI. So we'll have to do *something* when we add support for hash.

For my more pressing needs, I'll look into triggering a LPID flush for the time being. It's too much but safe, and can be re-assess later when we add hash support.

  Fred

Reply via email to