[openib-general] Re: [PATCH] mthca: fix registration for giant MRs

Michael S. Tsirkin mst at mellanox.co.il
Thu Jun 2 09:50:53 PDT 2005


Quoting r. Roland Dreier <roland at topspin.com>:
> Subject: Re: [PATCH] mthca: fix registration for giant MRs
> 
>     Michael> Why dont we keep mthca_mtt by instance in struct
>     Michael> mthca_mr, like this: struct mthca_mr { struct ib_mr ibmr;
>     Michael> struct mthca_mtt mtt; };
> 
>     Michael> Saves keeping around an extra small chunk of memory that
>     Michael> we need to kfree/kmalloc/check.  mthca_alloc_mtt could
>     Michael> get struct mthca_mtt* and use that.
> 
> My reasoning was that when we support shared memory regions we'll be
> able to share MTTs just by adding a reference cound to the mtt
> structure.
> 
>  - R.
> 

Good idea.

-- 
MST



More information about the general mailing list