FairMQ icon indicating copy to clipboard operation
FairMQ copied to clipboard

Support min alignment in ChannelResource

Open dennisklein opened this issue 4 years ago • 4 comments

Related to #265

dennisklein avatar Jun 17 '20 12:06 dennisklein

How is MinAlignment set? is it something that can be set "globally"? (say once per factory or so?)

It would be per factory, but one could create more than one per factory as before, see usage in the unit test in this PR. The TransportFactory::GetMemoryResource() is unchanged.

dennisklein avatar Jun 17 '20 20:06 dennisklein

ok, so it looks essentially like the workaround we have in O2 (@ktf ?). This would give us no further advantage aside from not having this specific allocator in our code base. How about the thing we briefly discussed with @rbx (https://github.com/AliceO2Group/AliceO2/pull/3674#issuecomment-643357655) for a bit more transparency?

mkrzewic avatar Jun 17 '20 21:06 mkrzewic

ok, so it looks essentially like the workaround we have in O2 (@ktf ?). This would give us no further advantage aside from not having this specific allocator in our code base.

Yes, it is nothing more.

How about the thing we briefly discussed with @rbx (AliceO2Group/AliceO2#3674 (comment)) for a bit more transparency?

Sure, I am fine with making the default alignment configurable on that API layer, too.

Just the same question for my understanding, whats the improvement over just using the pmr interface above to create messages? Or, in other words, what makes the pmr solution - even if only a specialized pmr class in O2 repo - just a workaorund? Are we just talking about API design or is there any technical difference you want to see?

dennisklein avatar Jun 17 '20 22:06 dennisklein

@dennisklein I'd say it is about API design mostly, technically we have all the pieces, but just would like to avoid confusion. TransportFactory::GetMemoryResource() (and the implicit conversion operator) are just too seductive not to use :) Just saying it could be potentially dangerous if the default API (above) and the thing we actually need (explicitly constructed allocator as it is now) return the same thing different only in subtle ways like (over-)alignment.

mkrzewic avatar Jun 17 '20 22:06 mkrzewic