[openib-general] [PATCH][RFC] kDAPL: remove dat wrapper funct ion dat_ia_query()

James Lentini jlentini at netapp.com
Mon Jun 13 14:54:24 PDT 2005



On Sun, 12 Jun 2005, Tom Duffy wrote:

> On Sat, 2005-06-11 at 11:20 +0200, Christoph Hellwig wrote:
>> Currently every dapl object embedds dapl_common which has a pointer
>> to the dapl_ia.  Now fixing that mess up a little every dat object
>> can have a dat_ia pointer (without the utter _common braindamage)
>> and there's one additional dereference, while saving one pointer per
>> allocated object.
>
> The compiler should be smart enough to not make the access any more
> costly since they contain that struct and don't have a pointer to it,

I believe the "one additional dereference" Christoph was referring to 
occurs if we implement his proposal and define dat objects as follows:

struct dat_ia {
 	struct dat_provider *provider;
 	union dat_context context;
}

struct dat_foo {
 	struct dat_ia *ia;
 	union dat_context context;
}

> but I do agree that the _common structure is not ideal and sorta ugly.

I like it on the basis that if gathers up the common structure members 
in one place, hence making maintenance of these fields easier in the 
future. Granted, there are only two of them, so losing it wouldn't be 
a big deal.

>
> -tduffy
>



More information about the general mailing list