[ofa-general] Re: [PATCH 2/8]: mthca/mlx4: avoid recycling old FMR R_Keys too soon

Jack Morgenstein jackm at dev.mellanox.co.il
Mon Apr 28 23:59:41 PDT 2008


On Saturday 26 April 2008 00:33, Roland Dreier wrote:
> Looks mostly OK... the only thing I worry about is in the Sinai
> optimization case, do we run into trouble with bits getting carried into
> the top bits of the key?
> 
> Can someone from Mellanox review this more carefully?

Olaf submitted such a patch (as an RFC) in February, and we had a discussion thread then:
    http://lists.openfabrics.org/pipermail/general/2008-February/046863.html

We concluded at that time that the patch was OK.

I also reviewed the patch again (especially the Sinai optimization), and the patch is OK
there, too:

The key-adjustment games are all within the index portion of the key.
The spare-bits portion is outside this range (i.e., the most
significant byte only).

For Sinai, the increment used on the key when remapping is 0x10000000
(low order bit of most significant byte), so there is no influence on the index portion
(which therefore remains constant, as it should). As such, there is no need to
call adjust-key() when unmapping an fmr -- since the index portion of the key
is not touched -- neither in map, nor in unmap.

- Jack



More information about the general mailing list