[rds-devel] The meaning of MR invalidation

Olaf Kirch olaf.kirch at oracle.com
Mon Feb 11 04:57:20 PST 2008


On Monday 11 February 2008 12:46, Or Gerlitz wrote:
> With the FMRs you are using, the R_Key is broken to (at least) two
> parts, the first one (say the "prefix") is unique and the second one
> (say the lower XX "suffix" bits) are running counter which changes every
> re-map of this fmr and wraps around at some point, such that the
> consumer must issue an unmap on the fmr when this happens.

I see - I misread the code. I thought the r_key was constant for the
lifetime of a FMR.

> I have read the comments made by Rick and yourself over this thread, and 
> I was not sure whether you think that other then the wrapping scheme I 
> describe above same R_Key can be seen by the server twice.

It was a concern about reusing a FMR, and getting the same R_Key. That
would not be safe from our point of view.

> For example I failed to follow Olaf's comment that fair amount of code 
> can be removed from the pool (which one the RDS or the IB core?) when 
> taking the above paragraph into account.

The RDS fmr pool in its current version has 3 lists - one for unused FMRs
that still have a mapping; one for unused FMRs that have been cleaned (ie
they have been through ib_fmr_unmap); and a third one for unused FMRs that
have reached the max_remap limit.

If we decide to never reuse FMRs, all we'd need would be one list; and
we could do away with a fair amount of code dealing with FMR reuse.

But, as you say, the R_Key changes whenever we remap an FMR, so we
better keep this code around I guess :)

Olaf
-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir at lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax



More information about the rds-devel mailing list